* [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error @ 2021-09-28 8:40 Robin Zhang 2021-09-28 9:53 ` Kevin Traynor 2021-10-11 8:12 ` [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove Robin Zhang 0 siblings, 2 replies; 6+ messages in thread From: Robin Zhang @ 2021-09-28 8:40 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang Firmware will return I40E_AQ_RC_ENOENT when try to delete non-existent MAC/VLAN addresses from the HW filtering, this should not be considered as an Admin Queue error. But in i40e_asq_send_command, it will return I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin Queue command processed by Firmware is not I40E_AQ_RC_OK or I40E_AQ_RC_EBUSY. Use i40e_aq_remove_macvlan_v2 instead so that we can get the corresponding Admin Queue status, and not report as an error in DPDK when Firmware return I40E_AQ_RC_ENOENT. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index acbe7380b1..fdc9943034 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -7036,6 +7036,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, int ret = I40E_SUCCESS; struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); struct i40e_aqc_remove_macvlan_element_data *req_list; + enum i40e_admin_queue_err aq_status; if (filter == NULL || total == 0) return I40E_ERR_PARAM; @@ -7083,11 +7084,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, req_list[i].flags = rte_cpu_to_le_16(flags); } - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, - actual_num, NULL); + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, + actual_num, NULL, &aq_status); + if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); - goto DONE; + /* Do not report as an error when firmware returns ENOENT */ + if (aq_status == I40E_AQ_RC_ENOENT) { + ret = I40E_SUCCESS; + } else { + PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); + goto DONE; + } } num += actual_num; } while (num < total); -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error 2021-09-28 8:40 [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error Robin Zhang @ 2021-09-28 9:53 ` Kevin Traynor 2021-09-28 10:36 ` Zhang, RobinX 2021-10-11 8:12 ` [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove Robin Zhang 1 sibling, 1 reply; 6+ messages in thread From: Kevin Traynor @ 2021-09-28 9:53 UTC (permalink / raw) To: Robin Zhang, dev; +Cc: beilei.xing, junfeng.guo, stevex.yang On 28/09/2021 09:40, Robin Zhang wrote: > Firmware will return I40E_AQ_RC_ENOENT when try to delete non-existent > MAC/VLAN addresses from the HW filtering, this should not be considered as > an Admin Queue error. But in i40e_asq_send_command, it will return > I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin Queue command > processed by Firmware is not I40E_AQ_RC_OK or I40E_AQ_RC_EBUSY. > > Use i40e_aq_remove_macvlan_v2 instead so that we can get the corresponding > Admin Queue status, and not report as an error in DPDK when Firmware > return I40E_AQ_RC_ENOENT. > > Fixes: 4861cde46116 ("i40e: new poll mode driver") > Is it relevant to stable releases (20.11/19.11) with earlier firmware? https://git.dpdk.org/dpdk/tree/doc/guides/nics/i40e.rst#n101 > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index acbe7380b1..fdc9943034 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -7036,6 +7036,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, > int ret = I40E_SUCCESS; > struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); > struct i40e_aqc_remove_macvlan_element_data *req_list; > + enum i40e_admin_queue_err aq_status; > > if (filter == NULL || total == 0) > return I40E_ERR_PARAM; > @@ -7083,11 +7084,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, > req_list[i].flags = rte_cpu_to_le_16(flags); > } > > - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, > - actual_num, NULL); > + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, > + actual_num, NULL, &aq_status); > + > if (ret != I40E_SUCCESS) { > - PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); > - goto DONE; > + /* Do not report as an error when firmware returns ENOENT */ > + if (aq_status == I40E_AQ_RC_ENOENT) { > + ret = I40E_SUCCESS; > + } else { > + PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); > + goto DONE; > + } > } > num += actual_num; > } while (num < total); > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error 2021-09-28 9:53 ` Kevin Traynor @ 2021-09-28 10:36 ` Zhang, RobinX 2021-10-09 9:21 ` Zhang, Qi Z 0 siblings, 1 reply; 6+ messages in thread From: Zhang, RobinX @ 2021-09-28 10:36 UTC (permalink / raw) To: Kevin Traynor, dev; +Cc: Xing, Beilei, Guo, Junfeng, Yang, SteveX Hi, > -----Original Message----- > From: Kevin Traynor <ktraynor@redhat.com> > Sent: Tuesday, September 28, 2021 5:54 PM > To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses > error > > On 28/09/2021 09:40, Robin Zhang wrote: > > Firmware will return I40E_AQ_RC_ENOENT when try to delete non- > existent > > MAC/VLAN addresses from the HW filtering, this should not be > > considered as an Admin Queue error. But in i40e_asq_send_command, it > > will return I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin > > Queue command processed by Firmware is not I40E_AQ_RC_OK or > I40E_AQ_RC_EBUSY. > > > > Use i40e_aq_remove_macvlan_v2 instead so that we can get the > > corresponding Admin Queue status, and not report as an error in DPDK > > when Firmware return I40E_AQ_RC_ENOENT. > > > > Fixes: 4861cde46116 ("i40e: new poll mode driver") > > > > Is it relevant to stable releases (20.11/19.11) with earlier firmware? > https://git.dpdk.org/dpdk/tree/doc/guides/nics/i40e.rst#n101 > No, i40e_aq_remove_macvlan_v2 is added in latest i40e share code. So this patch cannot cc stable either. > > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > > --- > > drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- > > 1 file changed, 11 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index acbe7380b1..fdc9943034 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -7036,6 +7036,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, > > int ret = I40E_SUCCESS; > > struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); > > struct i40e_aqc_remove_macvlan_element_data *req_list; > > + enum i40e_admin_queue_err aq_status; > > > > if (filter == NULL || total == 0) > > return I40E_ERR_PARAM; > > @@ -7083,11 +7084,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi > *vsi, > > req_list[i].flags = rte_cpu_to_le_16(flags); > > } > > > > - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, > > - actual_num, NULL); > > + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, > > + actual_num, NULL, > &aq_status); > > + > > if (ret != I40E_SUCCESS) { > > - PMD_DRV_LOG(ERR, "Failed to remove macvlan > filter"); > > - goto DONE; > > + /* Do not report as an error when firmware returns > ENOENT */ > > + if (aq_status == I40E_AQ_RC_ENOENT) { > > + ret = I40E_SUCCESS; > > + } else { > > + PMD_DRV_LOG(ERR, "Failed to remove > macvlan filter"); > > + goto DONE; > > + } > > } > > num += actual_num; > > } while (num < total); > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error 2021-09-28 10:36 ` Zhang, RobinX @ 2021-10-09 9:21 ` Zhang, Qi Z 0 siblings, 0 replies; 6+ messages in thread From: Zhang, Qi Z @ 2021-10-09 9:21 UTC (permalink / raw) To: Zhang, RobinX, Kevin Traynor, dev Cc: Xing, Beilei, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Zhang, RobinX > Sent: Tuesday, September 28, 2021 6:36 PM > To: Kevin Traynor <ktraynor@redhat.com>; dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses > error > > Hi, > > > -----Original Message----- > > From: Kevin Traynor <ktraynor@redhat.com> > > Sent: Tuesday, September 28, 2021 5:54 PM > > To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org > > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng > > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> > > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN > > addresses error > > > > On 28/09/2021 09:40, Robin Zhang wrote: > > > Firmware will return I40E_AQ_RC_ENOENT when try to delete non- > > existent > > > MAC/VLAN addresses from the HW filtering, this should not be > > > considered as an Admin Queue error. But in i40e_asq_send_command, it > > > will return I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin > > > Queue command processed by Firmware is not I40E_AQ_RC_OK or > > I40E_AQ_RC_EBUSY. > > > > > > Use i40e_aq_remove_macvlan_v2 instead so that we can get the > > > corresponding Admin Queue status, and not report as an error in DPDK > > > when Firmware return I40E_AQ_RC_ENOENT. > > > > > > Fixes: 4861cde46116 ("i40e: new poll mode driver") > > > > > > > Is it relevant to stable releases (20.11/19.11) with earlier firmware? > > https://git.dpdk.org/dpdk/tree/doc/guides/nics/i40e.rst#n101 > > > > No, i40e_aq_remove_macvlan_v2 is added in latest i40e share code. > So this patch cannot cc stable either. To avoid confuse, lets remove the "fix" from this patch, Actually this is an AQ command upgrade to support new firmware and keep compatible with old firmware So the title could be "upgrade AQ command of MAC/VLAN remove" There might be the requirement to support new firmware in LTS release, but that should be covered by separated patches. > > > > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > > > --- > > > drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- > > > 1 file changed, 11 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > > b/drivers/net/i40e/i40e_ethdev.c index acbe7380b1..fdc9943034 100644 > > > --- a/drivers/net/i40e/i40e_ethdev.c > > > +++ b/drivers/net/i40e/i40e_ethdev.c > > > @@ -7036,6 +7036,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi > *vsi, > > > int ret = I40E_SUCCESS; > > > struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); > > > struct i40e_aqc_remove_macvlan_element_data *req_list; > > > + enum i40e_admin_queue_err aq_status; > > > > > > if (filter == NULL || total == 0) > > > return I40E_ERR_PARAM; > > > @@ -7083,11 +7084,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi > > *vsi, > > > req_list[i].flags = rte_cpu_to_le_16(flags); > > > } > > > > > > - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, > > > - actual_num, NULL); > > > + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, > > > + actual_num, NULL, > > &aq_status); > > > + > > > if (ret != I40E_SUCCESS) { > > > - PMD_DRV_LOG(ERR, "Failed to remove macvlan > > filter"); > > > - goto DONE; > > > + /* Do not report as an error when firmware returns > > ENOENT */ > > > + if (aq_status == I40E_AQ_RC_ENOENT) { > > > + ret = I40E_SUCCESS; > > > + } else { > > > + PMD_DRV_LOG(ERR, "Failed to remove > > macvlan filter"); > > > + goto DONE; > > > + } > > > } > > > num += actual_num; > > > } while (num < total); > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove 2021-09-28 8:40 [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error Robin Zhang 2021-09-28 9:53 ` Kevin Traynor @ 2021-10-11 8:12 ` Robin Zhang 2021-10-13 2:21 ` Zhang, Qi Z 1 sibling, 1 reply; 6+ messages in thread From: Robin Zhang @ 2021-10-11 8:12 UTC (permalink / raw) To: dev; +Cc: beilei.xing, qi.z.zhang, junfeng.guo, stevex.yang, Robin Zhang Firmware will return I40E_AQ_RC_ENOENT when try to delete non-existent MAC/VLAN addresses from the HW filtering, this should not be considered as an Admin Queue error. But in i40e_asq_send_command, it will return I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin Queue command processed by Firmware is not I40E_AQ_RC_OK or I40E_AQ_RC_EBUSY. Use i40e_aq_remove_macvlan_v2 instead so that we can get the corresponding Admin Queue status, and not report as an error in DPDK when Firmware return I40E_AQ_RC_ENOENT. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- v2: - To avoid confuse, remove the "fix" from patch title --- drivers/net/i40e/i40e_ethdev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index b00f9cd396..52f6c673be 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -7012,6 +7012,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, int ret = I40E_SUCCESS; struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); struct i40e_aqc_remove_macvlan_element_data *req_list; + enum i40e_admin_queue_err aq_status; if (filter == NULL || total == 0) return I40E_ERR_PARAM; @@ -7059,11 +7060,17 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, req_list[i].flags = rte_cpu_to_le_16(flags); } - ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, - actual_num, NULL); + ret = i40e_aq_remove_macvlan_v2(hw, vsi->seid, req_list, + actual_num, NULL, &aq_status); + if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); - goto DONE; + /* Do not report as an error when firmware returns ENOENT */ + if (aq_status == I40E_AQ_RC_ENOENT) { + ret = I40E_SUCCESS; + } else { + PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); + goto DONE; + } } num += actual_num; } while (num < total); -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove 2021-10-11 8:12 ` [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove Robin Zhang @ 2021-10-13 2:21 ` Zhang, Qi Z 0 siblings, 0 replies; 6+ messages in thread From: Zhang, Qi Z @ 2021-10-13 2:21 UTC (permalink / raw) To: Zhang, RobinX, dev; +Cc: Xing, Beilei, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Monday, October 11, 2021 4:13 PM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com>; Zhang, RobinX <robinx.zhang@intel.com> > Subject: [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove > > Firmware will return I40E_AQ_RC_ENOENT when try to delete non-existent Better to add firmware version it should be 8.4+ > MAC/VLAN addresses from the HW filtering, this should not be considered as > an Admin Queue error. But in i40e_asq_send_command, it will return > I40E_ERR_ADMIN_QUEUE_ERROR if the return value of Admin Queue > command processed by Firmware is not I40E_AQ_RC_OK or > I40E_AQ_RC_EBUSY. > > Use i40e_aq_remove_macvlan_v2 instead so that we can get the > corresponding Admin Queue status, and not report as an error in DPDK when > Firmware return I40E_AQ_RC_ENOENT. and it will not break with a old firmware > > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Applied to dpdk-next-net-intel after refine the commit log. Thanks Qi ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-13 2:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-28 8:40 [dpdk-dev] [PATCH] net/i40e: fix remove MAC/VLAN addresses error Robin Zhang 2021-09-28 9:53 ` Kevin Traynor 2021-09-28 10:36 ` Zhang, RobinX 2021-10-09 9:21 ` Zhang, Qi Z 2021-10-11 8:12 ` [dpdk-dev] [PATCH v2] net/i40e: upgrade AQ command of MAC/VLAN remove Robin Zhang 2021-10-13 2:21 ` Zhang, Qi Z
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).