patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/nfp: fix data offset initialization in TX descriptors
@ 2018-06-07 15:52 Alejandro Lucero
  2018-06-08 13:50 ` [dpdk-stable] [dpdk-dev] " Alejandro Lucero
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Lucero @ 2018-06-07 15:52 UTC (permalink / raw)
  To: dev; +Cc: stable

The mbuf struct allows to prepend metadata and the NFP TX
descriptors needs to give the data offset to the NIC.

There is no application using this metadata but it is possible
the PMD itself using it in the future for supporting hardware
offloads like OVS offload.

Also, this patch fixes a potential issue with the offset bits inside
the TX descriptor not being used nor initialized, but the firmware
checking it and doing the wrong thing if the offset bits contain
garbage.

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

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

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index faad1ee..14f7fc0 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2245,6 +2245,14 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
 			txds->data_len = txd.data_len;
 			txds->dma_addr_hi = (dma_addr >> 32) & 0xff;
 			txds->dma_addr_lo = (dma_addr & 0xffffffff);
+
+			/*
+			 * Prepend metadata?
+			 * NFP has just support for a 7 bits offset
+			 */
+			txds->offset_eop = (uint8_t)pkt->data_off &
+					   PCIE_DESC_TX_OFFSET_MASK;
+
 			ASSERT(free_descs > 0);
 			free_descs--;
 
-- 
1.9.1

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/nfp: fix data offset initialization in TX descriptors
  2018-06-07 15:52 [dpdk-stable] [PATCH] net/nfp: fix data offset initialization in TX descriptors Alejandro Lucero
@ 2018-06-08 13:50 ` Alejandro Lucero
  0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Lucero @ 2018-06-08 13:50 UTC (permalink / raw)
  To: dev; +Cc: stable

Please, ignore this patch. It is not clear yet if we need this. We thought
it was fixing a problem but we have doubts now.

I have changed the status of the patch to not applicable.

thanks

On Thu, Jun 7, 2018 at 4:52 PM, Alejandro Lucero <
alejandro.lucero@netronome.com> wrote:

> The mbuf struct allows to prepend metadata and the NFP TX
> descriptors needs to give the data offset to the NIC.
>
> There is no application using this metadata but it is possible
> the PMD itself using it in the future for supporting hardware
> offloads like OVS offload.
>
> Also, this patch fixes a potential issue with the offset bits inside
> the TX descriptor not being used nor initialized, but the firmware
> checking it and doing the wrong thing if the offset bits contain
> garbage.
>
> Fixes: b812daadad0d ("nfp: add Rx and Tx")
>
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> ---
>  drivers/net/nfp/nfp_net.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index faad1ee..14f7fc0 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -2245,6 +2245,14 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
>                         txds->data_len = txd.data_len;
>                         txds->dma_addr_hi = (dma_addr >> 32) & 0xff;
>                         txds->dma_addr_lo = (dma_addr & 0xffffffff);
> +
> +                       /*
> +                        * Prepend metadata?
> +                        * NFP has just support for a 7 bits offset
> +                        */
> +                       txds->offset_eop = (uint8_t)pkt->data_off &
> +                                          PCIE_DESC_TX_OFFSET_MASK;
> +
>                         ASSERT(free_descs > 0);
>                         free_descs--;
>
> --
> 1.9.1
>
>

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 15:52 [dpdk-stable] [PATCH] net/nfp: fix data offset initialization in TX descriptors Alejandro Lucero
2018-06-08 13:50 ` [dpdk-stable] [dpdk-dev] " 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).