]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Allow all LLDP packets from PF to Tx
authorDave Ertman <david.m.ertman@intel.com>
Wed, 5 May 2021 21:17:59 +0000 (14:17 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 4 Jun 2021 14:37:48 +0000 (07:37 -0700)
commit0c549c0cfd42db670ef0263f35f9054cd0329c0a
treeaa76d59c10e9db01295a06299297f12b4f378cb5
parentfdb917fdc1f1bc20b48cbbcb969b44edfa922c68
ice: Allow all LLDP packets from PF to Tx

Currently in the ice driver, the check whether to
allow a LLDP packet to egress the interface from the
PF_VSI is being based on the SKB's priority field.
It checks to see if the packets priority is equal to
TC_PRIO_CONTROL.  Injected LLDP packets do not always
meet this condition.

SCAPY defaults to a sk_buff->protocol value of ETH_P_ALL
(0x0003) and does not set the priority field.  There will
be other injection methods (even ones used by end users)
that will not correctly configure the socket so that
SKB fields are correctly populated.

Then ethernet header has to have to correct value for
the protocol though.

Add a check to also allow packets whose ethhdr->h_proto
matches ETH_P_LLDP (0x88CC).

Fixes: 07ad883c0de0 ("ice: Allow egress control packets from PF_VSI")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c