Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i40e: Remove LLDP frame filters

Remove filters from being setup in case of software DCB and allow the
LLDP frames to be properly transmitted to the wire.

It is not possible to transmit the LLDP frame out of the port, if they
are filtered by control VSI. This prohibits software LLDP agent
properly communicate its DCB capabilities to the neighbors.

Fixes: 4b208eaa8078 ("i40e: Add init and default config of software based DCB")
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Imam Hassan Reza Biswas <imam.hassan.reza.biswas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

authored by

Arkadiusz Kubalewski and committed by
Tony Nguyen
8085a36d 15395ec4

-44
-1
drivers/net/ethernet/intel/i40e/i40e.h
··· 1144 1144 return !!(pf->flags & I40E_FLAG_DISABLE_FW_LLDP); 1145 1145 } 1146 1146 1147 - void i40e_set_lldp_forwarding(struct i40e_pf *pf, bool enable); 1148 1147 #ifdef CONFIG_I40E_DCB 1149 1148 void i40e_dcbnl_flush_apps(struct i40e_pf *pf, 1150 1149 struct i40e_dcbx_config *old_cfg,
-1
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 5282 5282 i40e_aq_cfg_lldp_mib_change_event(&pf->hw, false, NULL); 5283 5283 i40e_aq_stop_lldp(&pf->hw, true, false, NULL); 5284 5284 } else { 5285 - i40e_set_lldp_forwarding(pf, false); 5286 5285 status = i40e_aq_start_lldp(&pf->hw, false, NULL); 5287 5286 if (status) { 5288 5287 adq_err = pf->hw.aq.asq_last_status;
-42
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 6880 6880 #endif /* CONFIG_I40E_DCB */ 6881 6881 6882 6882 /** 6883 - * i40e_set_lldp_forwarding - set forwarding of lldp frames 6884 - * @pf: PF being configured 6885 - * @enable: if forwarding to OS shall be enabled 6886 - * 6887 - * Toggle forwarding of lldp frames behavior, 6888 - * When passing DCB control from firmware to software 6889 - * lldp frames must be forwarded to the software based 6890 - * lldp agent. 6891 - */ 6892 - void i40e_set_lldp_forwarding(struct i40e_pf *pf, bool enable) 6893 - { 6894 - if (pf->lan_vsi == I40E_NO_VSI) 6895 - return; 6896 - 6897 - if (!pf->vsi[pf->lan_vsi]) 6898 - return; 6899 - 6900 - /* No need to check the outcome, commands may fail 6901 - * if desired value is already set 6902 - */ 6903 - i40e_aq_add_rem_control_packet_filter(&pf->hw, NULL, ETH_P_LLDP, 6904 - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TX | 6905 - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC, 6906 - pf->vsi[pf->lan_vsi]->seid, 0, 6907 - enable, NULL, NULL); 6908 - 6909 - i40e_aq_add_rem_control_packet_filter(&pf->hw, NULL, ETH_P_LLDP, 6910 - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_RX | 6911 - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC, 6912 - pf->vsi[pf->lan_vsi]->seid, 0, 6913 - enable, NULL, NULL); 6914 - } 6915 - 6916 - /** 6917 6883 * i40e_print_link_message - print link up or down 6918 6884 * @vsi: the VSI for which link needs a message 6919 6885 * @isup: true of link is up, false otherwise ··· 10702 10736 */ 10703 10737 i40e_add_filter_to_drop_tx_flow_control_frames(&pf->hw, 10704 10738 pf->main_vsi_seid); 10705 - #ifdef CONFIG_I40E_DCB 10706 - if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) 10707 - i40e_set_lldp_forwarding(pf, true); 10708 - #endif /* CONFIG_I40E_DCB */ 10709 10739 10710 10740 /* restart the VSIs that were rebuilt and running before the reset */ 10711 10741 i40e_pf_unquiesce_all_vsi(pf); ··· 15734 15772 */ 15735 15773 i40e_add_filter_to_drop_tx_flow_control_frames(&pf->hw, 15736 15774 pf->main_vsi_seid); 15737 - #ifdef CONFIG_I40E_DCB 15738 - if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) 15739 - i40e_set_lldp_forwarding(pf, true); 15740 - #endif /* CONFIG_I40E_DCB */ 15741 15775 15742 15776 if ((pf->hw.device_id == I40E_DEV_ID_10G_BASE_T) || 15743 15777 (pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4))