DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Kirill Rybalchenko <kirill.rybalchenko@intel.com>, dev@dpdk.org
Cc: andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com
Subject: Re: [dpdk-dev] [PATCH v2 3/4] app/testpmd: add new commands to manipulate with pctype mapping
Date: Fri, 8 Sep 2017 18:02:37 +0100	[thread overview]
Message-ID: <95b2b15d-527f-b2eb-0f32-035dee1a7ed5@intel.com> (raw)
In-Reply-To: <1504278166-32769-4-git-send-email-kirill.rybalchenko@intel.com>

On 9/1/2017 4:02 PM, Kirill Rybalchenko wrote:
> Add new commands to manipulate with dynamic flow type to
> pctype mapping table in i40e PMD.
> Commands allow to print table, modify it and reset to default value.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>  app/test-pmd/cmdline.c                      | 311 +++++++++++++++++++++++++++-
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  21 ++
>  2 files changed, 322 insertions(+), 10 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 0144191..f7d0733 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -637,6 +637,16 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			"ptype mapping update (port_id) (hw_ptype) (sw_ptype)\n"
>  			"    Update a ptype mapping item on a port\n\n"
>  
> +			"pctype mapping reset (port_id)\n"
> +			"    Reset flow type to pctype mapping on a port\n\n"
> +
> +			"pctype mapping get (port_id)\n"
> +			"    Get flow ptype to pctype mapping on a port\n\n"
> +
> +			"pctype mapping update (port_id) (pctype_id_0[,pctype_id_1]*)"
> +			" (flow_type_id)\n"
> +			"    Update a flow type to pctype mapping item on a port\n\n"

This is another root level command for PMD specific feature, can this be
under "port" or "set" command?

> +
>  			, list_pkt_forwarding_modes()
>  		);
>  	}
> @@ -681,7 +691,8 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			"    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
>  			" for ports.\n\n"
>  
> -			"port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)\n"
> +			"port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|"
> +			"geneve|nvgre|none|<flowtype_id>)\n"

Why not use existing defined hash functions but use custom one, is there
a missing one in ethdev?

>  			"    Set the RSS mode.\n\n"
>  
>  			"port config port-id rss reta (hash,queue)[,(hash,queue)]\n"
> @@ -878,8 +889,8 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			"set_hash_input_set (port_id) (ipv4|ipv4-frag|"
>  			"ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|"
>  			"ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
> -			"l2_payload) (ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|"
> -			"dst-ipv6|ipv4-tos|ipv4-proto|ipv6-tc|"
> +			"l2_payload|<flowtype_id>) (ovlan|ivlan|src-ipv4|dst-ipv4|"
> +			"src-ipv6|dst-ipv6|ipv4-tos|ipv4-proto|ipv6-tc|"
>  			"ipv6-next-header|udp-src-port|udp-dst-port|"
>  			"tcp-src-port|tcp-dst-port|sctp-src-port|"
>  			"sctp-dst-port|sctp-veri-tag|udp-key|gre-key|fld-1st|"
> @@ -1716,6 +1727,8 @@ cmd_config_rss_parsed(void *parsed_result,
>  		rss_conf.rss_hf = ETH_RSS_NVGRE;
>  	else if (!strcmp(res->value, "none"))
>  		rss_conf.rss_hf = 0;
> +	else if (isdigit(res->value[0]) && atoi(res->value) > 0 && atoi(res->value) < 64)
> +		rss_conf.rss_hf = 1ULL << atoi(res->value);
>  	else {
>  		printf("Unknown parameter\n");
>  		return;
> @@ -1739,14 +1752,13 @@ cmdline_parse_token_string_t cmd_config_rss_all =
>  cmdline_parse_token_string_t cmd_config_rss_name =
>  	TOKEN_STRING_INITIALIZER(struct cmd_config_rss, name, "rss");
>  cmdline_parse_token_string_t cmd_config_rss_value =
> -	TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value,
> -		"all#ip#tcp#udp#sctp#ether#port#vxlan#geneve#nvgre#none");
> +	TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value, NULL);

I guess this will prevent auto completion.

<...>

> +/* pctype mapping get */
> +
> +#define FLOW_TYPE_MAX 64
> +#define PCTYPE_MAX    64

These should not be defined by application I believe.

<...>

> +static void
> +cmd_pctype_mapping_update_parsed(
> +	void *parsed_result,
> +	__attribute__((unused)) struct cmdline *cl,
> +	__attribute__((unused)) void *data)
> +{
> +	struct cmd_pctype_mapping_update_result *res = parsed_result;
> +	int ret = -ENOTSUP;
> +#ifdef RTE_LIBRTE_I40E_PMD
> +	struct rte_pmd_i40e_flow_type_mapping mapping;
> +#endif
> +	unsigned int nb_item, i;
> +	unsigned int pctype_list[PCTYPE_MAX];
> +
> +	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
> +		return;
> +
> +	nb_item = parse_item_list(res->pctype_list, "pctypes", PCTYPE_MAX,
> +				  pctype_list, 1);

How user knows which values to fill the pctype_list?

More importantly, if this is an API call instead of user defined values,
how application should know which values to use? I am trying to say
pctype values defined in i40e driver somehow needs to public to be used.


<...>

> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -1310,6 +1310,27 @@ Reset ptype mapping table::
>  
>     testpmd> ptype mapping reset (port_id)
>  
> +pctype mapping
> +~~~~~~~~~~~~~

WARNING: .../testpmd_app_ug/testpmd_funcs.rst:1314: (WARNING/2) Title
underline too short.





pctype mapping



~~~~~~~~~~~~~

<...>

  parent reply	other threads:[~2017-09-08 17:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1503569908-104074-1-git-send-email-kirill.rybalchenko@intel.com>
2017-09-01 15:02 ` [dpdk-dev] [PATCH v2 0/4] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-09-01 15:02   ` [dpdk-dev] [PATCH v2 1/4] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-09-04 16:49     ` Ananyev, Konstantin
2017-09-08 16:58     ` Ferruh Yigit
2017-09-01 15:02   ` [dpdk-dev] [PATCH v2 2/4] net/i40e: add new functions to manipulate with pctype mapping table Kirill Rybalchenko
2017-09-04 17:24     ` Iremonger, Bernard
2017-09-08 17:01     ` Ferruh Yigit
2017-09-01 15:02   ` [dpdk-dev] [PATCH v2 3/4] app/testpmd: add new commands to manipulate with pctype mapping Kirill Rybalchenko
2017-09-04 17:29     ` Iremonger, Bernard
2017-09-08 17:02     ` Ferruh Yigit [this message]
2017-09-01 15:02   ` [dpdk-dev] [PATCH v2 4/4] ethdev: remove unnecessary check for new flow type Kirill Rybalchenko
2017-09-08 17:01     ` Ferruh Yigit
2017-09-04 17:16   ` [dpdk-dev] [PATCH v2 0/4] net/i40e: implement dynamic mapping of flow types to pctypes Iremonger, Bernard
2017-09-20 14:32   ` [dpdk-dev] [PATCH v3 0/6] " Kirill Rybalchenko
2017-09-20 14:32     ` [dpdk-dev] [PATCH v3 1/6] net/i40e: remove unnecessary bit operations Kirill Rybalchenko
2017-09-20 14:32     ` [dpdk-dev] [PATCH v3 2/6] net/i40e: add definition for invalid pctype Kirill Rybalchenko
2017-09-22  7:29       ` Xing, Beilei
2017-09-20 14:33     ` [dpdk-dev] [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-09-25  9:44       ` Xing, Beilei
2017-09-20 14:33     ` [dpdk-dev] [PATCH v3 4/6] net/i40e: add new functions to manipulate with pctype mapping table Kirill Rybalchenko
2017-09-22  7:27       ` Xing, Beilei
2017-09-20 14:33     ` [dpdk-dev] [PATCH v3 5/6] app/testpmd: add new commands to manipulate with pctype mapping Kirill Rybalchenko
2017-09-25 11:54       ` Xing, Beilei
2017-09-20 14:33     ` [dpdk-dev] [PATCH v3 6/6] ethdev: remove unnecessary check for new flow type Kirill Rybalchenko
2017-10-02 15:08     ` [dpdk-dev] [PATCH v4 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-10-02 15:08       ` [dpdk-dev] [PATCH v4 1/5] net/i40e: remove unnecessary bit operations Kirill Rybalchenko
2017-10-02 15:08       ` [dpdk-dev] [PATCH v4 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-10-02 15:09       ` [dpdk-dev] [PATCH v4 3/5] net/i40e: add new functions to manipulate with pctype mapping table Kirill Rybalchenko
2017-10-02 15:09       ` [dpdk-dev] [PATCH v4 4/5] app/testpmd: add new commands to manipulate with pctype mapping Kirill Rybalchenko
2017-10-03 21:42         ` Ferruh Yigit
2017-10-02 15:09       ` [dpdk-dev] [PATCH v4 5/5] ethdev: remove unnecessary check for new flow type Kirill Rybalchenko
2017-10-03 21:44       ` [dpdk-dev] [PATCH v4 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Ferruh Yigit
2017-10-04 12:52       ` [dpdk-dev] [PATCH v5 " Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 1/5] net/i40e: remove unnecessary bit operations Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 3/5] net/i40e: add new functions to manipulate with pctype mapping table Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 4/5] app/testpmd: add new commands to manipulate with pctype mapping Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 5/5] ethdev: remove unnecessary check for new flow type Kirill Rybalchenko
2017-10-04 21:48         ` [dpdk-dev] [PATCH v5 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Ferruh Yigit
2017-10-05  1:28           ` Ferruh Yigit

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=95b2b15d-527f-b2eb-0f32-035dee1a7ed5@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrey.chilikin@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=kirill.rybalchenko@intel.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).