Bug 221530 - if_ixl: add a way to disable/enable lldp handling by the NIC
Summary: if_ixl: add a way to disable/enable lldp handling by the NIC
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Eric Joyner
URL:
Keywords: IntelNetworking, patch
Depends on:
Blocks:
 
Reported: 2017-08-14 18:25 UTC by Nikita Kozlov
Modified: 2018-12-19 02:52 UTC (History)
4 users (show)

See Also:
erj: mfc-stable12+
erj: mfc-stable11+


Attachments
disable hw lldp sysctl patch (3.11 KB, patch)
2017-08-14 18:25 UTC, Nikita Kozlov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Kozlov 2017-08-14 18:25:47 UTC
Created attachment 185412 [details]
disable hw lldp sysctl patch

In XL710 cards LLDP is by default handled directly by the NIC.
It means that LLDP PDU are filtered by the NIC and are not visible by the kernel.
The filtering can be turned off by calling i40e_aq_stop_lldp().

You can see this feature in the linux driver (which contains more options) http://elixir.free-electrons.com/linux/v3.12/source/drivers/net/ethernet/intel/i40e/i40e_debugfs.c#L1618

I'm proposing here a patch to disable LLDP filtering by using a sysctl.
Note that, we should also (not done in the patch) call i40e_aq_start_lldp() somewhere in the iface init to be sure that the sysctl value is consistent with the card behavior.
Comment 1 Eric Joyner freebsd_committer freebsd_triage 2017-08-24 23:55:55 UTC
https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xl710-10-40-controller-spec-update.pdf

Issue #70 is the reason why we don't allow the user to disable lldp.

That said, FW6 fixes this -- but until that's officially out, this isn't really a bug.
Comment 2 Nikita Kozlov 2017-08-28 10:22:46 UTC
(In reply to Eric Joyner from comment #1)

I wasn't aware of this issue with the firmware, thanks for sharing. I guess I was lucky enough to not have this problem when I was disabling lldp.

For what its worth, the FW6 seems to be out (I have not tested it yet) https://downloadcenter.intel.com/download/25792/Non-Volatile-Memory-NVM-Update-Utility-for-Intel-Ethernet-Adapters-FreeBSD-
Comment 3 Eric Joyner freebsd_committer freebsd_triage 2017-12-07 18:34:52 UTC
We're going to have this functionality in the next update to ixl -- there's a new admin queue command added to the FW that needs to be called after disabling LLDP, and extra tracking in the driver to make sure the correct status is detected on driver load.
Comment 4 Krzysztof Galazka 2017-12-11 11:10:34 UTC
New version of the driver, which has been published here: https://downloadcenter.intel.com/download/25160/Ethernet-Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connection-under-FreeBSD- has this feature implemented.
Comment 5 Nikita Kozlov 2017-12-11 15:31:59 UTC
Thanks, I will try that when I will have some time !
Comment 6 Krzysztof Galazka 2018-04-06 10:56:48 UTC
The review which add this feature to in-kernel driver: https://reviews.freebsd.org/D14985
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-05-01 18:50:40 UTC
A commit references this bug:

Author: erj
Date: Tue May  1 18:50:12 UTC 2018
New revision: 333149
URL: https://svnweb.freebsd.org/changeset/base/333149

Log:
  ixl(4): Update to 1.9.9-k

  Refresh upstream driver before impending conversion to iflib.

  Major changes:

  - Support for descriptor writeback mode (required by ixlv(4) for AVF support)
  - Ability to disable firmware LLDP agent by user (PR 221530)
  - Fix for TX queue hang when using TSO (PR 221919)
  - Separate descriptor ring sizes for TX and RX rings

  PR:		221530, 221919
  Submitted by:	Krzysztof Galazka <krzysztof.galazka@intel.com>
  Reviewed by:	#IntelNetworking
  MFC after:	1 day
  Relnotes:	Yes
  Sponsored by:	Intel Corporation
  Differential Revision:	https://reviews.freebsd.org/D14985

Changes:
  head/sys/conf/files.amd64
  head/sys/dev/ixl/i40e_adminq.c
  head/sys/dev/ixl/i40e_adminq.h
  head/sys/dev/ixl/i40e_adminq_cmd.h
  head/sys/dev/ixl/i40e_alloc.h
  head/sys/dev/ixl/i40e_common.c
  head/sys/dev/ixl/i40e_dcb.c
  head/sys/dev/ixl/i40e_dcb.h
  head/sys/dev/ixl/i40e_devids.h
  head/sys/dev/ixl/i40e_hmc.c
  head/sys/dev/ixl/i40e_hmc.h
  head/sys/dev/ixl/i40e_lan_hmc.c
  head/sys/dev/ixl/i40e_lan_hmc.h
  head/sys/dev/ixl/i40e_nvm.c
  head/sys/dev/ixl/i40e_osdep.c
  head/sys/dev/ixl/i40e_osdep.h
  head/sys/dev/ixl/i40e_prototype.h
  head/sys/dev/ixl/i40e_register.h
  head/sys/dev/ixl/i40e_status.h
  head/sys/dev/ixl/i40e_type.h
  head/sys/dev/ixl/i40e_virtchnl.h
  head/sys/dev/ixl/if_ixl.c
  head/sys/dev/ixl/if_ixlv.c
  head/sys/dev/ixl/ixl.h
  head/sys/dev/ixl/ixl_iw.c
  head/sys/dev/ixl/ixl_iw.h
  head/sys/dev/ixl/ixl_iw_int.h
  head/sys/dev/ixl/ixl_pf.h
  head/sys/dev/ixl/ixl_pf_i2c.c
  head/sys/dev/ixl/ixl_pf_iov.c
  head/sys/dev/ixl/ixl_pf_iov.h
  head/sys/dev/ixl/ixl_pf_main.c
  head/sys/dev/ixl/ixl_pf_qmgr.c
  head/sys/dev/ixl/ixl_pf_qmgr.h
  head/sys/dev/ixl/ixl_txrx.c
  head/sys/dev/ixl/ixlv.h
  head/sys/dev/ixl/ixlv_vc_mgr.h
  head/sys/dev/ixl/ixlvc.c
  head/sys/dev/ixl/virtchnl.h
  head/sys/modules/ixl/Makefile