[dpdk-dev] ixgbe: fix unused value

Message ID 1464883282-75631-1-git-send-email-danielx.t.mrzyglod@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Daniel Mrzyglod June 2, 2016, 4:01 p.m. UTC
  An assigned value that is never used may represent unnecessary computation,
an incorrect algorithm, or possibly the need for cleanup or refactoring.

In reassemble_packets: A value assigned to a variable is never used.

Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")
Coverity ID 13335

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Bruce Richardson June 27, 2016, 4:29 p.m. UTC | #1
On Thu, Jun 02, 2016 at 06:01:22PM +0200, Daniel Mrzyglod wrote:
> An assigned value that is never used may represent unnecessary computation,
> an incorrect algorithm, or possibly the need for cleanup or refactoring.
> 
> In reassemble_packets: A value assigned to a variable is never used.
> 
> Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")
> Coverity ID 13335
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
Fix now needs to be applied to ixgbe_rxtx_vec_common.h since the ixgbe vector
rework, but since it's only a one-line change it's easy enough to fix on apply.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Bruce Richardson June 27, 2016, 4:33 p.m. UTC | #2
On Mon, Jun 27, 2016 at 05:29:35PM +0100, Bruce Richardson wrote:
> On Thu, Jun 02, 2016 at 06:01:22PM +0200, Daniel Mrzyglod wrote:
> > An assigned value that is never used may represent unnecessary computation,
> > an incorrect algorithm, or possibly the need for cleanup or refactoring.
> > 
> > In reassemble_packets: A value assigned to a variable is never used.
> > 
> > Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")
> > Coverity ID 13335
> > 
> > Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> > ---
> Fix now needs to be applied to ixgbe_rxtx_vec_common.h since the ixgbe vector
> rework, but since it's only a one-line change it's easy enough to fix on apply.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
Applied to dpdk-next-net/rel_16_07 with updated commit message.

/Bruce
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
index e97ea82..61c7aad 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
@@ -458,7 +458,6 @@  reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 							end->data_len);
 					secondlast->next = NULL;
 					rte_pktmbuf_free_seg(end);
-					end = secondlast;
 				}
 				pkts[pkt_idx++] = start;
 				start = end = NULL;