Thread (17 messages) 17 messages, 6 authors, 2018-01-16

Re: [PATCH v2] examples/flow_filtering: add Tx queues setup process

From: Ferruh Yigit <hidden>
Date: 2018-01-12 12:25:02

On 12/27/2017 8:32 AM, Wei Zhao wrote:
This example do not has the process of set up tx queues, but
some NIC start up process will be blocked if this is no tx queue
and only rx queues. So add tx queues setup process in main code.

Signed-off-by: Wei Zhao <redacted>
<...>
quoted hunk ↗ jump to hunk
@@ -149,7 +149,18 @@ init_port(void)
 			/**< CRC stripped by hardware */
 			.hw_strip_crc   = 1,
 		},
+		.txmode = {
+			.offloads =
+				DEV_TX_OFFLOAD_VLAN_INSERT |
+				DEV_TX_OFFLOAD_IPV4_CKSUM  |
+				DEV_TX_OFFLOAD_UDP_CKSUM   |
+				DEV_TX_OFFLOAD_TCP_CKSUM   |
+				DEV_TX_OFFLOAD_SCTP_CKSUM  |
+				DEV_TX_OFFLOAD_TCP_TSO,
+		},
 	};
+	struct rte_eth_txconf txq_conf;
+	struct rte_eth_dev_info dev_info;
 
 	printf(":: initializing port: %d\n", port_id);
 	ret = rte_eth_dev_configure(port_id,
@@ -173,6 +184,21 @@ init_port(void)
 		}
 	}
 
+	rte_eth_dev_info_get(port_id, &dev_info);
+	txq_conf = dev_info.default_txconf;
+	txq_conf.offloads = port_conf.txmode.offloads;
Hi Wei, Shahaf,

When new offload method used for txmode, shouldn't ETH_TXQ_FLAGS_IGNORE set,
otherwise txq_flags assumed to have valid values, no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help