* [dpdk-dev] [PATCH v2] net/i40e: fix missing mbuf fast free offload
@ 2018-05-11 1:25 Qi Zhang
2018-05-11 1:44 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2018-05-11 1:25 UTC (permalink / raw)
To: ferruh.yigit; +Cc: beilei.xing, dev, Qi Zhang
Expose the missing mbuf fast free capability since i40 does
support it.
Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
v2:
- fix tx function selection.
drivers/net/i40e/i40e_ethdev.c | 5 +++--
drivers/net/i40e/i40e_rxtx.c | 8 +++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 267bdf07a..da6375b5e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3301,7 +3301,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_VLAN_FILTER |
DEV_RX_OFFLOAD_JUMBO_FRAME;
- dev_info->tx_queue_offload_capa = 0;
+ dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
dev_info->tx_offload_capa =
DEV_TX_OFFLOAD_VLAN_INSERT |
DEV_TX_OFFLOAD_QINQ_INSERT |
@@ -3315,7 +3315,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_TX_OFFLOAD_GRE_TNL_TSO |
DEV_TX_OFFLOAD_IPIP_TNL_TSO |
DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
- DEV_TX_OFFLOAD_MULTI_SEGS;
+ DEV_TX_OFFLOAD_MULTI_SEGS |
+ dev_info->tx_queue_offload_capa;
dev_info->dev_capa =
RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 1b2f5fcc0..6032d5541 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -3028,9 +3028,11 @@ i40e_set_tx_function_flag(struct rte_eth_dev *dev, struct i40e_tx_queue *txq)
struct i40e_adapter *ad =
I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
- /* Use a simple Tx queue (no offloads, no multi segs) if possible */
- ad->tx_simple_allowed = (txq->offloads == 0 &&
- txq->tx_rs_thresh >= RTE_PMD_I40E_TX_MAX_BURST);
+ /* Use a simple Tx queue if possible (only fast free is allowed) */
+ ad->tx_simple_allowed =
+ (txq->offloads ==
+ (txq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
+ txq->tx_rs_thresh >= RTE_PMD_I40E_TX_MAX_BURST);
ad->tx_vec_allowed = (ad->tx_simple_allowed &&
txq->tx_rs_thresh <= RTE_I40E_TX_MAX_FREE_BUF_SZ);
--
2.13.6
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix missing mbuf fast free offload
2018-05-11 1:25 [dpdk-dev] [PATCH v2] net/i40e: fix missing mbuf fast free offload Qi Zhang
@ 2018-05-11 1:44 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-05-11 1:44 UTC (permalink / raw)
To: Qi Zhang; +Cc: beilei.xing, dev
On 5/11/2018 2:25 AM, Qi Zhang wrote:
> Expose the missing mbuf fast free capability since i40 does
> support it.
>
> Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-11 1:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 1:25 [dpdk-dev] [PATCH v2] net/i40e: fix missing mbuf fast free offload Qi Zhang
2018-05-11 1:44 ` Ferruh Yigit
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).