net/octeontx2: fix get supported ptype callback
diff mbox series

Message ID 1576173504-29467-1-git-send-email-hkalra@marvell.com
State Accepted
Delegated to: Jerin Jacob
Headers show
Series
  • net/octeontx2: fix get supported ptype callback
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Harman Kalra Dec. 12, 2019, 5:58 p.m. UTC
Setting up supported ptypes using testpmd command is failing
because supported_ptypes_get callback will never return ptypes
supported, as NIX_RX_OFFLOAD_PTYPE_F bit in rx_offload_flags
is zero by default in testpmd.

Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx2/otx2_lookup.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Jerin Jacob Jan. 13, 2020, 9:31 a.m. UTC | #1
On Thu, Dec 12, 2019 at 11:29 PM Harman Kalra <hkalra@marvell.com> wrote:
>
> Setting up supported ptypes using testpmd command is failing
> because supported_ptypes_get callback will never return ptypes
> supported, as NIX_RX_OFFLOAD_PTYPE_F bit in rx_offload_flags
> is zero by default in testpmd.
>
> Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
> Cc: stable@dpdk.org
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>


Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks

> ---
>  drivers/net/octeontx2/otx2_lookup.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
> index bcf2ff4e8..568557116 100644
> --- a/drivers/net/octeontx2/otx2_lookup.c
> +++ b/drivers/net/octeontx2/otx2_lookup.c
> @@ -17,7 +17,7 @@
>  const uint32_t *
>  otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
>  {
> -       struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
> +       RTE_SET_USED(eth_dev);
>
>         static const uint32_t ptypes[] = {
>                 RTE_PTYPE_L2_ETHER_QINQ, /* LB */
> @@ -56,10 +56,7 @@ otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
>                 RTE_PTYPE_UNKNOWN,
>         };
>
> -       if (dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)
> -               return ptypes;
> -       else
> -               return NULL;
> +       return ptypes;
>  }
>
>  int
> --
> 2.18.0
>

Patch
diff mbox series

diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
index bcf2ff4e8..568557116 100644
--- a/drivers/net/octeontx2/otx2_lookup.c
+++ b/drivers/net/octeontx2/otx2_lookup.c
@@ -17,7 +17,7 @@ 
 const uint32_t *
 otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
 {
-	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+	RTE_SET_USED(eth_dev);
 
 	static const uint32_t ptypes[] = {
 		RTE_PTYPE_L2_ETHER_QINQ, /* LB */
@@ -56,10 +56,7 @@  otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
 		RTE_PTYPE_UNKNOWN,
 	};
 
-	if (dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)
-		return ptypes;
-	else
-		return NULL;
+	return ptypes;
 }
 
 int