DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rafal Kozik <rk@semihalf.com>,
	dev@dpdk.org, Shahaf Shuler <shahafs@mellanox.com>
Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com,
	evgenys@amazon.com,  matua@amazon.com, igorch@amazon.com
Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/ena: convert to new Tx offloads API
Date: Wed, 17 Jan 2018 18:58:08 +0000	[thread overview]
Message-ID: <953fa892-d65f-2aca-9909-a812ef6a18c4@intel.com> (raw)
In-Reply-To: <1516177424-8613-1-git-send-email-rk@semihalf.com>

On 1/17/2018 8:23 AM, Rafal Kozik wrote:
> Ethdev Tx offloads API has changed since:
> 
> commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
> 
> This commit support the new Tx offloads API. Queue configuration
> is stored in ena_ring.offloads. During preparing mbufs for tx, offloads are
> allowed only if appropriate flags in this field are set.
> 
> Signed-off-by: Rafal Kozik <rk@semihalf.com>

<...>

> @@ -280,21 +290,24 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
>  }
>  
>  static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
> -				       struct ena_com_tx_ctx *ena_tx_ctx)
> +				       struct ena_com_tx_ctx *ena_tx_ctx,
> +				       uint64_t queue_offloads)
>  {
>  	struct ena_com_tx_meta *ena_meta = &ena_tx_ctx->ena_meta;
>  
> -	if (mbuf->ol_flags &
> -	    (PKT_TX_L4_MASK | PKT_TX_IP_CKSUM | PKT_TX_TCP_SEG)) {
> +	if ((mbuf->ol_flags & MBUF_OFFLOADS) &&
> +	    (queue_offloads & QUEUE_OFFLOADS)) {
>  		/* check if TSO is required */
> -		if (mbuf->ol_flags & PKT_TX_TCP_SEG) {
> +		if ((mbuf->ol_flags & PKT_TX_TCP_SEG) &&
> +		    (queue_offloads & DEV_TX_OFFLOAD_TCP_TSO)) {
>  			ena_tx_ctx->tso_enable = true;
>  
>  			ena_meta->l4_hdr_len = GET_L4_HDR_LEN(mbuf);
>  		}
>  
>  		/* check if L3 checksum is needed */
> -		if (mbuf->ol_flags & PKT_TX_IP_CKSUM)
> +		if ((mbuf->ol_flags & PKT_TX_IP_CKSUM) &&
> +		    (queue_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM))
>  			ena_tx_ctx->l3_csum_enable = true;

This function is fast path right?
Do you really need new extra check to queue_offloads, isn't that information is
for setup phase?

  reply	other threads:[~2018-01-17 18:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 11:52 [dpdk-dev] [PATCH 0/2] net/ena: convert to new " Rafal Kozik
2018-01-16 11:52 ` [dpdk-dev] [PATCH 1/2] net/ena: convert to new Tx " Rafal Kozik
2018-01-17  6:56   ` Shahaf Shuler
2018-01-17 18:58     ` Ferruh Yigit
2018-01-18  6:26       ` Shahaf Shuler
2018-01-18 14:49         ` Ferruh Yigit
2018-01-17  8:23   ` [dpdk-dev] [PATCH v2 " Rafal Kozik
2018-01-17 18:58     ` Ferruh Yigit [this message]
2018-01-18  9:18       ` Rafał Kozik
2018-01-18 14:49         ` Ferruh Yigit
2018-01-18 14:53     ` Ferruh Yigit
2018-01-18 14:59       ` Michał Krawczyk
2018-01-18 15:12         ` Ferruh Yigit
2018-01-16 11:52 ` [dpdk-dev] [PATCH 2/2] net/ena: convert to new Rx " Rafal Kozik
2018-01-17  6:57   ` Shahaf Shuler
2018-01-17  8:26   ` [dpdk-dev] [PATCH v2 " Rafal Kozik
2018-01-18 15:06     ` Michał Krawczyk

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=953fa892-d65f-2aca-9909-a812ef6a18c4@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=gtzalik@amazon.com \
    --cc=igorch@amazon.com \
    --cc=matua@amazon.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=rk@semihalf.com \
    --cc=shahafs@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).