[dpdk-stable] [dpdk-dev] [PATCH] net/nfp: fix data offset initialization in TX descriptors
Alejandro Lucero
alejandro.lucero at netronome.com
Fri Jun 8 15:50:13 CEST 2018
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 at 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 at 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
>
>
More information about the stable
mailing list