[ovs-dev] [PATCH] netdev-dpdk: Don't enable offloading on HW device if not requested.
Kevin Traynor
ktraynor at redhat.com
Thu Feb 6 14:17:13 UTC 2020
On 06/02/2020 13:35, Ilya Maximets wrote:
> DPDK drivers has different implementations of transmit functions.
> Enabled offloading may cause driver to choose slower variant
> significantly affecting performance if userspace TSO wasn't requested.
>
> Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> ---
> lib/netdev-dpdk.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index eb1a7af94..6187129c0 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -1132,12 +1132,15 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)
> dev->hw_ol_features &= ~NETDEV_RX_HW_SCATTER;
> }
>
> - if ((info.tx_offload_capa & tx_tso_offload_capa) == tx_tso_offload_capa) {
> - dev->hw_ol_features |= NETDEV_TX_TSO_OFFLOAD;
> - } else {
> - dev->hw_ol_features &= ~NETDEV_TX_TSO_OFFLOAD;
> - VLOG_WARN("Tx TSO offload is not supported on %s port "
> - DPDK_PORT_ID_FMT, netdev_get_name(&dev->up), dev->port_id);
> + dev->hw_ol_features &= ~NETDEV_TX_TSO_OFFLOAD;
> + if (userspace_tso_enabled()) {
> + if ((info.tx_offload_capa & tx_tso_offload_capa)
> + == tx_tso_offload_capa) {
> + dev->hw_ol_features |= NETDEV_TX_TSO_OFFLOAD;
> + } else {
> + VLOG_WARN("%s: Tx TSO offload is not supported.",
> + netdev_get_name(&dev->up));
> + }
> }
>
> n_rxq = MIN(info.max_rx_queues, dev->up.n_rxq);
>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
More information about the dev
mailing list