* [dpdk-dev] [PATCH] i40e: fix unchecked return value
@ 2016-05-24 7:25 Daniel Mrzyglod
2016-05-25 10:42 ` Thomas Monjalon
2016-06-13 10:09 ` Bruce Richardson
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Mrzyglod @ 2016-05-24 7:25 UTC (permalink / raw)
To: helin.zhang, jingjing.wu; +Cc: dev, Daniel Mrzyglod
Calling i40e_switch_rx_queue without checking return value.
Fixed by add warning log information if return failed.
Fixes: 71d35259ff67 ("i40e: tear down flow director")
Coverity ID 13198
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 8aa41e5..ce6d916 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -288,12 +288,15 @@ i40e_fdir_teardown(struct i40e_pf *pf)
{
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
struct i40e_vsi *vsi;
+ int err = I40E_SUCCESS;
vsi = pf->fdir.fdir_vsi;
if (!vsi)
return;
i40e_switch_tx_queue(hw, vsi->base_queue, FALSE);
- i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
+ err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
+ if (err)
+ PMD_DRV_LOG(WARNING, "Failed to do FDIR RX switch off.");
i40e_dev_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
i40e_dev_tx_queue_release(pf->fdir.txq);
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: fix unchecked return value
2016-05-24 7:25 [dpdk-dev] [PATCH] i40e: fix unchecked return value Daniel Mrzyglod
@ 2016-05-25 10:42 ` Thomas Monjalon
2016-05-26 9:27 ` Mcnamara, John
2016-06-13 10:09 ` Bruce Richardson
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2016-05-25 10:42 UTC (permalink / raw)
To: dev, Daniel Mrzyglod; +Cc: helin.zhang, jingjing.wu, Mcnamara, John
2016-05-24 09:25, Daniel Mrzyglod:
> Fixes: 71d35259ff67 ("i40e: tear down flow director")
> Coverity ID 13198
FYI, in recent commits I've started to standardize the coverity reports
like that:
Coverity issue: XXXXX
Fixes: ...
Please spread the word.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: fix unchecked return value
2016-05-25 10:42 ` Thomas Monjalon
@ 2016-05-26 9:27 ` Mcnamara, John
0 siblings, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2016-05-26 9:27 UTC (permalink / raw)
To: Thomas Monjalon, dev, Mrzyglod, DanielX T; +Cc: Zhang, Helin, Wu, Jingjing
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, May 25, 2016 11:43 AM
> To: dev@dpdk.org; Mrzyglod, DanielX T <danielx.t.mrzyglod@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Mcnamara, John <john.mcnamara@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] i40e: fix unchecked return value
>
> 2016-05-24 09:25, Daniel Mrzyglod:
> > Fixes: 71d35259ff67 ("i40e: tear down flow director") Coverity ID
> > 13198
>
> FYI, in recent commits I've started to standardize the coverity reports
> like that:
>
> Coverity issue: XXXXX
> Fixes: ...
>
> Please spread the word.
Will do.
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: fix unchecked return value
2016-05-24 7:25 [dpdk-dev] [PATCH] i40e: fix unchecked return value Daniel Mrzyglod
2016-05-25 10:42 ` Thomas Monjalon
@ 2016-06-13 10:09 ` Bruce Richardson
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2016-06-13 10:09 UTC (permalink / raw)
To: Daniel Mrzyglod; +Cc: helin.zhang, jingjing.wu, dev
On Tue, May 24, 2016 at 09:25:34AM +0200, Daniel Mrzyglod wrote:
> Calling i40e_switch_rx_queue without checking return value.
> Fixed by add warning log information if return failed.
>
> Fixes: 71d35259ff67 ("i40e: tear down flow director")
> Coverity ID 13198
>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
> drivers/net/i40e/i40e_fdir.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
> index 8aa41e5..ce6d916 100644
> --- a/drivers/net/i40e/i40e_fdir.c
> +++ b/drivers/net/i40e/i40e_fdir.c
> @@ -288,12 +288,15 @@ i40e_fdir_teardown(struct i40e_pf *pf)
> {
> struct i40e_hw *hw = I40E_PF_TO_HW(pf);
> struct i40e_vsi *vsi;
> + int err = I40E_SUCCESS;
>
> vsi = pf->fdir.fdir_vsi;
> if (!vsi)
> return;
> i40e_switch_tx_queue(hw, vsi->base_queue, FALSE);
> - i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
> + err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
> + if (err)
> + PMD_DRV_LOG(WARNING, "Failed to do FDIR RX switch off.");
> i40e_dev_rx_queue_release(pf->fdir.rxq);
Please see my comments to the equivalent fix on the TX side, as I believe they
apply here too.
Ref: http://dpdk.org/dev/patchwork/patch/12940/
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-13 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 7:25 [dpdk-dev] [PATCH] i40e: fix unchecked return value Daniel Mrzyglod
2016-05-25 10:42 ` Thomas Monjalon
2016-05-26 9:27 ` Mcnamara, John
2016-06-13 10:09 ` 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).