DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: set flags while adding vsi
@ 2025-03-11 21:40 Matthew Smith
  2025-03-13 17:50 ` Medvedkin, Vladimir
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Smith @ 2025-03-11 21:40 UTC (permalink / raw)
  To: dev; +Cc: Matthew Smith

While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB
flag. This will prevent packets from being dropped when using a virtual
MAC address with VRRP.

Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted
packets from being looped back in some circumstances.

Fixes: f9cf4f864150 ("net/ice: support device initialization")

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
---
 drivers/net/intel/ice/ice_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 3cdfa16f77..21d3795954 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -1696,6 +1696,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
 		 * by ice_init_hw
 		 */
 		vsi_ctx.info.sw_id = hw->port_info->sw_id;
+		vsi_ctx.info.sw_flags = ICE_AQ_VSI_SW_FLAG_LOCAL_LB;
+		vsi_ctx.info.sw_flags |= ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
+		cfg = ICE_AQ_VSI_PROP_SW_VALID;
+		vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
 		vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
 		/* Allow all untagged or tagged packets */
 		vsi_ctx.info.inner_vlan_flags = ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL;
-- 
2.34.1


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

* Re: [PATCH] net/ice: set flags while adding vsi
  2025-03-11 21:40 [PATCH] net/ice: set flags while adding vsi Matthew Smith
@ 2025-03-13 17:50 ` Medvedkin, Vladimir
  2025-03-13 18:06   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Medvedkin, Vladimir @ 2025-03-13 17:50 UTC (permalink / raw)
  To: Matthew Smith, dev

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 11/03/2025 21:40, Matthew Smith wrote:
> While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB
> flag. This will prevent packets from being dropped when using a virtual
> MAC address with VRRP.
>
> Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted
> packets from being looped back in some circumstances.
>
> Fixes: f9cf4f864150 ("net/ice: support device initialization")
>
> Signed-off-by: Matthew Smith <mgsmith@netgate.com>
> ---
>   drivers/net/intel/ice/ice_ethdev.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
> index 3cdfa16f77..21d3795954 100644
> --- a/drivers/net/intel/ice/ice_ethdev.c
> +++ b/drivers/net/intel/ice/ice_ethdev.c
> @@ -1696,6 +1696,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
>   		 * by ice_init_hw
>   		 */
>   		vsi_ctx.info.sw_id = hw->port_info->sw_id;
> +		vsi_ctx.info.sw_flags = ICE_AQ_VSI_SW_FLAG_LOCAL_LB;
> +		vsi_ctx.info.sw_flags |= ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
> +		cfg = ICE_AQ_VSI_PROP_SW_VALID;
> +		vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
>   		vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
>   		/* Allow all untagged or tagged packets */
>   		vsi_ctx.info.inner_vlan_flags = ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL;

-- 
Regards,
Vladimir


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

* Re: [PATCH] net/ice: set flags while adding vsi
  2025-03-13 17:50 ` Medvedkin, Vladimir
@ 2025-03-13 18:06   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-03-13 18:06 UTC (permalink / raw)
  To: Medvedkin, Vladimir; +Cc: Matthew Smith, dev

On Thu, Mar 13, 2025 at 05:50:56PM +0000, Medvedkin, Vladimir wrote:
> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> 
> On 11/03/2025 21:40, Matthew Smith wrote:
> > While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB
> > flag. This will prevent packets from being dropped when using a virtual
> > MAC address with VRRP.
> > 
> > Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted
> > packets from being looped back in some circumstances.
> > 
> > Fixes: f9cf4f864150 ("net/ice: support device initialization")
> > 
> > Signed-off-by: Matthew Smith <mgsmith@netgate.com>
> > ---
> >   drivers/net/intel/ice/ice_ethdev.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 

Applied to dpdk-next-net-intel with title "net/ice: fix dropped packets
when using VRRP" and put stable@dpdk.org on CC, since it's a bug fix.

Thanks,
/Bruce

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

end of thread, other threads:[~2025-03-13 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-11 21:40 [PATCH] net/ice: set flags while adding vsi Matthew Smith
2025-03-13 17:50 ` Medvedkin, Vladimir
2025-03-13 18:06   ` 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).