From: Xiaolong Ye Date: Wed, 17 Apr 2019 13:49:44 +0000 (+0800) Subject: net/af_xdp: specify minimal and maximal MTU X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fb6c5f2a1975a0f3de8ba6768c1b31d78fa1ee7b;p=dpdk.git net/af_xdp: specify minimal and maximal MTU Properly report mtu capability in port device info. Reported-by: David Marchand Signed-off-by: Xiaolong Ye Reviewed-by: David Marchand --- diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 5cc643ce22..c46916bbee 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -351,6 +351,9 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = 1; dev_info->max_tx_queues = 1; + dev_info->min_mtu = ETHER_MIN_MTU; + dev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE - ETH_AF_XDP_DATA_HEADROOM; + dev_info->default_rxportconf.nb_queues = 1; dev_info->default_txportconf.nb_queues = 1; dev_info->default_rxportconf.ring_size = ETH_AF_XDP_DFLT_NUM_DESCS;