Thread (28 messages) 28 messages, 4 authors, 2018-04-03

Re: [PATCH 4/4] net/ixgbe: convert to new Tx offloads API

From: Dai, Wei <hidden>
Date: 2018-03-19 06:24:45

Hi, Konstantin
Thanks for your feedback.
-----Original Message-----
From: Ananyev, Konstantin
Sent: Thursday, March 15, 2018 7:19 AM
To: Dai, Wei <redacted>; Lu, Wenzhuo <redacted>
Cc: dev@dpdk.org
Subject: RE: [PATCH 4/4] net/ixgbe: convert to new Tx offloads API

quoted
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h
b/drivers/net/ixgbe/ixgbe_rxtx.h index 30095fa..d7f0535 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -223,6 +223,7 @@ struct ixgbe_tx_queue {
 	uint8_t             hthresh;       /**< Host threshold register. */
 	uint8_t             wthresh;       /**< Write-back threshold reg.
*/
quoted
 	uint32_t txq_flags; /**< Holds flags for this TXq */
+	uint64_t offloads; /**< Tx offload flags of DEV_TX_OFFLOAD_* */
 	uint32_t            ctx_curr;      /**< Hardware context states.
*/
quoted
 	/** Hardware context0 history. */
 	struct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM]; @@ -254,6
+255,12
quoted
@@ struct ixgbe_txq_ops {  #define IXGBE_SIMPLE_FLAGS
((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
 			    ETH_TXQ_FLAGS_NOOFFLOADS)

+#define IXGBE_SIMPLE_TX_OFFLOAD_FLAGS
((uint64_t)DEV_TX_OFFLOAD_MULTI_SEGS |\
quoted
+					DEV_TX_OFFLOAD_VLAN_INSERT |\
+					DEV_TX_OFFLOAD_SCTP_CKSUM |\
+					DEV_TX_OFFLOAD_UDP_CKSUM |\
+					DEV_TX_OFFLOAD_TCP_CKSUM)

Hmm and why IP_CKSUM, TSO, OUTER_IP_CKSUM, etc. is not included into
that macro?
In fact do you really need that?
As I understand right now vector TX doesn't support any offloads, so
tx_offload != 0, should be enough for tx function selection, right?
Konstanitn
In this patch, IXGBE_SIMPLE_TX_OFFLOAD_FLAGS is just a reverse transform of
IXGBE_SIMPLE_FLAGS which is used in old offload API.
Yes, current vector Tx doesn't support any offloads.
I will use tx_offload==0 following your guide.
quoted
+
 /*
  * Populate descriptors with the following info:
  * 1.) buffer_addr = phys_addr + headroom @@ -307,6 +314,7 @@
uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf
**tx_pkts,
quoted
 				    uint16_t nb_pkts);
 int ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq);

+uint64_t ixgbe_get_tx_port_offlaods(struct rte_eth_dev *dev);
 uint64_t ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev);
uint64_t ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev);

--
2.7.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help