DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: gnandiba@amd.com, dev@dpdk.org
Cc: Amaranath.Somalapuram@amd.com
Subject: Re: [dpdk-dev] [PATCH v1] net/axgbe: add support for set MTU API
Date: Mon, 8 Jun 2020 10:08:04 +0100	[thread overview]
Message-ID: <f62934de-53b3-5a3c-adaf-4b33c0bf078f@intel.com> (raw)
In-Reply-To: <20200601144841.7814-1-gnandiba@amd.com>

On 6/1/2020 3:48 PM, gnandiba@amd.com wrote:
> From: gnandiba <gnandiba@amd.com>
> 
> This patch adds support for set_mtu API which can be used to change
> the Maximum Transmission unit (MTU) from application.
> 
> Signed-off-by: gnandiba <gnandiba@amd.com>

Please use "Name Surname <email>" format, for this time I am updating it as
following using identity from previous contribution:
 "Signed-off-by: Girish Nandibasappa <girish.nandibasappa@amd.com>"

Applied to dpdk-next-net/master, thanks.

<...>

> @@ -1254,7 +1256,35 @@ axgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
>  		return ptypes;
>  	return NULL;
>  }
> -
> +static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
> +{
> +	struct rte_eth_dev_info dev_info;
> +	struct axgbe_port *pdata = dev->data->dev_private;
> +	uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
> +	unsigned int val = 0;
> +	axgbe_dev_info_get(dev, &dev_info);
> +	/* check that mtu is within the allowed range */
> +	if ((mtu < RTE_ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))
> +		return -EINVAL;

Removed unnecessary parentheses while merging, please run
"./devtools/checkpatches.sh" before submitting the patch, which shows below
warning (also patchwork shows same warnings:
http://mails.dpdk.org/archives/test-report/2020-June/134309.html)

### net/axgbe: support setting MTU

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'mtu <
RTE_ETHER_MIN_MTU'
#45: FILE: drivers/net/axgbe/axgbe_ethdev.c:1411:
+       if ((mtu < RTE_ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'frame_size >
dev_info.max_rx_pktlen'
#45: FILE: drivers/net/axgbe/axgbe_ethdev.c:1411:
+       if ((mtu < RTE_ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))

      parent reply	other threads:[~2020-06-08  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 14:48 gnandiba
2020-06-04  5:22 ` Somalapuram, Amaranath
2020-06-08  9:08 ` Ferruh Yigit [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=f62934de-53b3-5a3c-adaf-4b33c0bf078f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Amaranath.Somalapuram@amd.com \
    --cc=dev@dpdk.org \
    --cc=gnandiba@amd.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).