Bug 458450 - s2io doesn't support ethtool "sg on" on pci-x card
s2io doesn't support ethtool "sg on" on pci-x card
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.4
All Linux
low Severity low
: rc
: ---
Assigned To: Michal Schmidt
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-08 10:24 EDT by Andrew Hecox
Modified: 2011-03-15 06:29 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-15 06:29:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Hecox 2008-08-08 10:24:04 EDT
The s2io driver supports turning SG off; but not on

# ethtool -k eth1
...
scatter-gather: on
...
# ethtool -K eth1 sg off
# sudo ethtool -k eth1
...
scatter-gather: off
...
# sudo ethtool -K eth1 sg on
Cannot set device scatter-gather settings: Invalid argument
# sudo ethtool -k eth1
...
scatter-gather: off
...

stracing, I see: 

ioctl(3, SIOCETHTOOL, 0x7fffe899c270)   = -1 EINVAL (Invalid argument)

running on a pci-e version of the card, the operation works and I see:

ioctl(3, SIOCETHTOOL, 0x7fff0b649f10)   = 0

Testing on  2.6.18-92.1.1.el5 #1 SMP Thu May 22 09:01:47 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Andrew Hecox 2008-08-08 11:31:55 EDT
after further experimentation, it looks like you cannot enable sg offloading when tx checksumming is off. Maybe this is expected? 

# for i in on off ; do for j in on off ; do for k in on off ; do echo "--- tx $i + sg $j + gso $k ---" ; ethtool -K eth1 tx $i + sg $j + gso $k ; done ; done ; done
--- tx on + sg on + gso on ---
--- tx on + sg on + gso off ---
--- tx on + sg off + gso on ---
--- tx on + sg off + gso off ---
--- tx off + sg on + gso on ---
Cannot set device scatter-gather settings: Invalid argument
--- tx off + sg on + gso off ---
Cannot set device scatter-gather settings: Invalid argument
--- tx off + sg off + gso on ---
--- tx off + sg off + gso off ---
Comment 2 Jan Tluka 2009-11-11 08:55:18 EST
Andrew, if you think this is really a bug, please raise these flags: 
rhel‑5.5.0 ?
pm_ack ?
devel_ack ?
qa_ack +

Thanks.
Comment 3 Andrew Hecox 2010-01-06 06:54:21 EST
set (I can't set qa_ack+)
Comment 5 Michal Schmidt 2011-03-15 06:29:59 EDT
(In reply to comment #1)
> after further experimentation, it looks like you cannot enable sg offloading
> when tx checksumming is off. Maybe this is expected? 

Yes, checksumming is needed for SG. This is enforced by net/core/ethtool.c:ethtool_set_sg()
...
if (edata.data &&
            !(dev->features & NETIF_F_ALL_CSUM))
                return -EINVAL;
...

Note You need to log in before you can comment on or make changes to this bug.