mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
ice: Add switch rules to handle LLDP packets
Add call to configure dropping egress LLDP packets in ice_vsi_setup and remove the rule in ice_vsi_release. Add calls to add/remove rule to route LLDP packets to default VSI when FW LLDP engine is disabled/enabled and remove rule if applied during ice_vsi_release. In the function ice_add_eth_mac(), there is a line that hard codes the filter info flag to TX. This is incorrect as this flag will be set by the calling function that built the list of filters to add. So remove the hard coded value. This patch also contains a fix to stop treating the DCBx state of "Not Started" as an error state that kicks DCB in SW mode. This will address having non-cabled interfaces automatically go into SW mode with the FW engine running. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
092a33d403
commit
2e0e62285c
5 changed files with 89 additions and 6 deletions
|
@ -1205,6 +1205,7 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)
|
|||
if (!test_bit(ICE_FLAG_ENABLE_FW_LLDP, pf->flags)) {
|
||||
enum ice_status status;
|
||||
|
||||
/* Disable FW LLDP engine */
|
||||
status = ice_aq_cfg_lldp_mib_change(&pf->hw, false,
|
||||
NULL);
|
||||
/* If unregistering for LLDP events fails, this is
|
||||
|
@ -1229,6 +1230,11 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)
|
|||
status = ice_init_pf_dcb(pf, true);
|
||||
if (status)
|
||||
dev_warn(&pf->pdev->dev, "Fail to init DCB\n");
|
||||
|
||||
/* Forward LLDP packets to default VSI so that they
|
||||
* are passed up the stack
|
||||
*/
|
||||
ice_cfg_sw_lldp(vsi, false, true);
|
||||
} else {
|
||||
enum ice_status status;
|
||||
bool dcbx_agent_status;
|
||||
|
@ -1262,6 +1268,11 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)
|
|||
status = ice_init_pf_dcb(pf, true);
|
||||
if (status)
|
||||
dev_dbg(&pf->pdev->dev, "Fail to init DCB\n");
|
||||
|
||||
/* Remove rule to direct LLDP packets to default VSI.
|
||||
* The FW LLDP engine will now be consuming them.
|
||||
*/
|
||||
ice_cfg_sw_lldp(vsi, false, false);
|
||||
}
|
||||
}
|
||||
clear_bit(ICE_FLAG_ETHTOOL_CTXT, pf->flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue