Bug 233004 - ix0 at 12-BETA2: can not turn off RXCSUM/RXCSUM_IPV6
Summary: ix0 at 12-BETA2: can not turn off RXCSUM/RXCSUM_IPV6
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Stephen Hurd
URL:
Keywords: IntelNetworking, regression
Depends on:
Blocks:
 
Reported: 2018-11-05 21:14 UTC by Lev A. Serebryakov
Modified: 2018-11-19 08:49 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable12+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-05 21:14:04 UTC
ix0 (82599ES 10-Gigabit SFI/SFP+ Network Connection) can not turn off rx checksums with "ifconfig ix0 -rxcsum". txchecksums, LRO and TSO could be turned off.

11.2 could turn off all offloading on exactly same card.

ix0@pci0:1:0:0:	class=0x020000 card=0x00038086 chip=0x10fb8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
    class      = network
    subclass   = ethernet

dev.ix.0.iflib.driver_version: 4.0.1-k

FreeBSD lion 12.0-BETA2 FreeBSD 12.0-BETA2 r339753 GENERIC  amd64
Comment 1 Stephen Hurd freebsd_committer freebsd_triage 2018-11-06 18:32:57 UTC
What options are set by on that card when you try disabling rxcsum?  Does the link go down then back up when failing to disable rxcsum?
Comment 2 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-06 19:58:42 UTC
(In reply to Stephen Hurd from comment #1)
Nothing changes:

root@:/tmp # ifconfig ix0
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 90:e2:ba:a3:c0:90
	inet 192.168.10.2 netmask 0xffffff00 broadcast 192.168.10.255 
	media: Ethernet autoselect (10Gbase-SR <full-duplex,rxpause,txpause>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@:/tmp # ifconfig ix0 -rxcsum
root@:/tmp # ifconfig ix0
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 90:e2:ba:a3:c0:90
	inet 192.168.10.2 netmask 0xffffff00 broadcast 192.168.10.255 
	media: Ethernet autoselect (10Gbase-SR <full-duplex,rxpause,txpause>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@:/tmp # ifconfig ix0 -rxcsum6
root@:/tmp # ifconfig ix0
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 90:e2:ba:a3:c0:90
	inet 192.168.10.2 netmask 0xffffff00 broadcast 192.168.10.255 
	media: Ethernet autoselect (10Gbase-SR <full-duplex,rxpause,txpause>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Interface DOESN'T change state (up/down) (no "ix0: link state changed to DOWN/UP" on console or in dmesg).

When I turn on/turn off txcsum and/or txcsum6 interface goes via down/up sequence according to console/dmesg. And these options work :-)
Comment 3 Stephen Hurd freebsd_committer freebsd_triage 2018-11-06 20:05:13 UTC
Does -rxcsum6 disable both rxcsum and rxcsum6 by any chance?  Or does it also have no effect?

I should have my system with an ix in it up in a couple hours, so I should be able to test/fix this tonight.
Comment 4 Stephen Hurd freebsd_committer freebsd_triage 2018-11-06 20:06:05 UTC
Never mind, I see it.  Thanks!
Comment 5 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-06 20:40:03 UTC
I've checked 11.2-RELEASE on exactly same system (booted it from 11.2 installation media) and 11.2 doesn't have this problem.
Comment 6 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-06 20:40:21 UTC
And 11.2 doesn't cycle interface down/up :-)
Comment 7 Jeff Pieper 2018-11-06 21:14:29 UTC
The difference is that with the driver in 12.0-BETA, that is controlled by iflib and with the driver in 11.2 it is not.
Comment 8 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-06 21:47:24 UTC
(In reply to Jeff Pieper from comment #7)
Yes, I understand this.
I hope to have feature parity between old and new at least :-)
Comment 9 Stephen Hurd freebsd_committer freebsd_triage 2018-11-07 05:07:20 UTC
The issue should be fixed by https://reviews.freebsd.org/D17881

r338838 attempted to fix issues with rxcsum and rxcsum6.
However, the rxcsum bits were set as though if_setcapenablebit() was
being called, not if_togglecapenable() which is in use.  As a result,
it was not possible to disable rxcsum in various cases.
Comment 10 commit-hook freebsd_committer freebsd_triage 2018-11-07 19:31:53 UTC
A commit references this bug:

Author: shurd
Date: Wed Nov  7 19:31:49 UTC 2018
New revision: 340236
URL: https://svnweb.freebsd.org/changeset/base/340236

Log:
  Fix rxcsum issue introduced in r338838

  r338838 attempted to fix issues with rxcsum and rxcsum6.
  However, the rxcsum bits were set as though if_setcapenablebit() was
  being called, not if_togglecapenable() which is in use. As a result,
  it was not possible to disable rxcsum when rxcsum6 was supported.

  PR:		233004
  Reported by:	lev
  Reviewed by:	lev
  MFC after:	3 days
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D17881

Changes:
  head/sys/net/iflib.c
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-11-12 16:09:08 UTC
A commit references this bug:

Author: shurd
Date: Mon Nov 12 16:08:14 UTC 2018
New revision: 340365
URL: https://svnweb.freebsd.org/changeset/base/340365

Log:
  MFC r340236:

  Fix rxcsum issue introduced in r338838

  r338838 attempted to fix issues with rxcsum and rxcsum6.
  However, the rxcsum bits were set as though if_setcapenablebit() was
  being called, not if_togglecapenable() which is in use. As a result,
  it was not possible to disable rxcsum when rxcsum6 was supported.

  PR:		233004
  Reported by:	lev
  Reviewed by:	lev
  Approved by:	re (kib)
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D17881

Changes:
_U  stable/12/
  stable/12/sys/net/iflib.c