DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/nfp: fix field initialization in TX descriptor
@ 2018-06-11  9:50 Alejandro Lucero
  2018-06-14  9:17 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Lucero @ 2018-06-11  9:50 UTC (permalink / raw)
  To: dev; +Cc: stable

TX descriptor eop_offset field is not initialized and it could
contain garbage. This patch fixes the potential problem setting
EOP as the only subfield. The other subfield, data offset, is
not used by now.

Fixes: b812daadad0d ("nfp: add Rx and Tx")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index faad1ee..3658696 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2253,11 +2253,15 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
 				txq->wr_p = 0;
 
 			pkt_size -= dma_size;
-			if (!pkt_size)
-				/* End of packet */
-				txds->offset_eop |= PCIE_DESC_TX_EOP;
+
+			/*
+			 * Making the EOP, packets with just one segment
+			 * the priority
+			 */
+			if (likely(!pkt_size))
+				txds->offset_eop = PCIE_DESC_TX_EOP;
 			else
-				txds->offset_eop &= PCIE_DESC_TX_OFFSET_MASK;
+				txds->offset_eop = 0;
 
 			pkt = pkt->next;
 			/* Referencing next free TX descriptor */
-- 
1.9.1

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

* Re: [dpdk-dev] [PATCH] net/nfp: fix field initialization in TX descriptor
  2018-06-11  9:50 [dpdk-dev] [PATCH] net/nfp: fix field initialization in TX descriptor Alejandro Lucero
@ 2018-06-14  9:17 ` Ferruh Yigit
  2018-06-14 13:31   ` Alejandro Lucero
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-06-14  9:17 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 6/11/2018 10:50 AM, Alejandro Lucero wrote:
> TX descriptor eop_offset field is not initialized and it could
> contain garbage. This patch fixes the potential problem setting
> EOP as the only subfield. The other subfield, data offset, is
> not used by now.
> 
> Fixes: b812daadad0d ("nfp: add Rx and Tx")
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

stable flag:
     Cc: stable@dpdk.org

is the way to ask patches to be merged to stable trees.
In this patch is stable flag forgotten or intentionally not added?

I have added stable flag, but if this was intentionally left out please let me
know so that I can remove it back.

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

* Re: [dpdk-dev] [PATCH] net/nfp: fix field initialization in TX descriptor
  2018-06-14  9:17 ` Ferruh Yigit
@ 2018-06-14 13:31   ` Alejandro Lucero
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Lucero @ 2018-06-14 13:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, stable

Hi Ferruh,

On Thu, Jun 14, 2018 at 10:17 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 6/11/2018 10:50 AM, Alejandro Lucero wrote:
> > TX descriptor eop_offset field is not initialized and it could
> > contain garbage. This patch fixes the potential problem setting
> > EOP as the only subfield. The other subfield, data offset, is
> > not used by now.
> >
> > Fixes: b812daadad0d ("nfp: add Rx and Tx")
> >
> > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>
> Applied to dpdk-next-net/master, thanks.
>
>
Thanks!


> stable flag:
>      Cc: stable@dpdk.org
>
> is the way to ask patches to be merged to stable trees.
> In this patch is stable flag forgotten or intentionally not added?
>
> I have added stable flag, but if this was intentionally left out please
> let me
> know so that I can remove it back.
>

I though it was enough ccing to stable. I will add that flag in the commit
from now on.

Thanks

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

end of thread, other threads:[~2018-06-14 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11  9:50 [dpdk-dev] [PATCH] net/nfp: fix field initialization in TX descriptor Alejandro Lucero
2018-06-14  9:17 ` Ferruh Yigit
2018-06-14 13:31   ` Alejandro Lucero

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).