[dpdk-dev] [PATCH v2] ether: use a default for max Rx frame size in configure()

Andriy Berestovskyy Andriy.Berestovskyy at caviumnetworks.com
Mon Mar 27 10:38:13 CEST 2017


Hey Qiming,

On 27.03.2017 08:15, Yang, Qiming wrote:
> I don't think this is a bug. Return errors when configure an invalid max_rx_pkt_len is suitable for this generic API.

It is not a bug, it is an inconsistency. At the moment we can set 
max_rx_pkt_len for normal frames and if it is out of range a default 
value will be used instead.

IMO we should expect the same behavior from the same function for the 
jumbo frames.

So at the moment we have:
jumbo == 0, max_rx_pkt_len == 0, result: max_rx_pkt_len = ETHER_MAX_LEN
jumbo == 0, max_rx_pkt_len == 1200, result: max_rx_pkt_len = 1200
jumbo == 1, max_rx_pkt_len == 0, result: error
jumbo == 1, max_rx_pkt_len == 9K, result: error or max_rx_pkt_len = 9K


> It's not suitable to give a default value in this function.

We use a default value for normal frames at the moment. The comment:

uint32_t max_rx_pkt_len;  /**< Only used if jumbo_frame enabled. */

is obsolete and in fact we use max_rx_pkt_len both for jumbo and normal 
frames. So the patch clarifies this as well.


Regards,
Andriy


More information about the dev mailing list