dpdk: patch i40e PMD to disable source pruning
[vpp.git] / build / external / patches / dpdk_21.05 / 0001-net-i40e-disable-source-pruning-on-pf.patch
1 From 7f12cf029c8be96314711bd02b3ea8b2d180d8ca Mon Sep 17 00:00:00 2001
2 From: Matthew Smith <mgsmith@netgate.com>
3 Date: Fri, 2 Jul 2021 15:09:25 -0500
4 Subject: [PATCH] net/i40e: disable source pruning on pf
5
6 VRRP advertisement packets are dropped on X710 and XL710 devices
7 because when a MAC address is added to a device, packets originating
8 from that MAC address are dropped. We disable source pruning to work
9 around that issue.
10
11 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
12 ---
13  drivers/net/i40e/i40e_ethdev.c | 14 ++++++++++++++
14  1 file changed, 14 insertions(+)
15
16 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
17 index dd61258739..f5d2a262ec 100644
18 --- a/drivers/net/i40e/i40e_ethdev.c
19 +++ b/drivers/net/i40e/i40e_ethdev.c
20 @@ -5794,6 +5794,20 @@ i40e_vsi_setup(struct i40e_pf *pf,
21                  * interrupt from device side only.
22                  */
23  
24 +               /* disable source pruning */
25 +               memset(&ctxt, 0, sizeof(ctxt));
26 +               ctxt.seid = vsi->seid;
27 +               ctxt.pf_num = hw->pf_id;
28 +               ctxt.vf_num = 0;
29 +               ctxt.info.valid_sections |=
30 +                       rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
31 +               ctxt.info.switch_id =
32 +                       rte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_LOCAL_LB);
33 +               ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
34 +               if (ret != I40E_SUCCESS) {
35 +                       PMD_DRV_LOG(ERR, "Failed to disable source pruning");
36 +               }
37 +
38                 /* Get default VSI parameters from hardware */
39                 memset(&ctxt, 0, sizeof(ctxt));
40                 ctxt.seid = vsi->seid;
41 -- 
42 2.30.1 (Apple Git-130)
43