net/ena: remove Tx mbuf linearization
authorMichal Krawczyk <mk@semihalf.com>
Wed, 23 Feb 2022 12:19:24 +0000 (13:19 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Feb 2022 17:53:49 +0000 (18:53 +0100)
commit96ffa8a70f31c5988075b9dfc16ad5faed399257
tree53c29b224991f46149c7f9bae5dbb1be57ea30cf
parent75c85e39652ef2eb54dd07b8f3d6b42b3930e8fe
net/ena: remove Tx mbuf linearization

The linearization of the mbuf isn't common practice for the PMD, as it
can expose it's capabilities to the upper layer using
rte_eth_dev_info_get().

Moreover, the rte_eth_tx_prepare() function should also verify if the
number of segments inside the mbuf isn't too high.

Because of those 2 circumstances, it may be safer to avoid modifying
mbuf on PMD's Tx side and remove linearization at all. Instead, add
verification of the number of segments to the eth_ena_prep_pkts().

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
drivers/net/ena/ena_ethdev.c
drivers/net/ena/ena_ethdev.h