lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 26 Apr 2011 23:00:39 +0700
From:	artpol <artpol84@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	jgarzik@...ox.com
Subject: Flow-control representation in ethtool (mii.c fix?)

Hello, All.

I was dealing with flow-control on my ethernet card:
eth0: RTL8168d/8111d 
# uname -r
2.6.35-28-generic-pae (Ubuntu 10.10 current kernel)

And found following problem:

~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Half 1000baseT/Full 
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Half 1000baseT/Full 
Advertised pause frame use: No
...
Link partner advertised pause frame use: No

As you can see no pause frame is advertised. But mii-tool shows
different result:
~# mii-tool eth0
eth0: negotiated 100baseTx-FD flow-control, link ok

And the same shows remote embedded device whith which I work.

Inspection of kernel sources shows that GSET ethtool command leads
r8169.c to call mii_ethtool_gset(). And looking there I found that this
function simply ignore Pause-related settings. Searching kernel sources
shows that a lot of ethernet drivers use this function 
(grep -R mii_ethtool_gset drivers/net/*)

In latest kernel (2.6.38.4) I also see that this thing doesn't fixed. So
I'd like to know is there some background behind this current design or
not. If not I suggest simple patch attached to this mail. I've test it
on kernel 2.6.38.4 and it works for me:

Settings for eth0:
  Supported ports: [ TP MII ]
  Supported link modes:   10baseT/Half 10baseT/Full
                          100baseT/Half 100baseT/Full
                          1000baseT/Half 1000baseT/Full
  Supports auto-negotiation: Yes
  Advertised link modes:  10baseT/Half 10baseT/Full
                          100baseT/Half 100baseT/Full
                          1000baseT/Half 1000baseT/Full
  Advertised pause frame use: Symmetric Receive-only
  Advertised auto-negotiation: Yes
  Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                       100baseT/Half 100baseT/Full
  Link partner advertised pause frame use: Symmetric
  Link partner advertised auto-negotiation: Yes
....

--
Artem Polyakov.

View attachment "mii_flow_control_gset.patch" of type "text/x-patch" (533 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ