netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-next v4 0/6] ice: LLDP support for VFs
@ 2025-02-14  8:50 Larysa Zaremba
  2025-02-14  8:50 ` [PATCH iwl-next v4 1/6] ice: fix check for existing switch rule Larysa Zaremba
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Larysa Zaremba @ 2025-02-14  8:50 UTC (permalink / raw)
  To: Tony Nguyen, intel-wired-lan
  Cc: Larysa Zaremba, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	Michal Swiatkowski, Mateusz Pacuszka

Allow to:
* receive LLDP packets on a VF in legacy mode
* receive LLDP packets on a VF in switchdev mode
* transmit LLDP from a VF in switchdev mode

Many VSIs can receive LLDP packets, but only one VSI
per port can transmit LLDP, therefore LLDP TX from VF
requires adding an egress drop rule to the PF, this is
implemented in these series too.

There are no patches that explicitly address LLDP RX in
switchdev mode, because it just works after adding support
in legacy mode.

Usage

To receive LLDP packets on VF in legacy mode:
On host:
ip link set dev <pf_ifname> vf <n> trust on
On VM:
service lldpd restart

To receive LLDP packets on VF in switchdev mode (host config):
tc qdisc add dev <pf_ifname> clsact
tc filter add dev <pf_ifname> protocol lldp ingress \\
   flower skip_sw action mirred egress mirror dev <repr_ifname>

To transmit LLDP packets from VF (host config):
tc qdisc add dev <pf_ifname> clsact
tc qdisc add dev <repr_ifname> clsact
tc filter add dev <pf_ifname> egress protocol lldp \\
   flower skip_sw action drop
tc filter add dev <repr_ifname> ingress protocol lldp \\
   flower skip_sw action mirred egress redirect dev <pf_ifname>

For all abovementioned functionalities to work, private flag
fw-lldp-agent must be off.

v3->v4:
* add "Return: " to the touched kernel-doc
* reunite return type and declaration for ice_add_cls_flower()
  and ice_del_cls_flower()

v2->v3:
* fix sparse warning caused by part of .sw_act members being initialized
  inside the curly braces and others being initialized directly
* reorder members inside the rinfo initializer according to struct
  definition in ice_drop_vf_tx_lldp(), while fixing the warning above

v1->v2:
* get rid of sysfs control
* require switchdev for VF LLDP Tx
* in legacy mode, for VF LLDP Rx rely on configured MAC addresses

Larysa Zaremba (4):
  ice: do not add LLDP-specific filter if not necessary
  ice: remove headers argument from ice_tc_count_lkups
  ice: support egress drop rules on PF
  ice: enable LLDP TX for VFs through tc

Mateusz Pacuszka (2):
  ice: fix check for existing switch rule
  ice: receive LLDP on trusted VFs

 drivers/net/ethernet/intel/ice/ice.h          |   1 +
 drivers/net/ethernet/intel/ice/ice_common.c   |  14 +-
 drivers/net/ethernet/intel/ice/ice_common.h   |   3 +-
 drivers/net/ethernet/intel/ice/ice_dcb_lib.c  |   2 +-
 drivers/net/ethernet/intel/ice/ice_eswitch.c  |   6 +
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |   2 +-
 drivers/net/ethernet/intel/ice/ice_lib.c      |  71 ++++-
 drivers/net/ethernet/intel/ice/ice_lib.h      |   3 +-
 drivers/net/ethernet/intel/ice/ice_main.c     |  63 ++++-
 drivers/net/ethernet/intel/ice/ice_repr.c     |  10 +-
 drivers/net/ethernet/intel/ice/ice_sriov.c    |   4 +
 drivers/net/ethernet/intel/ice/ice_switch.c   |   4 +-
 drivers/net/ethernet/intel/ice/ice_tc_lib.c   | 258 +++++++++++++++---
 drivers/net/ethernet/intel/ice/ice_tc_lib.h   |  11 +-
 drivers/net/ethernet/intel/ice/ice_txrx.c     |  17 +-
 drivers/net/ethernet/intel/ice/ice_vf_lib.c   |  26 ++
 drivers/net/ethernet/intel/ice/ice_vf_lib.h   |  12 +
 drivers/net/ethernet/intel/ice/ice_virtchnl.c |  53 +++-
 18 files changed, 480 insertions(+), 80 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-03-11 10:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14  8:50 [PATCH iwl-next v4 0/6] ice: LLDP support for VFs Larysa Zaremba
2025-02-14  8:50 ` [PATCH iwl-next v4 1/6] ice: fix check for existing switch rule Larysa Zaremba
2025-02-20 14:55   ` Simon Horman
2025-03-11 10:24     ` [Intel-wired-lan] " Romanowski, Rafal
2025-02-14  8:50 ` [PATCH iwl-next v4 2/6] ice: do not add LLDP-specific filter if not necessary Larysa Zaremba
2025-02-20 14:56   ` Simon Horman
2025-03-11 10:24     ` [Intel-wired-lan] " Romanowski, Rafal
2025-02-14  8:50 ` [PATCH iwl-next v4 3/6] ice: receive LLDP on trusted VFs Larysa Zaremba
2025-02-20 14:58   ` Simon Horman
2025-03-11 10:25     ` [Intel-wired-lan] " Romanowski, Rafal
2025-02-14  8:50 ` [PATCH iwl-next v4 4/6] ice: remove headers argument from ice_tc_count_lkups Larysa Zaremba
2025-02-20 14:58   ` Simon Horman
2025-03-11 10:25     ` [Intel-wired-lan] " Romanowski, Rafal
2025-02-14  8:50 ` [PATCH iwl-next v4 5/6] ice: support egress drop rules on PF Larysa Zaremba
2025-02-20 14:58   ` Simon Horman
2025-03-11 10:26     ` [Intel-wired-lan] " Romanowski, Rafal
2025-02-14  8:50 ` [PATCH iwl-next v4 6/6] ice: enable LLDP TX for VFs through tc Larysa Zaremba
2025-02-20 14:59   ` Simon Horman
2025-03-11 10:26     ` [Intel-wired-lan] " Romanowski, Rafal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).