* [dpdk-dev] [PATCH] net/i40e: add return check coverity
@ 2019-07-18 13:16 Herakliusz Lipiec
2019-07-18 14:10 ` Xing, Beilei
2019-07-18 14:44 ` [dpdk-dev] [PATCH v2] " Herakliusz Lipiec
0 siblings, 2 replies; 5+ messages in thread
From: Herakliusz Lipiec @ 2019-07-18 13:16 UTC (permalink / raw)
To: Beilei Xing, Qi Zhang; +Cc: dev, Herakliusz Lipiec, stable
add return check for i40e_vsi_delete_mac call in
rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
Coverity Issue: 277224
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
---
drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 24281c293..4c3c7088a 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
struct i40e_pf_vf *vf;
struct i40e_vsi *vsi;
struct i40e_pf *pf;
+ int ret;
if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
return -EINVAL;
@@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
/* Remove the mac */
- i40e_vsi_delete_mac(vsi, mac_addr);
-
+ ret = i40e_vsi_delete_mac(vsi, mac_addr);
+ if (ret != I40E_SUCCESS)
+ return ret;
return 0;
}
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: add return check coverity
2019-07-18 13:16 [dpdk-dev] [PATCH] net/i40e: add return check coverity Herakliusz Lipiec
@ 2019-07-18 14:10 ` Xing, Beilei
2019-07-18 14:44 ` [dpdk-dev] [PATCH v2] " Herakliusz Lipiec
1 sibling, 0 replies; 5+ messages in thread
From: Xing, Beilei @ 2019-07-18 14:10 UTC (permalink / raw)
To: Lipiec, Herakliusz, Zhang, Qi Z; +Cc: dev, stable
Hi,
> -----Original Message-----
> From: Lipiec, Herakliusz
> Sent: Thursday, July 18, 2019 9:16 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Lipiec, Herakliusz <herakliusz.lipiec@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/i40e: add return check coverity
>
> add return check for i40e_vsi_delete_mac call in
> rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
>
> Coverity Issue: 277224
Fix line should be added, thanks.
> Cc: stable@dpdk.org
> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
> ---
> drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/rte_pmd_i40e.c
> b/drivers/net/i40e/rte_pmd_i40e.c index 24281c293..4c3c7088a 100644
> --- a/drivers/net/i40e/rte_pmd_i40e.c
> +++ b/drivers/net/i40e/rte_pmd_i40e.c
> @@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port,
> uint16_t vf_id,
> struct i40e_pf_vf *vf;
> struct i40e_vsi *vsi;
> struct i40e_pf *pf;
> + int ret;
>
> if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
> return -EINVAL;
> @@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port,
> uint16_t vf_id,
> rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
>
> /* Remove the mac */
> - i40e_vsi_delete_mac(vsi, mac_addr);
> -
> + ret = i40e_vsi_delete_mac(vsi, mac_addr);
> + if (ret != I40E_SUCCESS)
> + return ret;
> return 0;
> }
>
> --
> 2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: add return check coverity
2019-07-18 13:16 [dpdk-dev] [PATCH] net/i40e: add return check coverity Herakliusz Lipiec
2019-07-18 14:10 ` Xing, Beilei
@ 2019-07-18 14:44 ` Herakliusz Lipiec
2019-07-19 0:53 ` Xing, Beilei
1 sibling, 1 reply; 5+ messages in thread
From: Herakliusz Lipiec @ 2019-07-18 14:44 UTC (permalink / raw)
To: Beilei Xing, Qi Zhang; +Cc: dev, Herakliusz Lipiec, stable
add return check for i40e_vsi_delete_mac call in
rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
v2:
add a fixline to commit message
Coverity Issue: 277224
Cc: stable@dpdk.org
Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
---
drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 24281c293..4c3c7088a 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
struct i40e_pf_vf *vf;
struct i40e_vsi *vsi;
struct i40e_pf *pf;
+ int ret;
if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
return -EINVAL;
@@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
/* Remove the mac */
- i40e_vsi_delete_mac(vsi, mac_addr);
-
+ ret = i40e_vsi_delete_mac(vsi, mac_addr);
+ if (ret != I40E_SUCCESS)
+ return ret;
return 0;
}
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: add return check coverity
2019-07-18 14:44 ` [dpdk-dev] [PATCH v2] " Herakliusz Lipiec
@ 2019-07-19 0:53 ` Xing, Beilei
2019-07-19 1:00 ` Zhang, Qi Z
0 siblings, 1 reply; 5+ messages in thread
From: Xing, Beilei @ 2019-07-19 0:53 UTC (permalink / raw)
To: Lipiec, Herakliusz, Zhang, Qi Z; +Cc: dev, stable
> -----Original Message-----
> From: Lipiec, Herakliusz
> Sent: Thursday, July 18, 2019 10:45 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Lipiec, Herakliusz <herakliusz.lipiec@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] net/i40e: add return check coverity
>
> add return check for i40e_vsi_delete_mac call in
> rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
>
> v2:
> add a fixline to commit message
>
> Coverity Issue: 277224
> Cc: stable@dpdk.org
> Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
> ---
> drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/rte_pmd_i40e.c
> b/drivers/net/i40e/rte_pmd_i40e.c index 24281c293..4c3c7088a 100644
> --- a/drivers/net/i40e/rte_pmd_i40e.c
> +++ b/drivers/net/i40e/rte_pmd_i40e.c
> @@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port,
> uint16_t vf_id,
> struct i40e_pf_vf *vf;
> struct i40e_vsi *vsi;
> struct i40e_pf *pf;
> + int ret;
>
> if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
> return -EINVAL;
> @@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port,
> uint16_t vf_id,
> rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
>
> /* Remove the mac */
> - i40e_vsi_delete_mac(vsi, mac_addr);
> -
> + ret = i40e_vsi_delete_mac(vsi, mac_addr);
> + if (ret != I40E_SUCCESS)
> + return ret;
> return 0;
> }
>
> --
> 2.17.2
Acked-by: Beilei Xing <beilei.xing@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: add return check coverity
2019-07-19 0:53 ` Xing, Beilei
@ 2019-07-19 1:00 ` Zhang, Qi Z
0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-07-19 1:00 UTC (permalink / raw)
To: Xing, Beilei, Lipiec, Herakliusz; +Cc: dev, stable
> -----Original Message-----
> From: Xing, Beilei
> Sent: Friday, July 19, 2019 8:54 AM
> To: Lipiec, Herakliusz <herakliusz.lipiec@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/i40e: add return check coverity
>
>
>
> > -----Original Message-----
> > From: Lipiec, Herakliusz
> > Sent: Thursday, July 18, 2019 10:45 PM
> > To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Lipiec, Herakliusz <herakliusz.lipiec@intel.com>;
> > stable@dpdk.org
> > Subject: [PATCH v2] net/i40e: add return check coverity
> >
> > add return check for i40e_vsi_delete_mac call in
> > rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
> >
> > v2:
> > add a fixline to commit message
Change version should be after "---", so it will not be included in commit log.
> >
> > Coverity Issue: 277224
> > Cc: stable@dpdk.org
> > Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
> > Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
> > ---
>
> Acked-by: Beilei Xing <beilei.xing@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-19 1:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 13:16 [dpdk-dev] [PATCH] net/i40e: add return check coverity Herakliusz Lipiec
2019-07-18 14:10 ` Xing, Beilei
2019-07-18 14:44 ` [dpdk-dev] [PATCH v2] " Herakliusz Lipiec
2019-07-19 0:53 ` Xing, Beilei
2019-07-19 1:00 ` 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).