| 2e1ecb46 | 09-Feb-2022 |
Jiawen Wu <[email protected]> |
net/txgbe: fix link up and down
Add hw->dev_start status in the flow of setting link up/down, to avoid obtaining link status inconsistent with the settings.
Fixes: 12a653eb53e1 ("net/txgbe: fix lin
net/txgbe: fix link up and down
Add hw->dev_start status in the flow of setting link up/down, to avoid obtaining link status inconsistent with the settings.
Fixes: 12a653eb53e1 ("net/txgbe: fix link status when device stopped") Cc: [email protected]
Signed-off-by: Jiawen Wu <[email protected]>
show more ...
|
| dd4e429c | 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: move jumbo frame offload check to library
Setting MTU bigger than RTE_ETHER_MTU requires the jumbo frame support, and application should enable the jumbo frame offload support for it.
When
ethdev: move jumbo frame offload check to library
Setting MTU bigger than RTE_ETHER_MTU requires the jumbo frame support, and application should enable the jumbo frame offload support for it.
When jumbo frame offload is not enabled by application, but MTU bigger than RTE_ETHER_MTU is requested there are two options, either fail or enable jumbo frame offload implicitly.
Enabling jumbo frame offload implicitly is selected by many drivers since setting a big MTU value already implies it, and this increases usability.
This patch moves this logic from drivers to the library, both to reduce the duplicated code in the drivers and to make behaviour more visible.
Signed-off-by: Ferruh Yigit <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Reviewed-by: Rosen Xu <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Huisong Li <[email protected]>
show more ...
|
| 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 ...
|
| e5ece1f4 | 13-Oct-2021 |
Jiawen Wu <[email protected]> |
net/txgbe: fix VXLAN-GPE packet checksum
Parse inner L2 length to set correct packet type, and ensure that hardware can compute the checksum successfully.
Fixes: b950203be7f1 ("net/txgbe: support V
net/txgbe: fix VXLAN-GPE packet checksum
Parse inner L2 length to set correct packet type, and ensure that hardware can compute the checksum successfully.
Fixes: b950203be7f1 ("net/txgbe: support VXLAN-GPE") Cc: [email protected]
Signed-off-by: Jiawen Wu <[email protected]>
show more ...
|