patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: <viveksharma@marvell.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@intel.com>,
	<arybchenko@solarflare.com>, <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix QinQ strip offload support
Date: Mon, 15 Apr 2019 08:54:35 -0700	[thread overview]
Message-ID: <20190415085435.3f616c8c@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1555240302-9771-1-git-send-email-viveksharma@marvell.com>

On Sun, 14 Apr 2019 16:41:42 +0530
<viveksharma@marvell.com> wrote:

>  
> +	cur = !!(offload_mask & ETH_QINQ_STRIP_OFFLOAD);
> +	org = !!(dev->data->dev_conf.rxmode.offloads &
> +		 DEV_RX_OFFLOAD_QINQ_STRIP);
> +	if (cur != org) {
> +		if (cur)
> +			dev->data->dev_conf.rxmode.offloads |=
> +				DEV_RX_OFFLOAD_QINQ_STRIP;
> +		else
> +			dev->data->dev_conf.rxmode.offloads &=
> +				~DEV_RX_OFFLOAD_QINQ_STRIP;
> +		mask |= ETH_QINQ_STRIP_MASK;
> +	}
> +
>  	/*no change*/

Using a local (pointer) variable for dev->data->dev_conf.rxmode.offloads
would make the code more readable and lines shorter.

  reply	other threads:[~2019-04-15 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-14 11:11 [dpdk-stable] " viveksharma
2019-04-15 15:54 ` Stephen Hemminger [this message]
2019-04-15 21:33   ` [dpdk-stable] [dpdk-dev] " Rami Rosen
2019-04-17  7:40 ` [dpdk-stable] [PATCH v2] " viveksharma
2019-04-17  8:34   ` Thomas Monjalon
2019-04-18  7:38     ` [dpdk-stable] [EXT] " Vivek Kumar Sharma
2019-04-18  8:07       ` Thomas Monjalon

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=20190415085435.3f616c8c@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=viveksharma@marvell.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).