[dpdk-dev] [PATCH 05/18] net/dpaa: set the correct frame size in device MTU

Ferruh Yigit ferruh.yigit at intel.com
Tue Jan 9 11:46:34 CET 2018


On 12/13/2017 12:05 PM, Hemant Agrawal wrote:
> From: Ashish Jain <ashish.jain at nxp.com>
> 
> Setting correct frame size in dpaa_dev_mtu_set
> api call. Also setting correct max frame size in
> hardware in dev_configure for jumbo frames
> 
> Signed-off-by: Ashish Jain <ashish.jain at nxp.com>
> Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>

<...>

> @@ -111,19 +111,21 @@ static int
>  dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
>  {
>  	struct dpaa_if *dpaa_intf = dev->data->dev_private;
> +	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN
> +				+ VLAN_TAG_SIZE;
>  
>  	PMD_INIT_FUNC_TRACE();
>  
> -	if (mtu < ETHER_MIN_MTU)
> +	if ((mtu < ETHER_MIN_MTU) || (frame_size > DPAA_MAX_RX_PKT_LEN))

checkpatch complains about extra parentheses:

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'mtu < ETHER_MIN_MTU'
#42: FILE: drivers/net/dpaa/dpaa_ethdev.c:119:
+       if ((mtu < ETHER_MIN_MTU) || (frame_size > DPAA_MAX_RX_PKT_LEN))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'frame_size >
DPAA_MAX_RX_PKT_LEN'
#42: FILE: drivers/net/dpaa/dpaa_ethdev.c:119:
+       if ((mtu < ETHER_MIN_MTU) || (frame_size > DPAA_MAX_RX_PKT_LEN))

<...>


More information about the dev mailing list