[systemd-devel] [PATCH 1/2] udev: use "bit" as unit for network card speeds

Jan Engelhardt jengelh at inai.de
Mon Nov 11 20:49:46 PST 2013


Given a card that can do 100 Mbit/s, that would be about 12.5 MByte/s,
but you cannot seriously expect me to use that value. Although it is
quite compelling for 40 Gbit/s because that divides nicely to 5
GByte/sec, and we will be seeing increasing speeds :)
---
 man/udev.xml                         | 4 ++--
 src/udev/net/link-config-gperf.gperf | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/udev.xml b/man/udev.xml
index d157b8c..d0998ce 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -891,9 +891,9 @@
           </listitem>
         </varlistentry>
         <varlistentry>
-          <term><varname>SpeedMBytes</varname></term>
+          <term><varname>SpeedMBit</varname></term>
           <listitem>
-            <para>The speed to set for the device.</para>
+            <para>The speed to set for the device, in megabits per second.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
diff --git a/src/udev/net/link-config-gperf.gperf b/src/udev/net/link-config-gperf.gperf
index 1fe0b93..bfb91f4 100644
--- a/src/udev/net/link-config-gperf.gperf
+++ b/src/udev/net/link-config-gperf.gperf
@@ -26,6 +26,6 @@ Link.MACAddress,                    config_parse_hwaddr,        0, offsetof(link
 Link.NamePolicy,                    config_parse_name_policy,   0, offsetof(link_config, name_policy)
 Link.Name,                          config_parse_ifname,        0, offsetof(link_config, name)
 Link.MTU,                           config_parse_unsigned,      0, offsetof(link_config, mtu)
-Link.SpeedMBytes,                   config_parse_unsigned,      0, offsetof(link_config, speed)
+Link.SpeedMBit,                     config_parse_unsigned,      0, offsetof(link_config, speed)
 Link.Duplex,                        config_parse_duplex,        0, offsetof(link_config, duplex)
 Link.WakeOnLan,                     config_parse_wol,           0, offsetof(link_config, wol)
-- 
1.8.2



More information about the systemd-devel mailing list