DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Gregory Etelson <getelson@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix dynamic inline hint handling
Date: Thu, 23 Jul 2020 14:50:38 +0000	[thread overview]
Message-ID: <AM0PR05MB67076496F9DA85CE05E4FD4EC2760@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200723142106.2391-1-getelson@mellanox.com>

Hi,

> -----Original Message-----
> From: Gregory Etelson <getelson@mellanox.com>
> Sent: Thursday, July 23, 2020 5:21 PM
> To: dev@dpdk.org
> Cc: Gregory Etelson <getelson@mellanox.com>; Matan Azrad
> <matan@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>;
> Slava Ovsiienko <viacheslavo@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>
> Subject: [PATCH v2] net/mlx5: fix dynamic inline hint handling
> 
> The ConnectX NICs can transfer data from the host memory with two
> approaches: provide the pointer to the data buffer, or do data inline
> - copy the data to the transmit descriptor (WQE) entirely or only the
> part of data. In some configurations the NIC hardware requires the
> minimal data to be inline in the descriptor to operate correctly. And
> there is the special dynamic flag to hint PMD not to inline the data
> (for example, if buffer is located on some other device - storage or
> GPU) on per packet basis.
> 
> If there was a packet with length shorter than the minimal inline data
> length requested by the NIC hardware and the no-inline hint was set
> the PMD tried to inline the packet with minimal required length
> instead of actual packet's one.  This patch adds the missed length
> check into no-inline hint handling branch.
> 
> Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")
Added missing Cc: stable@dpdk.org

> 
> Signed-off-by: Gregory Etelson <getelson@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 3eb0243603..1b71e94221 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -4739,6 +4739,8 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data
> *__rte_restrict txq,
>  					      txq->inlen_mode) ||
>  					    (MLX5_TXOFF_CONFIG(MPW) &&
>  					     txq->inlen_mode)) {
> +						if (inlen <= txq->inlen_send)
> +							goto single_inline;
>  						/*
>  						 * The hardware requires the
>  						 * minimal inline data header.
> @@ -4755,6 +4757,7 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data
> *__rte_restrict txq,
>  					}
>  					goto single_no_inline;
>  				}
> +single_inline:
>  				/*
>  				 * Completely inlined packet data WQE:
>  				 * - Control Segment, SEND opcode
> --
> 2.25.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      reply	other threads:[~2020-07-23 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 14:21 Gregory Etelson
2020-07-23 14:50 ` Raslan Darawsheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR05MB67076496F9DA85CE05E4FD4EC2760@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=getelson@mellanox.com \
    --cc=matan@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).