DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Tomasz Duszynski <tdu@semihalf.com>, dev@dpdk.org
Cc: mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com,
	Jianbo.liu@arm.com, jck@semihalf.com
Subject: Re: [dpdk-dev] [PATCH 1/2] net/mrvl: switch to the new Rx offload API
Date: Mon, 22 Jan 2018 17:53:45 +0000	[thread overview]
Message-ID: <928d3a16-5417-8a20-3d9b-78dba6802e66@intel.com> (raw)
In-Reply-To: <1516622670-21120-2-git-send-email-tdu@semihalf.com>

On 1/22/2018 12:04 PM, Tomasz Duszynski wrote:
> Since the old Rx offload API is now depracated
> update the driver to use the latest one.
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>

<...>

> @@ -1308,6 +1313,42 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
>  }
>  
>  /**
> + * Check whether requested rx queue offloads match port offloads.
> + *
> + * @param
> + *   dev Pointer to the device.
> + * @param
> + *   requested Bitmap of the requested offloads.
> + *
> + * @return
> + *   1 if requested offloads are okay, 0 otherwise.
> + */
> +static int
> +mrvl_rx_queue_offloads_okay(struct rte_eth_dev *dev, uint64_t requested)
> +{
> +	uint64_t mandatory = dev->data->dev_conf.rxmode.offloads;
> +	uint64_t supported = MRVL_RX_OFFLOADS;
> +	uint64_t unsupported = requested & ~supported;
> +	uint64_t missing = (requested & mandatory) ^ mandatory;

Isn't this same as:
missing = mandatory & ~requested;

Since "unsupported" use same logic, it can be easier to understand this way.

Or just putting following comment may be useful enough:
"mandatory subset of requested subset of supported", assuming it is correct :)

<...>

  reply	other threads:[~2018-01-22 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 12:04 [dpdk-dev] [PATCH 0/2] switch to the new Rx/Tx offloads API Tomasz Duszynski
2018-01-22 12:04 ` [dpdk-dev] [PATCH 1/2] net/mrvl: switch to the new Rx offload API Tomasz Duszynski
2018-01-22 17:53   ` Ferruh Yigit [this message]
2018-01-23  8:14     ` Tomasz Duszynski
2018-01-22 12:04 ` [dpdk-dev] [PATCH 2/2] net/mrvl: switch to the new Tx " Tomasz Duszynski
2018-01-23  8:46 ` [dpdk-dev] [PATCH v2 0/2] net/mrvl: switch to the new Rx/Tx offloads API Tomasz Duszynski
2018-01-23  8:46   ` [dpdk-dev] [PATCH v2 1/2] net/mrvl: switch to the new Rx offload API Tomasz Duszynski
2018-01-23  8:46   ` [dpdk-dev] [PATCH v2 2/2] net/mrvl: switch to the new Tx " Tomasz Duszynski
2018-01-24 15:59   ` [dpdk-dev] [PATCH v2 0/2] net/mrvl: switch to the new Rx/Tx offloads API Ferruh Yigit

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=928d3a16-5417-8a20-3d9b-78dba6802e66@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Jianbo.liu@arm.com \
    --cc=dev@dpdk.org \
    --cc=dima@marvell.com \
    --cc=jck@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=nsamsono@marvell.com \
    --cc=tdu@semihalf.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).