[v2,2/2] mbuf: fix Tx offload mask
diff mbox series

Message ID 20181002105142.24333-2-jerin.jacob@caviumnetworks.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • [v2,1/2] ethdev: add SCTP Rx checksum offload support
Related show

Checks

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

Commit Message

Jerin Jacob Oct. 2, 2018, 10:51 a.m. UTC
Fixes missing PKT_TX_UDP_SEG, PKT_TX_OUTER_IPV6,PKT_TX_OUTER_IPV4,
PKT_TX_IPV6 and  PKT_TX_IPV4 values in PKT_TX_OFFLOAD_MASK.

Also sort them in bit wise order to recognize missing items later.

Fixes: 6d18505efaa6 ("vhost: support UDP Fragmentation Offload")
Fixes: 1c3b7c33e977 ("mbuf: add Tx offloading flags for tunnels")
Fixes: 711ba9e23e68 ("mbuf: remove aliasing of Tx offloading flags with Rx ones")
Cc: stable@dpdk.org
Cc: jiayu.hu@intel.com

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
v2:
- Add all missing PKT_TX_ types
- Sort them in bit mask order(Ferruh Yigit)
---
 lib/librte_mbuf/rte_mbuf.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Hu, Jiayu Oct. 4, 2018, 2:31 a.m. UTC | #1
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Tuesday, October 2, 2018 6:52 PM
> To: Olivier Matz <olivier.matz@6wind.com>
> Cc: dev@dpdk.org; Jerin Jacob <jerin.jacob@caviumnetworks.com>;
> stable@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>
> Subject: [dpdk-dev] [PATCH v2 2/2] mbuf: fix Tx offload mask
> 
> Fixes missing PKT_TX_UDP_SEG,
> PKT_TX_OUTER_IPV6,PKT_TX_OUTER_IPV4,
> PKT_TX_IPV6 and  PKT_TX_IPV4 values in PKT_TX_OFFLOAD_MASK.
> 
> Also sort them in bit wise order to recognize missing items later.
> 
> Fixes: 6d18505efaa6 ("vhost: support UDP Fragmentation Offload")
> Fixes: 1c3b7c33e977 ("mbuf: add Tx offloading flags for tunnels")
> Fixes: 711ba9e23e68 ("mbuf: remove aliasing of Tx offloading flags with Rx
> ones")
> Cc: stable@dpdk.org
> Cc: jiayu.hu@intel.com
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Acked-by: Jiayu Hu <jiayu.hu@intel.com>

Thanks,
Jiayu
> ---
> v2:
> - Add all missing PKT_TX_ types
> - Sort them in bit mask order(Ferruh Yigit)
> ---
>  lib/librte_mbuf/rte_mbuf.h | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index a50b05c64..c8ebc3230 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -334,16 +334,21 @@ extern "C" {
>   * which can be set for packet.
>   */
>  #define PKT_TX_OFFLOAD_MASK (    \
> +		PKT_TX_OUTER_IPV6 |	 \
> +		PKT_TX_OUTER_IPV4 |	 \
> +		PKT_TX_OUTER_IP_CKSUM |  \
> +		PKT_TX_VLAN_PKT |        \
> +		PKT_TX_IPV6 |		 \
> +		PKT_TX_IPV4 |		 \
>  		PKT_TX_IP_CKSUM |        \
>  		PKT_TX_L4_MASK |         \
> -		PKT_TX_OUTER_IP_CKSUM |  \
> -		PKT_TX_TCP_SEG |         \
>  		PKT_TX_IEEE1588_TMST |	 \
> +		PKT_TX_TCP_SEG |         \
>  		PKT_TX_QINQ_PKT |        \
> -		PKT_TX_VLAN_PKT |        \
>  		PKT_TX_TUNNEL_MASK |	 \
>  		PKT_TX_MACSEC |		 \
> -		PKT_TX_SEC_OFFLOAD)
> +		PKT_TX_SEC_OFFLOAD |	\
> +		PKT_TX_UDP_SEG)
> 
>  /**
>   * Mbuf having an external buffer attached. shinfo in mbuf must be filled.
> --
> 2.19.0
Ferruh Yigit Oct. 4, 2018, 4:05 p.m. UTC | #2
On 10/4/2018 3:31 AM, Hu, Jiayu wrote:
> 
> 
>> -----Original Message-----
>> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
>> Sent: Tuesday, October 2, 2018 6:52 PM
>> To: Olivier Matz <olivier.matz@6wind.com>
>> Cc: dev@dpdk.org; Jerin Jacob <jerin.jacob@caviumnetworks.com>;
>> stable@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>
>> Subject: [dpdk-dev] [PATCH v2 2/2] mbuf: fix Tx offload mask
>>
>> Fixes missing PKT_TX_UDP_SEG,
>> PKT_TX_OUTER_IPV6,PKT_TX_OUTER_IPV4,
>> PKT_TX_IPV6 and  PKT_TX_IPV4 values in PKT_TX_OFFLOAD_MASK.
>>
>> Also sort them in bit wise order to recognize missing items later.
>>
>> Fixes: 6d18505efaa6 ("vhost: support UDP Fragmentation Offload")
>> Fixes: 1c3b7c33e977 ("mbuf: add Tx offloading flags for tunnels")
>> Fixes: 711ba9e23e68 ("mbuf: remove aliasing of Tx offloading flags with Rx
>> ones")
>> Cc: stable@dpdk.org
>> Cc: jiayu.hu@intel.com
>>
>> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> 
> Acked-by: Jiayu Hu <jiayu.hu@intel.com>

Series applied to dpdk-next-net/master, thanks.

Patch
diff mbox series

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index a50b05c64..c8ebc3230 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -334,16 +334,21 @@  extern "C" {
  * which can be set for packet.
  */
 #define PKT_TX_OFFLOAD_MASK (    \
+		PKT_TX_OUTER_IPV6 |	 \
+		PKT_TX_OUTER_IPV4 |	 \
+		PKT_TX_OUTER_IP_CKSUM |  \
+		PKT_TX_VLAN_PKT |        \
+		PKT_TX_IPV6 |		 \
+		PKT_TX_IPV4 |		 \
 		PKT_TX_IP_CKSUM |        \
 		PKT_TX_L4_MASK |         \
-		PKT_TX_OUTER_IP_CKSUM |  \
-		PKT_TX_TCP_SEG |         \
 		PKT_TX_IEEE1588_TMST |	 \
+		PKT_TX_TCP_SEG |         \
 		PKT_TX_QINQ_PKT |        \
-		PKT_TX_VLAN_PKT |        \
 		PKT_TX_TUNNEL_MASK |	 \
 		PKT_TX_MACSEC |		 \
-		PKT_TX_SEC_OFFLOAD)
+		PKT_TX_SEC_OFFLOAD |	\
+		PKT_TX_UDP_SEG)
 
 /**
  * Mbuf having an external buffer attached. shinfo in mbuf must be filled.