[dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
wenzhuo.lu at intel.com
Wed Jan 25 02:21:42 CET 2017
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yi Zhang
> Sent: Thursday, December 15, 2016 2:50 AM
> To: maintainer at some.org
> Cc: dev at dpdk.org; Yi Zhang
> Subject: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
> Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF supports
> 15872-byte jumbo frame and VF only supports 9728-byte jumbo frame. If VF is
> running DPDK driver and set frame_size > 9728 ,PF running kernel ixgbe driver
> will report an error and set VF failed.
> This patch fixs DPDK ixgbevf driver to get correct jumbo frame size of VF.
> Signed-off-by: Yi Zhang <zhang.yi75 at zte.com.cn>
> drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> index edc9b22..573252c 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3168,7 +3168,7 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
> dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
> dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
> dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
> - dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
> + dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
I don't see any hard limit for the VF. I checked the kernel code. It defines 9728 as max frame size, I believe for both PF and VF. It's SW limitation. That's why you see the error.
As kernel PF + dpdk VF is a common user case. I don't object to change the value to 9728. But I think some comments needed here to explain where this value comes from, because we can find the max frame size defined by dpdk, ETHER_MAX_JUMBO_FRAME_LEN, is different.
> dev_info->max_mac_addrs = hw->mac.num_rar_entries;
> dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
> dev_info->max_vfs = dev->pci_dev->max_vfs;
More information about the dev