patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Michal Krawczyk <mk@semihalf.com>
To: christian.ehrhardt@canonical.com, stable@dpdk.org
Cc: Ghalem Boudour <ghalem.boudour@6wind.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	Michal Krawczyk <mk@semihalf.com>
Subject: [dpdk-stable] [PATCH 19.11 1/2] net/ena: enable multi-segment in Tx offload flags
Date: Wed, 11 Aug 2021 11:51:44 +0200	[thread overview]
Message-ID: <20210811095145.1846-1-mk@semihalf.com> (raw)

From: Ghalem Boudour <ghalem.boudour@6wind.com>

[ upstream commit 3e7008459df969611fb7aa3b885a949515ac0b49 ]

The DPDK ENA driver does not provide multi-segment tx offload capability.
Let's add DEV_TX_OFFLOAD_MULTI_SEGS to ports offload capability by
default, and always set it in dev->data->dev_conf.txmode.offload.

This flag in not listed in doc/guides/nics/features/default.ini, so
ena.ini does not need to be updated.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index febca8fdb7..6c9a2aa1a9 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1877,6 +1877,8 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
 
 	adapter->state = ENA_ADAPTER_STATE_CONFIG;
 
+	dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
+
 	adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
 	adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
 	return 0;
@@ -1948,6 +1950,7 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 			DEV_RX_OFFLOAD_TCP_CKSUM;
 
 	rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	tx_feat |= DEV_TX_OFFLOAD_MULTI_SEGS;
 
 	/* Inform framework about available features */
 	dev_info->rx_offload_capa = rx_feat;
-- 
2.25.1


             reply	other threads:[~2021-08-11  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  9:51 Michal Krawczyk [this message]
2021-08-11  9:51 ` [dpdk-stable] [PATCH 19.11 2/2] net/ena: trigger reset on Tx prepare failure Michal Krawczyk
2021-08-11 10:10   ` Christian Ehrhardt
2021-08-11 10:10 ` [dpdk-stable] [PATCH 19.11 1/2] net/ena: enable multi-segment in Tx offload flags Christian Ehrhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210811095145.1846-1-mk@semihalf.com \
    --to=mk@semihalf.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=ghalem.boudour@6wind.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).