* [PATCH] net/ice: use a different method to filter LLDP packets
@ 2024-06-26 17:31 Vladimir Medvedkin
2024-06-28 12:38 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Medvedkin @ 2024-06-26 17:31 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
Currently, ice_dev_init() calls ice_vsi_config_sw_lldp(), which uses
switch filters to match packets ethertype to redirect LLDP packets
to the default VSI. However, some NVMs have an issue creating such a rule.
This patch changes the method from using LLDP ethertyple switch filter
to utilizing a special AQ command (LLDP filter control).
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/ice/ice_ethdev.c | 34 +---------------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 194109b0f6..8c924aa010 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2206,38 +2206,6 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
return ret;
}
-/* Forward LLDP packets to default VSI by set switch rules */
-static int
-ice_vsi_config_sw_lldp(struct ice_vsi *vsi, bool on)
-{
- struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
- struct ice_fltr_list_entry *s_list_itr = NULL;
- struct LIST_HEAD_TYPE list_head;
- int ret = 0;
-
- INIT_LIST_HEAD(&list_head);
-
- s_list_itr = (struct ice_fltr_list_entry *)
- ice_malloc(hw, sizeof(*s_list_itr));
- if (!s_list_itr)
- return -ENOMEM;
- s_list_itr->fltr_info.lkup_type = ICE_SW_LKUP_ETHERTYPE;
- s_list_itr->fltr_info.vsi_handle = vsi->idx;
- s_list_itr->fltr_info.l_data.ethertype_mac.ethertype =
- RTE_ETHER_TYPE_LLDP;
- s_list_itr->fltr_info.fltr_act = ICE_FWD_TO_VSI;
- s_list_itr->fltr_info.flag = ICE_FLTR_RX;
- s_list_itr->fltr_info.src_id = ICE_SRC_ID_LPORT;
- LIST_ADD(&s_list_itr->list_entry, &list_head);
- if (on)
- ret = ice_add_eth_mac(hw, &list_head);
- else
- ret = ice_remove_eth_mac(hw, &list_head);
-
- rte_free(s_list_itr);
- return ret;
-}
-
static enum ice_status
ice_get_hw_res(struct ice_hw *hw, uint16_t res_type,
uint16_t num, uint16_t desc_id,
@@ -2491,7 +2459,7 @@ ice_dev_init(struct rte_eth_dev *dev)
if (ret != ICE_SUCCESS)
PMD_INIT_LOG(DEBUG, "Failed to init DCB\n");
/* Forward LLDP packets to default VSI */
- ret = ice_vsi_config_sw_lldp(vsi, true);
+ ret = ice_lldp_fltr_add_remove(hw, vsi->vsi_id, true);
if (ret != ICE_SUCCESS)
PMD_INIT_LOG(DEBUG, "Failed to cfg lldp\n");
/* register callback func to eal lib */
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/ice: use a different method to filter LLDP packets
2024-06-26 17:31 [PATCH] net/ice: use a different method to filter LLDP packets Vladimir Medvedkin
@ 2024-06-28 12:38 ` Bruce Richardson
2024-06-28 12:49 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2024-06-28 12:38 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dev
On Wed, Jun 26, 2024 at 05:31:55PM +0000, Vladimir Medvedkin wrote:
> Currently, ice_dev_init() calls ice_vsi_config_sw_lldp(), which uses
> switch filters to match packets ethertype to redirect LLDP packets
> to the default VSI. However, some NVMs have an issue creating such a rule.
>
> This patch changes the method from using LLDP ethertyple switch filter
> to utilizing a special AQ command (LLDP filter control).
>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/ice: use a different method to filter LLDP packets
2024-06-28 12:38 ` Bruce Richardson
@ 2024-06-28 12:49 ` Bruce Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2024-06-28 12:49 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dev
On Fri, Jun 28, 2024 at 01:38:59PM +0100, Bruce Richardson wrote:
> On Wed, Jun 26, 2024 at 05:31:55PM +0000, Vladimir Medvedkin wrote:
> > Currently, ice_dev_init() calls ice_vsi_config_sw_lldp(), which uses
> > switch filters to match packets ethertype to redirect LLDP packets
> > to the default VSI. However, some NVMs have an issue creating such a rule.
> >
> > This patch changes the method from using LLDP ethertyple switch filter
> > to utilizing a special AQ command (LLDP filter control).
> >
> > Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
Patch applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-28 12:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 17:31 [PATCH] net/ice: use a different method to filter LLDP packets Vladimir Medvedkin
2024-06-28 12:38 ` Bruce Richardson
2024-06-28 12:49 ` Bruce Richardson
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).