[dpdk-dev] net/mlx5: fix packet type flags for Ethernet only frame

Message ID 20171024061609.120662-1-shahafs@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Shahaf Shuler Oct. 24, 2017, 6:16 a.m. UTC
  Considering the PMD supports only Ethernet transport, packet which
arrives without any packet type flags in the completion should be
marked with L2_ETHER flag.

Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
Cc: stable@dpdk.org
Cc: yskoh@mellanox.com

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Nélio Laranjeiro Oct. 24, 2017, 6:53 a.m. UTC | #1
On Tue, Oct 24, 2017 at 09:16:09AM +0300, Shahaf Shuler wrote:
> Considering the PMD supports only Ethernet transport, packet which
> arrives without any packet type flags in the completion should be
> marked with L2_ETHER flag.
> 
> Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
> Cc: stable@dpdk.org
> Cc: yskoh@mellanox.com
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 961967bf4..67e7e0639 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -97,6 +97,8 @@ mlx5_set_ptype_table(void)
>  	 * bit[6] = tunneled
>  	 * bit[7] = outer_l3_type
>  	 */
> +	/* L2 */
> +	(*p)[0x00] = RTE_PTYPE_L2_ETHER;
>  	/* L3 */
>  	(*p)[0x01] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
>  		     RTE_PTYPE_L4_NONFRAG;
> -- 
> 2.12.0
 
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
  
Ferruh Yigit Oct. 24, 2017, 5:56 p.m. UTC | #2
On 10/23/2017 11:53 PM, Nélio Laranjeiro wrote:
> On Tue, Oct 24, 2017 at 09:16:09AM +0300, Shahaf Shuler wrote:
>> Considering the PMD supports only Ethernet transport, packet which
>> arrives without any packet type flags in the completion should be
>> marked with L2_ETHER flag.
>>
>> Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
Cc: stable@dpdk.org

>>
>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
>> Acked-by: Yongseok Koh <yskoh@mellanox.com>

> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 961967bf4..67e7e0639 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -97,6 +97,8 @@  mlx5_set_ptype_table(void)
 	 * bit[6] = tunneled
 	 * bit[7] = outer_l3_type
 	 */
+	/* L2 */
+	(*p)[0x00] = RTE_PTYPE_L2_ETHER;
 	/* L3 */
 	(*p)[0x01] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
 		     RTE_PTYPE_L4_NONFRAG;