[dpdk-dev] examples/ptpclient: fix Tx configuration

Message ID 20180201164227.72211-1-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

De Lara Guarch, Pablo Feb. 1, 2018, 4:42 p.m. UTC
  The PTP Client application requires IEEE1588 to be supported
by the network driver used, which needs full Tx data path
to be used.

Fixes: b960219b0d83 ("examples/ptpclient: convert to new ethdev offloads API")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/ptpclient/ptpclient.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Thomas Monjalon Feb. 6, 2018, 9:06 p.m. UTC | #1
01/02/2018 17:42, Pablo de Lara:
> The PTP Client application requires IEEE1588 to be supported
> by the network driver used, which needs full Tx data path
> to be used.
> 
> Fixes: b960219b0d83 ("examples/ptpclient: convert to new ethdev offloads API")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 1cf251922..83821eb8d 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -194,6 +194,8 @@  port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 		port_conf.txmode.offloads |=
 			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	/* Force full Tx path in the driver, required for IEEE1588 */
+	port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
 
 	/* Configure the Ethernet device. */
 	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);