[v2,1/1] examples/ip_frag: fix DEV_TX_OFFLOAD_MBUF_FAST_FREE flag

Message ID 1564034330-16321-1-git-send-email-skori@marvell.com (mailing list archive)
State Superseded, archived
Headers
Series [v2,1/1] examples/ip_frag: fix DEV_TX_OFFLOAD_MBUF_FAST_FREE flag |

Checks

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

Commit Message

Sunil Kumar Kori July 25, 2019, 5:58 a.m. UTC
  Application uses different pool to allocate direct and indirect
mbufs which are further spliced together to consturct a fragmented
packet and same is transmitted over the port which is configured
with DEV_TX_OFFLOAD_MBUF_FAST_FREE enabled i.e. all segments
must belong to the same pool. But constructed packet violates
the conditions.

So fixing DEV_TX_OFFLOAD_MBUF_FAST_FREE flag during device
configuration.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
v2:
 - Subject is corrected.

 examples/ip_fragmentation/main.c | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Ananyev, Konstantin July 25, 2019, 7:54 a.m. UTC | #1
> -----Original Message-----
> From: Sunil Kumar Kori [mailto:skori@marvell.com]
> Sent: Thursday, July 25, 2019 6:59 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> Subject: [PATCH v2 1/1] examples/ip_frag: fix DEV_TX_OFFLOAD_MBUF_FAST_FREE flag
> 
> Application uses different pool to allocate direct and indirect
> mbufs which are further spliced together to consturct a fragmented
> packet and same is transmitted over the port which is configured
> with DEV_TX_OFFLOAD_MBUF_FAST_FREE enabled i.e. all segments
> must belong to the same pool. But constructed packet violates
> the conditions.
> 
> So fixing DEV_TX_OFFLOAD_MBUF_FAST_FREE flag during device
> configuration.
> 
> Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> ---
> v2:
>  - Subject is corrected.
> 
>  examples/ip_fragmentation/main.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
> index 03be0c1..324d607 100644
> --- a/examples/ip_fragmentation/main.c
> +++ b/examples/ip_fragmentation/main.c
> @@ -939,9 +939,6 @@ struct rte_lpm6_config lpm6_config = {
>  		n_tx_queue = nb_lcores;
>  		if (n_tx_queue > MAX_TX_QUEUE_PER_PORT)
>  			n_tx_queue = MAX_TX_QUEUE_PER_PORT;
> -		if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
> -			local_port_conf.txmode.offloads |=
> -				DEV_TX_OFFLOAD_MBUF_FAST_FREE;
>  		ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue,
>  					    &local_port_conf);
>  		if (ret < 0) {
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 1.8.3.1
  

Patch

diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 03be0c1..324d607 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -939,9 +939,6 @@  struct rte_lpm6_config lpm6_config = {
 		n_tx_queue = nb_lcores;
 		if (n_tx_queue > MAX_TX_QUEUE_PER_PORT)
 			n_tx_queue = MAX_TX_QUEUE_PER_PORT;
-		if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-			local_port_conf.txmode.offloads |=
-				DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 		ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue,
 					    &local_port_conf);
 		if (ret < 0) {