[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#692043: net: do not disable sg for packets requiring no checksum



Package: src:linux
Version: 3.2.23-1
Severity: important

Dear Maintainer,

A regression appearing upstream after 2.6.38 (so not in squeeze) appears 
in wheezy.  The fix is in the upstream 3.2.y stable Linux kernel maintained
by Ben Hutchings, so it's probably on its way into wheezy, but I didn't
see any bug for it, so I figured I'd reach out.

Here is the commit from 3.2.y, with the changelog describing the user
impact, felt most keenly by debian users who download the open source aoe
driver directly from coraid.com.  It includes the simple fix.

commit 9d222e395fc51081a77bac4168141e289dff2d4b
Author: Ed Cashin <ecashin@coraid.com>
Date:   Wed Sep 19 15:49:00 2012 +0000

    net: do not disable sg for packets requiring no checksum
    
    [ Upstream commit c0d680e577ff171e7b37dbdb1b1bf5451e851f04 ]
    
    A change in a series of VLAN-related changes appears to have
    inadvertently disabled the use of the scatter gather feature of
    network cards for transmission of non-IP ethernet protocols like ATA
    over Ethernet (AoE).  Below is a reference to the commit that
    introduces a "harmonize_features" function that turns off scatter
    gather when the NIC does not support hardware checksumming for the
    ethernet protocol of an sk buff.
    
      commit f01a5236bd4b140198fbcc550f085e8361fd73fa
      Author: Jesse Gross <jesse@nicira.com>
      Date:   Sun Jan 9 06:23:31 2011 +0000
    
          net offloading: Generalize netif_get_vlan_features().
    
    The can_checksum_protocol function is not equipped to consider a
    protocol that does not require checksumming.  Calling it for a
    protocol that requires no checksum is inappropriate.
    
    The patch below has harmonize_features call can_checksum_protocol when
    the protocol needs a checksum, so that the network layer is not forced
    to perform unnecessary skb linearization on the transmission of AoE
    packets.  Unnecessary linearization results in decreased performance
    and increased memory pressure, as reported here:
    
      http://www.spinics.net/lists/linux-mm/msg15184.html
    
    The problem has probably not been widely experienced yet, because
    only recently has the kernel.org-distributed aoe driver acquired the
    ability to use payloads of over a page in size, with the patchset
    recently included in the mm tree:
    
      https://lkml.org/lkml/2012/8/28/140
    
    The coraid.com-distributed aoe driver already could use payloads of
    greater than a page in size, but its users generally do not use the
    newest kernels.
    
    Signed-off-by: Ed Cashin <ecashin@coraid.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

diff --git a/net/core/dev.c b/net/core/dev.c
index 611294a..abe1147 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2108,7 +2108,8 @@ static bool can_checksum_protocol(unsigned long features, __be16 protocol)
 
 static u32 harmonize_features(struct sk_buff *skb, __be16 protocol, u32 features)
 {
-	if (!can_checksum_protocol(features, protocol)) {
+	if (skb->ip_summed != CHECKSUM_NONE &&
+	    !can_checksum_protocol(features, protocol)) {
 		features &= ~NETIF_F_ALL_CSUM;
 		features &= ~NETIF_F_SG;
 	} else if (illegal_highdma(skb->dev, skb)) {


-- Package-specific info:
** Version:
Linux version 3.2.0-3-amd64 (Debian 3.2.23-1) (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-8) ) #1 SMP Mon Jul 23 02:45:17 UTC 2012

** Command line:
BOOT_IMAGE=/boot/vmlinuz-3.2.0-3-amd64 root=UUID=4cb7446d-c561-4184-b8ec-486ef365455b ro quiet

** Not tainted

** Kernel log:
[    0.801610] acpiphp: Slot [30] registered
[    0.801693] acpiphp: Slot [31] registered
[    0.802476] intel_idle: does not run on family 6 model 15
[    0.802532] ERST: Table is not found!
[    0.802535] GHES: HEST is not enabled!
[    0.802660] xen: --> pirq=22 -> irq=28 (gsi=28)
[    0.802666] xen-platform-pci 0000:00:03.0: PCI INT A -> GSI 28 (level, low) -> IRQ 28
[    0.804744] Grant table initialized
[    0.809132] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.839167] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.894633] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.904439] Linux agpgart interface v0.103
[    0.904599] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    0.906591] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.906603] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.906968] mousedev: PS/2 mouse device common for all mice
[    0.907810] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.908587] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
[    0.908630] rtc0: alarms up to one day, 114 bytes nvram
[    0.908645] cpuidle: using governor ladder
[    0.908648] cpuidle: using governor menu
[    0.908933] TCP cubic registered
[    0.909141] NET: Registered protocol family 10
[    0.909843] Mobile IPv6
[    0.909848] NET: Registered protocol family 17
[    0.909854] Registering the dns_resolver key type
[    0.910274] PM: Hibernation image not present or could not be loaded.
[    0.910301] registered taskstats version 1
[    0.915641] XENBUS: Device with no driver: device/vfb/0
[    0.915646] XENBUS: Device with no driver: device/vbd/768
[    0.915650] XENBUS: Device with no driver: device/vif/0
[    0.915659] XENBUS: Device with no driver: device/console/0
[    0.915755] rtc_cmos 00:05: setting system clock to 2012-11-01 14:41:05 UTC (1351780865)
[    0.915795] Initializing network drop monitor service
[    0.917400] Freeing unused kernel memory: 572k freed
[    0.917674] Write protecting the kernel read-only data: 6144k
[    0.920494] Freeing unused kernel memory: 668k freed
[    0.923488] Freeing unused kernel memory: 684k freed
[    1.109965] udevd[49]: starting version 175
[    1.192878] SCSI subsystem initialized
[    1.232247] libata version 3.00 loaded.
[    1.233203] ata_piix 0000:00:01.1: version 2.13
[    1.233563] ata_piix 0000:00:01.1: setting latency timer to 64
[    1.243055] scsi0 : ata_piix
[    1.250470] scsi1 : ata_piix
[    1.250558] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc200 irq 14
[    1.250563] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc208 irq 15
[    1.527792] Initialising Xen virtual ethernet driver.
[    1.545930] FDC 0 is a S82078B
[    1.569014] blkfront: xvda: flush diskcache: enabled
[    1.572905]  xvda: xvda1 xvda2 < xvda5 >
[    1.764162] Refined TSC clocksource calibration: 2327.581 MHz.
[    1.873612] device-mapper: uevent: version 1.0.3
[    1.873862] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
[    1.929873] PM: Starting manual resume from disk
[    1.929879] PM: Hibernation image partition 202:5 present
[    1.929882] PM: Looking for hibernation image.
[    1.930041] PM: Image not found (code -22)
[    1.930044] PM: Hibernation image not present or could not be loaded.
[    1.950467] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)
[    4.021192] udevd[389]: starting version 175
[    4.533418] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    4.533428] ACPI: Power Button [PWRF]
[    4.533534] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input2
[    4.533540] ACPI: Sleep Button [SLPF]
[    4.822719] parport_pc 00:0b: reported by Plug and Play ACPI
[    4.823934] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[    4.872769] input: PC Speaker as /devices/platform/pcspkr/input/input3
[    5.002240] piix4_smbus 0000:00:01.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
[    5.382584] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4
[   10.707695] Adding 901116k swap on /dev/xvda5.  Priority:-1 extents:1 across:901116k SS
[   10.768993] EXT4-fs (xvda1): re-mounted. Opts: (null)
[   10.984767] EXT4-fs (xvda1): re-mounted. Opts: errors=remount-ro
[   11.243003] loop: module loaded
[   13.992054] RPC: Registered named UNIX socket transport module.
[   13.992059] RPC: Registered udp transport module.
[   13.992113] RPC: Registered tcp transport module.
[   13.992116] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   14.019822] FS-Cache: Loaded
[   14.044928] FS-Cache: Netfs 'nfs' registered for caching
[   14.064130] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   19.501916] lp0: using parport0 (interrupt-driven).
[   19.523994] ppdev: user-space parallel port driver
[   19.667626] Bluetooth: Core ver 2.16
[   19.667655] NET: Registered protocol family 31
[   19.667659] Bluetooth: HCI device and connection manager initialized
[   19.667663] Bluetooth: HCI socket layer initialized
[   19.667667] Bluetooth: L2CAP socket layer initialized
[   19.667681] Bluetooth: SCO socket layer initialized
[   19.734817] Bluetooth: RFCOMM TTY layer initialized
[   19.734825] Bluetooth: RFCOMM socket layer initialized
[   19.734829] Bluetooth: RFCOMM ver 1.11
[   19.779687] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.779692] Bluetooth: BNEP filters: protocol multicast
[   21.737812] mtrr: no MTRR for f0000000,100000 found
[   22.196601] Ebtables v2.0 registered
[   22.280569] ip_tables: (C) 2000-2006 Netfilter Core Team
[   22.320806] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   30.848160] eth0: no IPv6 routers present
[   77.413372] colord-sane[3382]: segfault at 0 ip 00007fdff4a8e884 sp 00007fff0a324820 error 4 in libc-2.13.so[7fdff49e9000+17d000]

** Model information
sys_vendor: Xen
product_name: HVM domU
product_version: 4.1.3
chassis_vendor: Xen
chassis_version: 
bios_vendor: Xen
bios_version: 4.1.3

** Loaded modules:
ip6table_filter
ip6_tables
iptable_filter
ip_tables
ebtable_nat
ebtables
x_tables
bnep
rfcomm
bluetooth
rfkill
ppdev
lp
binfmt_misc
nfsd
nfs
nfs_acl
auth_rpcgss
fscache
lockd
sunrpc
loop
i2c_piix4
i2c_core
psmouse
serio_raw
pcspkr
evdev
parport_pc
parport
processor
button
thermal_sys
ext4
crc16
jbd2
mbcache
dm_mod
xen_blkfront
xen_netfront
floppy
ata_generic
ata_piix
libata
scsi_mod

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237] (rev 02)
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Physical Slot: 0
	Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0

00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Physical Slot: 1
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0

00:01.1 IDE interface [0101]: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] [8086:7010] (prog-if 80 [Master])
	Subsystem: XenSource, Inc. Device [5853:0001]
	Physical Slot: 1
	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64
	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
	Region 4: I/O ports at c200 [size=16]
	Kernel driver in use: ata_piix

00:01.3 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 01)
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Physical Slot: 1
	Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 9

00:02.0 VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8] (prog-if 00 [VGA controller])
	Subsystem: XenSource, Inc. Device [5853:0001]
	Physical Slot: 2
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Region 0: Memory at f0000000 (32-bit, prefetchable) [size=32M]
	Region 1: Memory at f3000000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at <unassigned> [disabled]

00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device [5853:0001] (rev 01)
	Subsystem: XenSource, Inc. Xen Platform Device [5853:0001]
	Physical Slot: 3
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 28
	Region 0: I/O ports at c000 [size=256]
	Region 1: Memory at f2000000 (32-bit, prefetchable) [size=16M]
	Kernel driver in use: xen-platform-pci


** Sound cards:

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages linux-image-3.2.0-3-amd64 depends on:
ii  debconf [debconf-2.0]                   1.5.46
ii  initramfs-tools [linux-initramfs-tool]  0.109
ii  kmod                                    9-2
ii  linux-base                              3.5
ii  module-init-tools                       9-2

Versions of packages linux-image-3.2.0-3-amd64 recommends:
pn  firmware-linux-free  <none>

Versions of packages linux-image-3.2.0-3-amd64 suggests:
pn  debian-kernel-handbook  <none>
ii  grub-pc                 1.99-23
pn  linux-doc-3.2           <none>

Versions of packages linux-image-3.2.0-3-amd64 is related to:
pn  firmware-atheros        <none>
pn  firmware-bnx2           <none>
pn  firmware-bnx2x          <none>
pn  firmware-brcm80211      <none>
pn  firmware-intelwimax     <none>
pn  firmware-ipw2x00        <none>
pn  firmware-ivtv           <none>
pn  firmware-iwlwifi        <none>
pn  firmware-libertas       <none>
pn  firmware-linux          <none>
pn  firmware-linux-nonfree  <none>
pn  firmware-myricom        <none>
pn  firmware-netxen         <none>
pn  firmware-qlogic         <none>
pn  firmware-ralink         <none>
pn  firmware-realtek        <none>
pn  xen-hypervisor          <none>

-- debconf information:
  linux-image-3.2.0-3-amd64/postinst/depmod-error-initrd-3.2.0-3-amd64: false
  linux-image-3.2.0-3-amd64/postinst/ignoring-ramdisk:
  linux-image-3.2.0-3-amd64/postinst/missing-firmware-3.2.0-3-amd64:
  linux-image-3.2.0-3-amd64/prerm/removing-running-kernel-3.2.0-3-amd64: true


Reply to: