On 6/1/2020 3:48 PM, gnand...@amd.com wrote:
> From: gnandiba <gnand...@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 <gnand...@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.nandibasa...@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))

Reply via email to