All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxgbe: fix unnecessary check for freelist existence while freeing rxq
@ 2015-12-11  8:25 Rahul Lakkireddy
  2015-12-11 14:44 ` Mcnamara, John
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Lakkireddy @ 2015-12-11  8:25 UTC (permalink / raw)
  To: dev; +Cc: Felix Marti, Kumar Sanghvi, Nirranjan Kirubaharan

When refilling freelists for the first time and if it fails, the rxq
is freed and returns ENOMEM. There is a check while freeing hardware rxq
to pass freelist context id if the freelist exists or 0xffff otherwise.
The error path is only reached if freelist exists. So, fix is to remove
the useless check for freelist existence.

Thanks to John McNamara <john.mcnamara@intel.com> for reporting it.

Coverity issue: 107108
Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 51449e0..3c62d03 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1823,7 +1823,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 
 refill_fl_err:
 	t4_iq_free(adap, adap->mbox, adap->pf, 0, FW_IQ_TYPE_FL_INT_CAP,
-		   iq->cntxt_id, fl ? fl->cntxt_id : 0xffff, 0xffff);
+		   iq->cntxt_id, fl->cntxt_id, 0xffff);
 fl_nomem:
 	ret = -ENOMEM;
 err:
-- 
2.5.3

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

* Re: [PATCH] cxgbe: fix unnecessary check for freelist existence while freeing rxq
  2015-12-11  8:25 [PATCH] cxgbe: fix unnecessary check for freelist existence while freeing rxq Rahul Lakkireddy
@ 2015-12-11 14:44 ` Mcnamara, John
  2015-12-12 23:55   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Mcnamara, John @ 2015-12-11 14:44 UTC (permalink / raw)
  To: Rahul Lakkireddy, dev; +Cc: Kumar Sanghvi, Felix Marti, Nirranjan Kirubaharan

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rahul Lakkireddy
> Sent: Friday, December 11, 2015 8:26 AM
> To: dev@dpdk.org
> Cc: Felix Marti; Kumar Sanghvi; Nirranjan Kirubaharan
> Subject: [dpdk-dev] [PATCH] cxgbe: fix unnecessary check for freelist
> existence while freeing rxq
> 
> When refilling freelists for the first time and if it fails, the rxq is
> freed and returns ENOMEM. There is a check while freeing hardware rxq to
> pass freelist context id if the freelist exists or 0xffff otherwise.
> The error path is only reached if freelist exists. So, fix is to remove
> the useless check for freelist existence.
> 
> Thanks to John McNamara <john.mcnamara@intel.com> for reporting it.
> 
> Coverity issue: 107108
> Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")
> 
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>

Thanks for updating the Coverity Triage for the issue.

Acked-by: John McNamara <john.mcnamara@intel.com>

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

* Re: [PATCH] cxgbe: fix unnecessary check for freelist existence while freeing rxq
  2015-12-11 14:44 ` Mcnamara, John
@ 2015-12-12 23:55   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-12-12 23:55 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dev, Felix Marti, Nirranjan Kirubaharan, Kumar Sanghvi

> > When refilling freelists for the first time and if it fails, the rxq is
> > freed and returns ENOMEM. There is a check while freeing hardware rxq to
> > pass freelist context id if the freelist exists or 0xffff otherwise.
> > The error path is only reached if freelist exists. So, fix is to remove
> > the useless check for freelist existence.
> > 
> > Thanks to John McNamara <john.mcnamara@intel.com> for reporting it.
> > 
> > Coverity issue: 107108
> > Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")
> > 
> > Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> > Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
> 
> Thanks for updating the Coverity Triage for the issue.
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-12-12 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11  8:25 [PATCH] cxgbe: fix unnecessary check for freelist existence while freeing rxq Rahul Lakkireddy
2015-12-11 14:44 ` Mcnamara, John
2015-12-12 23:55   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.