| 1bb4a528 | 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_p
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_pkt_len' field of the config struct 'struct rte_eth_conf'.
Also 'rte_eth_dev_set_mtu()' API can be used to set the MTU, and result stored into '(struct rte_eth_dev)->data->mtu'.
These two APIs are related but they work in a disconnected way, they store the set values in different variables which makes hard to figure out which one to use, also having two different method for a related functionality is confusing for the users.
Other issues causing confusion is: * maximum transmission unit (MTU) is payload of the Ethernet frame. And 'max_rx_pkt_len' is the size of the Ethernet frame. Difference is Ethernet frame overhead, and this overhead may be different from device to device based on what device supports, like VLAN and QinQ. * 'max_rx_pkt_len' is only valid when application requested jumbo frame, which adds additional confusion and some APIs and PMDs already discards this documented behavior. * For the jumbo frame enabled case, 'max_rx_pkt_len' is an mandatory field, this adds configuration complexity for application.
As solution, both APIs gets MTU as parameter, and both saves the result in same variable '(struct rte_eth_dev)->data->mtu'. For this 'max_rx_pkt_len' updated as 'mtu', and it is always valid independent from jumbo frame.
For 'rte_eth_dev_configure()', 'dev->data->dev_conf.rxmode.mtu' is user request and it should be used only within configure function and result should be stored to '(struct rte_eth_dev)->data->mtu'. After that point both application and PMD uses MTU from this variable.
When application doesn't provide an MTU during 'rte_eth_dev_configure()' default 'RTE_ETHER_MTU' value is used.
Additional clarification done on scattered Rx configuration, in relation to MTU and Rx buffer size. MTU is used to configure the device for physical Rx/Tx size limitation, Rx buffer is where to store Rx packets, many PMDs use mbuf data buffer size as Rx buffer size. PMDs compare MTU against Rx buffer size to decide enabling scattered Rx or not. If scattered Rx is not supported by device, MTU bigger than Rx buffer size should fail.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Hyong Youb Kim <[email protected]>
show more ...
|
| 4f76ac98 | 23-Jul-2021 |
Feifei Wang <[email protected]> |
drivers/net: fix vector Rx comments
For the loop to process packets in Rx vector path, some notes for the code are wrong, fix these errors.
Fixes: 7092be8437bd ("fm10k: add vector Rx") Fixes: c3def
drivers/net: fix vector Rx comments
For the loop to process packets in Rx vector path, some notes for the code are wrong, fix these errors.
Fixes: 7092be8437bd ("fm10k: add vector Rx") Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec") Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM") Fixes: 9ed94e5bb04e ("i40e: add vector Rx") Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx") Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path") Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx") Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx") Cc: [email protected]
Suggested-by: Ruifeng Wang <[email protected]> Signed-off-by: Feifei Wang <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
show more ...
|
| 635a9373 | 23-Jul-2021 |
Feifei Wang <[email protected]> |
drivers/net: fix typo in vector Rx comment
In Rx vec path, for extracting and recording EOP bit, comment has redundant "count" word, removing it.
Fixes: 7092be8437bd ("fm10k: add vector Rx") Fixes:
drivers/net: fix typo in vector Rx comment
In Rx vec path, for extracting and recording EOP bit, comment has redundant "count" word, removing it.
Fixes: 7092be8437bd ("fm10k: add vector Rx") Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec") Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM") Fixes: 9ed94e5bb04e ("i40e: add vector Rx") Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx") Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path") Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx") Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx") Cc: [email protected]
Signed-off-by: Feifei Wang <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
show more ...
|