Thread (29 messages) 29 messages, 11 authors, 2023-06-08

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

flat view

From: Andriy Berestovskyy <hidden>
Date: 2017-03-27 08:38:25

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help