[dpdk-dev] [PATCH 25/38] net/dpaa: add support for MTU update
    Ferruh Yigit 
    ferruh.yigit at intel.com
       
    Wed Jun 28 17:45:47 CEST 2017
    
    
  
On 6/16/2017 6:40 AM, Shreyansh Jain wrote:
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
<...>
>  static int
> +dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
> +{
> +	struct dpaa_if *dpaa_intf = dev->data->dev_private;
> +
> +	PMD_INIT_FUNC_TRACE();
> +
> +	if (mtu < ETHER_MIN_MTU)
> +		return -EINVAL;
> +
> +	fman_if_set_maxfrm(dpaa_intf->fif, mtu);
> +
> +	if (mtu > ETHER_MAX_LEN)
> +		return -1
Is it OK to have this check after fman_if_set_maxfrm() ?
> +	dev->data->dev_conf.rxmode.jumbo_frame = 0;
> +
> +	dev->data->dev_conf.rxmode.max_rx_pkt_len = mtu;
I think this only makes sense when jumbo_frame is 1, although not hurts
to set...
> +	return 0;
> +}
<...>
    
    
More information about the dev
mailing list