DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default
@ 2019-11-23  8:58 pbhagavatula
  2019-11-25 13:00 ` Jerin Jacob
  0 siblings, 1 reply; 5+ messages in thread
From: pbhagavatula @ 2019-11-23  8:58 UTC (permalink / raw)
  To: jerinj, Nithin Dabilpuram, Kiran Kumar K; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Enable Ptype parsing by default, only disable when `rte_eth_dev_set_ptypes`
is called with ptype_mask as 0.
This would enable applications that are dependent on packet type parsing
like l3fwd.

Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 4 ++++
 drivers/net/octeontx2/otx2_ethdev.h | 1 +
 drivers/net/octeontx2/otx2_lookup.c | 7 +++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index ddab3aa06..eaf7ba917 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP))
 		flags |= NIX_RX_OFFLOAD_TSTAMP_F;
 
+	if (!dev->ptype_disable)
+		flags |= NIX_RX_OFFLOAD_PTYPE_F;
+
 	return flags;
 }
 
@@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
 
 	dev->configured = 0;
 	dev->drv_inited = true;
+	dev->ptype_disable = 0;
 	dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20);
 	dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20);
 
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index eb1626309..987e7607c 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -276,6 +276,7 @@ struct otx2_eth_dev {
 	uint8_t configured_cints;
 	uint8_t configured_nb_rx_qs;
 	uint8_t configured_nb_tx_qs;
+	uint8_t ptype_disable;
 	uint16_t nix_msixoff;
 	uintptr_t base;
 	uintptr_t lmt_addr;
diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
index 17c44e20e..bcf2ff4e8 100644
--- a/drivers/net/octeontx2/otx2_lookup.c
+++ b/drivers/net/octeontx2/otx2_lookup.c
@@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev *eth_dev, uint32_t ptype_mask)
 {
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 
-	if (ptype_mask)
+	if (ptype_mask) {
 		dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
-	else
+		dev->ptype_disable = 0;
+	} else {
 		dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
+		dev->ptype_disable = 1;
+	}
 
 	otx2_eth_set_rx_function(eth_dev);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default
  2019-11-23  8:58 [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default pbhagavatula
@ 2019-11-25 13:00 ` Jerin Jacob
  2019-11-25 14:02   ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2019-11-25 13:00 UTC (permalink / raw)
  To: Pavan Nikhilesh, Ferruh Yigit
  Cc: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, dpdk-dev

On Sat, Nov 23, 2019 at 5:58 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Enable Ptype parsing by default, only disable when `rte_eth_dev_set_ptypes`
> is called with ptype_mask as 0.
> This would enable applications that are dependent on packet type parsing
> like l3fwd.
>
> Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks


> ---
>  drivers/net/octeontx2/otx2_ethdev.c | 4 ++++
>  drivers/net/octeontx2/otx2_ethdev.h | 1 +
>  drivers/net/octeontx2/otx2_lookup.c | 7 +++++--
>  3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
> index ddab3aa06..eaf7ba917 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
>         if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP))
>                 flags |= NIX_RX_OFFLOAD_TSTAMP_F;
>
> +       if (!dev->ptype_disable)
> +               flags |= NIX_RX_OFFLOAD_PTYPE_F;
> +
>         return flags;
>  }
>
> @@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
>
>         dev->configured = 0;
>         dev->drv_inited = true;
> +       dev->ptype_disable = 0;
>         dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20);
>         dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20);
>
> diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
> index eb1626309..987e7607c 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.h
> +++ b/drivers/net/octeontx2/otx2_ethdev.h
> @@ -276,6 +276,7 @@ struct otx2_eth_dev {
>         uint8_t configured_cints;
>         uint8_t configured_nb_rx_qs;
>         uint8_t configured_nb_tx_qs;
> +       uint8_t ptype_disable;
>         uint16_t nix_msixoff;
>         uintptr_t base;
>         uintptr_t lmt_addr;
> diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
> index 17c44e20e..bcf2ff4e8 100644
> --- a/drivers/net/octeontx2/otx2_lookup.c
> +++ b/drivers/net/octeontx2/otx2_lookup.c
> @@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev *eth_dev, uint32_t ptype_mask)
>  {
>         struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>
> -       if (ptype_mask)
> +       if (ptype_mask) {
>                 dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
> -       else
> +               dev->ptype_disable = 0;
> +       } else {
>                 dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
> +               dev->ptype_disable = 1;
> +       }
>
>         otx2_eth_set_rx_function(eth_dev);
>
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default
  2019-11-25 13:00 ` Jerin Jacob
@ 2019-11-25 14:02   ` Ferruh Yigit
  2019-11-25 15:55     ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2019-11-25 14:02 UTC (permalink / raw)
  To: Jerin Jacob, Pavan Nikhilesh
  Cc: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, dpdk-dev

On 11/25/2019 1:00 PM, Jerin Jacob wrote:
> On Sat, Nov 23, 2019 at 5:58 PM <pbhagavatula@marvell.com> wrote:
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Enable Ptype parsing by default, only disable when `rte_eth_dev_set_ptypes`
>> is called with ptype_mask as 0.
>> This would enable applications that are dependent on packet type parsing
>> like l3fwd.

This also helps to store the configuration set by 'rte_eth_dev_set_ptypes()', 
right? Previously it seems this was lost in next 'otx2_nix_configure()' call,
not sure if it worth mentioning in commit log.

>>
>> Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> 
> Applied to dpdk-next-net-mrvl/master. Thanks
> 
> 
>> ---
>>   drivers/net/octeontx2/otx2_ethdev.c | 4 ++++
>>   drivers/net/octeontx2/otx2_ethdev.h | 1 +
>>   drivers/net/octeontx2/otx2_lookup.c | 7 +++++--
>>   3 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
>> index ddab3aa06..eaf7ba917 100644
>> --- a/drivers/net/octeontx2/otx2_ethdev.c
>> +++ b/drivers/net/octeontx2/otx2_ethdev.c
>> @@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
>>          if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP))
>>                  flags |= NIX_RX_OFFLOAD_TSTAMP_F;
>>
>> +       if (!dev->ptype_disable)
>> +               flags |= NIX_RX_OFFLOAD_PTYPE_F;
>> +
>>          return flags;
>>   }
>>
>> @@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
>>
>>          dev->configured = 0;
>>          dev->drv_inited = true;
>> +       dev->ptype_disable = 0;
>>          dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20);
>>          dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20);
>>
>> diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
>> index eb1626309..987e7607c 100644
>> --- a/drivers/net/octeontx2/otx2_ethdev.h
>> +++ b/drivers/net/octeontx2/otx2_ethdev.h
>> @@ -276,6 +276,7 @@ struct otx2_eth_dev {
>>          uint8_t configured_cints;
>>          uint8_t configured_nb_rx_qs;
>>          uint8_t configured_nb_tx_qs;
>> +       uint8_t ptype_disable;
>>          uint16_t nix_msixoff;
>>          uintptr_t base;
>>          uintptr_t lmt_addr;
>> diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
>> index 17c44e20e..bcf2ff4e8 100644
>> --- a/drivers/net/octeontx2/otx2_lookup.c
>> +++ b/drivers/net/octeontx2/otx2_lookup.c
>> @@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev *eth_dev, uint32_t ptype_mask)
>>   {
>>          struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>>
>> -       if (ptype_mask)
>> +       if (ptype_mask) {
>>                  dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
>> -       else
>> +               dev->ptype_disable = 0;
>> +       } else {
>>                  dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
>> +               dev->ptype_disable = 1;
>> +       }
>>
>>          otx2_eth_set_rx_function(eth_dev);
>>
>> --
>> 2.17.1
>>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default
  2019-11-25 14:02   ` Ferruh Yigit
@ 2019-11-25 15:55     ` Pavan Nikhilesh Bhagavatula
  2019-11-25 16:09       ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2019-11-25 15:55 UTC (permalink / raw)
  To: Ferruh Yigit, Jerin Jacob
  Cc: Jerin Jacob Kollanukkaran, Nithin Kumar Dabilpuram,
	Kiran Kumar Kokkilagadda, dpdk-dev

Hi Ferruh,

>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
>Sent: Monday, November 25, 2019 7:32 PM
>To: Jerin Jacob <jerinjacobk@gmail.com>; Pavan Nikhilesh Bhagavatula
><pbhagavatula@marvell.com>
>Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
>Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
><kirankumark@marvell.com>; dpdk-dev <dev@dpdk.org>
>Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing
>disabled by default
>
>On 11/25/2019 1:00 PM, Jerin Jacob wrote:
>> On Sat, Nov 23, 2019 at 5:58 PM <pbhagavatula@marvell.com> wrote:
>>>
>>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>>
>>> Enable Ptype parsing by default, only disable when
>`rte_eth_dev_set_ptypes`
>>> is called with ptype_mask as 0.
>>> This would enable applications that are dependent on packet type
>parsing
>>> like l3fwd.
>
>This also helps to store the configuration set by
>'rte_eth_dev_set_ptypes()',
>right? Previously it seems this was lost in next 'otx2_nix_configure()'
>call,
>not sure if it worth mentioning in commit log.
>

I agree it is worth mentioning in the commit log. But since it has already been
pulled to next-net-mrvl can you please add it when you pull it to next-net?.
Something along the lines of 
"This patch preserves configuration set by `rte_eth_dev_set_ptypes` across 
multiple calls of `rte_eth_dev_configure`"

Many Thanks,
Pavan.


>>>
>>> Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet
>types")
>>>
>>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Acked-by: Jerin Jacob <jerinj@marvell.com>
>>
>> Applied to dpdk-next-net-mrvl/master. Thanks
>>
>>
>>> ---
>>>   drivers/net/octeontx2/otx2_ethdev.c | 4 ++++
>>>   drivers/net/octeontx2/otx2_ethdev.h | 1 +
>>>   drivers/net/octeontx2/otx2_lookup.c | 7 +++++--
>>>   3 files changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/octeontx2/otx2_ethdev.c
>b/drivers/net/octeontx2/otx2_ethdev.c
>>> index ddab3aa06..eaf7ba917 100644
>>> --- a/drivers/net/octeontx2/otx2_ethdev.c
>>> +++ b/drivers/net/octeontx2/otx2_ethdev.c
>>> @@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev
>*eth_dev)
>>>          if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP))
>>>                  flags |= NIX_RX_OFFLOAD_TSTAMP_F;
>>>
>>> +       if (!dev->ptype_disable)
>>> +               flags |= NIX_RX_OFFLOAD_PTYPE_F;
>>> +
>>>          return flags;
>>>   }
>>>
>>> @@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev
>*eth_dev)
>>>
>>>          dev->configured = 0;
>>>          dev->drv_inited = true;
>>> +       dev->ptype_disable = 0;
>>>          dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20);
>>>          dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20);
>>>
>>> diff --git a/drivers/net/octeontx2/otx2_ethdev.h
>b/drivers/net/octeontx2/otx2_ethdev.h
>>> index eb1626309..987e7607c 100644
>>> --- a/drivers/net/octeontx2/otx2_ethdev.h
>>> +++ b/drivers/net/octeontx2/otx2_ethdev.h
>>> @@ -276,6 +276,7 @@ struct otx2_eth_dev {
>>>          uint8_t configured_cints;
>>>          uint8_t configured_nb_rx_qs;
>>>          uint8_t configured_nb_tx_qs;
>>> +       uint8_t ptype_disable;
>>>          uint16_t nix_msixoff;
>>>          uintptr_t base;
>>>          uintptr_t lmt_addr;
>>> diff --git a/drivers/net/octeontx2/otx2_lookup.c
>b/drivers/net/octeontx2/otx2_lookup.c
>>> index 17c44e20e..bcf2ff4e8 100644
>>> --- a/drivers/net/octeontx2/otx2_lookup.c
>>> +++ b/drivers/net/octeontx2/otx2_lookup.c
>>> @@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev
>*eth_dev, uint32_t ptype_mask)
>>>   {
>>>          struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>>>
>>> -       if (ptype_mask)
>>> +       if (ptype_mask) {
>>>                  dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
>>> -       else
>>> +               dev->ptype_disable = 0;
>>> +       } else {
>>>                  dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
>>> +               dev->ptype_disable = 1;
>>> +       }
>>>
>>>          otx2_eth_set_rx_function(eth_dev);
>>>
>>> --
>>> 2.17.1
>>>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default
  2019-11-25 15:55     ` Pavan Nikhilesh Bhagavatula
@ 2019-11-25 16:09       ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-11-25 16:09 UTC (permalink / raw)
  To: Pavan Nikhilesh Bhagavatula, Jerin Jacob
  Cc: Jerin Jacob Kollanukkaran, Nithin Kumar Dabilpuram,
	Kiran Kumar Kokkilagadda, dpdk-dev

On 11/25/2019 3:55 PM, Pavan Nikhilesh Bhagavatula wrote:
> Hi Ferruh,
> 
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
>> Sent: Monday, November 25, 2019 7:32 PM
>> To: Jerin Jacob <jerinjacobk@gmail.com>; Pavan Nikhilesh Bhagavatula
>> <pbhagavatula@marvell.com>
>> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
>> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
>> <kirankumark@marvell.com>; dpdk-dev <dev@dpdk.org>
>> Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing
>> disabled by default
>>
>> On 11/25/2019 1:00 PM, Jerin Jacob wrote:
>>> On Sat, Nov 23, 2019 at 5:58 PM <pbhagavatula@marvell.com> wrote:
>>>>
>>>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>>>
>>>> Enable Ptype parsing by default, only disable when
>> `rte_eth_dev_set_ptypes`
>>>> is called with ptype_mask as 0.
>>>> This would enable applications that are dependent on packet type
>> parsing
>>>> like l3fwd.
>>
>> This also helps to store the configuration set by
>> 'rte_eth_dev_set_ptypes()',
>> right? Previously it seems this was lost in next 'otx2_nix_configure()'
>> call,
>> not sure if it worth mentioning in commit log.
>>
> 
> I agree it is worth mentioning in the commit log. But since it has already been
> pulled to next-net-mrvl can you please add it when you pull it to next-net?.
> Something along the lines of 
> "This patch preserves configuration set by `rte_eth_dev_set_ptypes` across 
> multiple calls of `rte_eth_dev_configure`"

Updated in next-net, thanks.

> 
> Many Thanks,
> Pavan.
> 
> 
>>>>
>>>> Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet
>> types")
>>>>
>>>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>>
>>> Acked-by: Jerin Jacob <jerinj@marvell.com>
>>>
>>> Applied to dpdk-next-net-mrvl/master. Thanks
>>>
>>>
>>>> ---
>>>>   drivers/net/octeontx2/otx2_ethdev.c | 4 ++++
>>>>   drivers/net/octeontx2/otx2_ethdev.h | 1 +
>>>>   drivers/net/octeontx2/otx2_lookup.c | 7 +++++--
>>>>   3 files changed, 10 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/octeontx2/otx2_ethdev.c
>> b/drivers/net/octeontx2/otx2_ethdev.c
>>>> index ddab3aa06..eaf7ba917 100644
>>>> --- a/drivers/net/octeontx2/otx2_ethdev.c
>>>> +++ b/drivers/net/octeontx2/otx2_ethdev.c
>>>> @@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev
>> *eth_dev)
>>>>          if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP))
>>>>                  flags |= NIX_RX_OFFLOAD_TSTAMP_F;
>>>>
>>>> +       if (!dev->ptype_disable)
>>>> +               flags |= NIX_RX_OFFLOAD_PTYPE_F;
>>>> +
>>>>          return flags;
>>>>   }
>>>>
>>>> @@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev
>> *eth_dev)
>>>>
>>>>          dev->configured = 0;
>>>>          dev->drv_inited = true;
>>>> +       dev->ptype_disable = 0;
>>>>          dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20);
>>>>          dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20);
>>>>
>>>> diff --git a/drivers/net/octeontx2/otx2_ethdev.h
>> b/drivers/net/octeontx2/otx2_ethdev.h
>>>> index eb1626309..987e7607c 100644
>>>> --- a/drivers/net/octeontx2/otx2_ethdev.h
>>>> +++ b/drivers/net/octeontx2/otx2_ethdev.h
>>>> @@ -276,6 +276,7 @@ struct otx2_eth_dev {
>>>>          uint8_t configured_cints;
>>>>          uint8_t configured_nb_rx_qs;
>>>>          uint8_t configured_nb_tx_qs;
>>>> +       uint8_t ptype_disable;
>>>>          uint16_t nix_msixoff;
>>>>          uintptr_t base;
>>>>          uintptr_t lmt_addr;
>>>> diff --git a/drivers/net/octeontx2/otx2_lookup.c
>> b/drivers/net/octeontx2/otx2_lookup.c
>>>> index 17c44e20e..bcf2ff4e8 100644
>>>> --- a/drivers/net/octeontx2/otx2_lookup.c
>>>> +++ b/drivers/net/octeontx2/otx2_lookup.c
>>>> @@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev
>> *eth_dev, uint32_t ptype_mask)
>>>>   {
>>>>          struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>>>>
>>>> -       if (ptype_mask)
>>>> +       if (ptype_mask) {
>>>>                  dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
>>>> -       else
>>>> +               dev->ptype_disable = 0;
>>>> +       } else {
>>>>                  dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
>>>> +               dev->ptype_disable = 1;
>>>> +       }
>>>>
>>>>          otx2_eth_set_rx_function(eth_dev);
>>>>
>>>> --
>>>> 2.17.1
>>>>
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-23  8:58 [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default pbhagavatula
2019-11-25 13:00 ` Jerin Jacob
2019-11-25 14:02   ` Ferruh Yigit
2019-11-25 15:55     ` Pavan Nikhilesh Bhagavatula
2019-11-25 16:09       ` Ferruh Yigit

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox