From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
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 v2] net/octeontx2: add set supported types op
Date: Thu, 17 Oct 2019 16:47:56 +0000 [thread overview]
Message-ID: <CY4PR1801MB1863E80B2863EB2EFBF91B17DE6D0@CY4PR1801MB1863.namprd18.prod.outlook.com> (raw)
>On Thu, Oct 17, 2019 at 5:50 PM <pbhagavatula@marvell.com> wrote:
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add support to set supported ptypes for octeontx2.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> ---
>> v2 Changes:
>> ----------
>> - Update documentation.
>
>See below.
>
>> - Use positive logic.
>>
>> drivers/net/octeontx2/otx2_ethdev.c | 1 +
>> drivers/net/octeontx2/otx2_ethdev.h | 2 ++
>> drivers/net/octeontx2/otx2_ethdev_devargs.c | 21 ---------------------
>> drivers/net/octeontx2/otx2_lookup.c | 15 +++++++++++++++
>
>It looks like forgot to update the documentation file.
Ah yes, I missed git add on doc file. Will send v3.
>
>
> 4 files changed, 18 insertions(+), 21 deletions(-)
>>
>> diff --git a/drivers/net/octeontx2/otx2_ethdev.c
>b/drivers/net/octeontx2/otx2_ethdev.c
>> index 4a60f9f74..361a3d993 100644
>> --- a/drivers/net/octeontx2/otx2_ethdev.c
>> +++ b/drivers/net/octeontx2/otx2_ethdev.c
>> @@ -1944,6 +1944,7 @@ static const struct eth_dev_ops
>otx2_eth_dev_ops = {
>> .dev_set_link_up = otx2_nix_dev_set_link_up,
>> .dev_set_link_down = otx2_nix_dev_set_link_down,
>> .dev_supported_ptypes_get = otx2_nix_supported_ptypes_get,
>> + .dev_supported_ptypes_set = otx2_nix_supported_ptypes_set,
>> .dev_reset = otx2_nix_dev_reset,
>> .stats_get = otx2_nix_dev_stats_get,
>> .stats_reset = otx2_nix_dev_stats_reset,
>> diff --git a/drivers/net/octeontx2/otx2_ethdev.h
>b/drivers/net/octeontx2/otx2_ethdev.h
>> index 33fa0c60b..a5bf89090 100644
>> --- a/drivers/net/octeontx2/otx2_ethdev.h
>> +++ b/drivers/net/octeontx2/otx2_ethdev.h
>> @@ -506,6 +506,8 @@ void
>*otx2_nix_fastpath_lookup_mem_get(void);
>>
>> /* PTYPES */
>> const uint32_t *otx2_nix_supported_ptypes_get(struct rte_eth_dev
>*dev);
>> +int otx2_nix_supported_ptypes_set(struct rte_eth_dev *eth_dev,
>> + uint32_t ptype_mask);
>>
>> /* Mac address handling */
>> int otx2_nix_mac_addr_set(struct rte_eth_dev *eth_dev,
>> diff --git a/drivers/net/octeontx2/otx2_ethdev_devargs.c
>b/drivers/net/octeontx2/otx2_ethdev_devargs.c
>> index 7dc6e92be..9ad00c6f4 100644
>> --- a/drivers/net/octeontx2/otx2_ethdev_devargs.c
>> +++ b/drivers/net/octeontx2/otx2_ethdev_devargs.c
>> @@ -63,21 +63,6 @@ parse_reta_size(const char *key, const char
>*value, void *extra_args)
>> return 0;
>> }
>>
>> -static int
>> -parse_ptype_flag(const char *key, const char *value, void
>*extra_args)
>> -{
>> - RTE_SET_USED(key);
>> - uint32_t val;
>> -
>> - val = atoi(value);
>> - if (val)
>> - val = 0; /* Disable NIX_RX_OFFLOAD_PTYPE_F */
>> -
>> - *(uint16_t *)extra_args = val;
>> -
>> - return 0;
>> -}
>> -
>> static int
>> parse_flag(const char *key, const char *value, void *extra_args)
>> {
>> @@ -105,7 +90,6 @@ parse_sqb_count(const char *key, const char
>*value, void *extra_args)
>> }
>>
>> #define OTX2_RSS_RETA_SIZE "reta_size"
>> -#define OTX2_PTYPE_DISABLE "ptype_disable"
>> #define OTX2_SCL_ENABLE "scalar_enable"
>> #define OTX2_MAX_SQB_COUNT "max_sqb_count"
>> #define OTX2_FLOW_PREALLOC_SIZE "flow_prealloc_size"
>> @@ -114,7 +98,6 @@ parse_sqb_count(const char *key, const char
>*value, void *extra_args)
>> int
>> otx2_ethdev_parse_devargs(struct rte_devargs *devargs, struct
>otx2_eth_dev *dev)
>> {
>> - uint16_t offload_flag = NIX_RX_OFFLOAD_PTYPE_F;
>> uint16_t rss_size = NIX_RSS_RETA_SIZE;
>> uint16_t sqb_count = NIX_MAX_SQB;
>> uint16_t flow_prealloc_size = 8;
>> @@ -129,8 +112,6 @@ otx2_ethdev_parse_devargs(struct
>rte_devargs *devargs, struct otx2_eth_dev *dev)
>> if (kvlist == NULL)
>> goto exit;
>>
>> - rte_kvargs_process(kvlist, OTX2_PTYPE_DISABLE,
>> - &parse_ptype_flag, &offload_flag);
>> rte_kvargs_process(kvlist, OTX2_RSS_RETA_SIZE,
>> &parse_reta_size, &rss_size);
>> rte_kvargs_process(kvlist, OTX2_SCL_ENABLE,
>> @@ -144,7 +125,6 @@ otx2_ethdev_parse_devargs(struct
>rte_devargs *devargs, struct otx2_eth_dev *dev)
>> rte_kvargs_free(kvlist);
>>
>> null_devargs:
>> - dev->rx_offload_flags = offload_flag;
>> dev->scalar_ena = scalar_enable;
>> dev->max_sqb_count = sqb_count;
>> dev->rss_info.rss_size = rss_size;
>> @@ -158,7 +138,6 @@ otx2_ethdev_parse_devargs(struct
>rte_devargs *devargs, struct otx2_eth_dev *dev)
>>
>> RTE_PMD_REGISTER_PARAM_STRING(net_octeontx2,
>> OTX2_RSS_RETA_SIZE "=<64|128|256>"
>> - OTX2_PTYPE_DISABLE "=1"
>> OTX2_SCL_ENABLE "=1"
>> OTX2_MAX_SQB_COUNT "=<8-512>"
>> OTX2_FLOW_PREALLOC_SIZE "=<1-32>"
>> diff --git a/drivers/net/octeontx2/otx2_lookup.c
>b/drivers/net/octeontx2/otx2_lookup.c
>> index 3071278fc..8e15b59a0 100644
>> --- a/drivers/net/octeontx2/otx2_lookup.c
>> +++ b/drivers/net/octeontx2/otx2_lookup.c
>> @@ -62,6 +62,21 @@ otx2_nix_supported_ptypes_get(struct
>rte_eth_dev *eth_dev)
>> return NULL;
>> }
>>
>> +int
>> +otx2_nix_supported_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)
>> + dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F;
>> + else
>> + dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F;
>> +
>> + otx2_eth_set_rx_function(eth_dev);
>> +
>> + return 0;
>> +}
>> +
>> /*
>> * +------------------ +------------------ +
>> * | | IL4 | IL3| IL2 | TU | L4 | L3 | L2 |
>> --
>> 2.17.1
>>
next reply other threads:[~2019-10-17 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 16:47 Pavan Nikhilesh Bhagavatula [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-10-08 9:00 [dpdk-dev] [PATCH] " pbhagavatula
2019-10-17 12:20 ` [dpdk-dev] [PATCH v2] " pbhagavatula
2019-10-17 16:22 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY4PR1801MB1863E80B2863EB2EFBF91B17DE6D0@CY4PR1801MB1863.namprd18.prod.outlook.com \
--to=pbhagavatula@marvell.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).