dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Ori Kam <orika@mellanox.com>,
	"pbhagavatula@marvell.com" <pbhagavatula@marvell.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"John McNamara" <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"Adrien Mazarguil" <adrien.mazarguil@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an offload
Date: Mon, 28 Oct 2019 14:53:47 +0300	[thread overview]
Message-ID: <fbdc0419-b93d-6e61-d6cf-341ecf101b13@solarflare.com> (raw)
In-Reply-To: <AM4PR05MB3425C21E79F05FD6BEA24142DB660@AM4PR05MB3425.eurprd05.prod.outlook.com>

Hi Ori,

On 10/28/19 1:50 PM, Ori Kam wrote:
> Hi Pavan,
>
> Sorry for jumping in late.
>
> I don't understand why we need this feature. If the user didn't set any flow with MARK
> then the user doesn't need to check it.

There is pretty long discussion on the topic already, please, read [1].

[1] 
http://inbox.dpdk.org/dev/3251fc00-7598-1c4f-fc2a-380065f0a435@solarflare.com/

> Also it breaks compatibility.

Yes, there is a deprecation notice for it.

> If my understanding is correct the MARK field is going to be moved to dynamic field, and this
> will be way to control the use of MARK.

Yes and I think the offload should used to request dynamic
field register. Similar to timestamp in dynamic mbuf examples.
Application requests Rx timestamp offload, PMD registers dynamic
filed.

> Other option is inside the PMD if one flow uses mark only than copy the mark to mbuf.
>
> Please also not that we have deprecation notice on the FDIR.
>
> Thanks,
> Ori
>
>
>
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of pbhagavatula@marvell.com
>> Sent: Friday, October 25, 2019 6:22 PM
>> To: ferruh.yigit@intel.com; arybchenko@solarflare.com; jerinj@marvell.com;
>> John McNamara <john.mcnamara@intel.com>; Marko Kovacevic
>> <marko.kovacevic@intel.com>; Thomas Monjalon <thomas@monjalon.net>;
>> Adrien Mazarguil <adrien.mazarguil@6wind.com>
>> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
>> Subject: [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an
>> offload
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
>> enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
>> `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
>> `RTE_FLOW_ACTION_FLAG` are enabled.
>>
>> PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
>> by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>>   doc/guides/nics/features.rst           | 12 ++++++++++++
>>   doc/guides/rel_notes/release_19_11.rst |  9 +++++++++
>>   lib/librte_ethdev/rte_ethdev.c         |  1 +
>>   lib/librte_ethdev/rte_ethdev.h         |  1 +
>>   lib/librte_ethdev/rte_flow.h           |  6 ++++--
>>   5 files changed, 27 insertions(+), 2 deletions(-)
>>
>> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
>> index d96696801..0d8d08c18 100644
>> --- a/doc/guides/nics/features.rst
>> +++ b/doc/guides/nics/features.rst
>> @@ -588,6 +588,18 @@ Supports packet type parsing and returns a list of
>> supported types.
>>   * **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``.
>>
>>
>> +.. _nic_features_flow_flag_mark:
>> +
>> +Flow flag/mark update
>> +---------------------
>> +
>> +Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
>> +
>> +* **[uses]     rte_eth_rxconf,rte_eth_rxmode**:
>> ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
>> +* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``,
>> ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
>> +  ``mbuf.hash.fdir.hi``
>> +
>> +
>>   .. _nic_features_timesync:
>>
>>   Timesync
>> diff --git a/doc/guides/rel_notes/release_19_11.rst
>> b/doc/guides/rel_notes/release_19_11.rst
>> index faf69b0d9..8593fea0e 100644
>> --- a/doc/guides/rel_notes/release_19_11.rst
>> +++ b/doc/guides/rel_notes/release_19_11.rst
>> @@ -185,6 +185,15 @@ New Features
>>     * Added a console command to testpmd app, ``show port (port_id) ptypes``
>> which
>>       gives ability to print port supported ptypes in different protocol layers.
>>
>> +* **Added Rx offload flag to enable or disable flow action type update**
>> +
>> +  *  Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be
>> used to
>> +     enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
>> +     `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
>> +     `RTE_FLOW_ACTION_FLAG` are enabled.
>> +  *  PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the application
>> +     by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
>> +
>>
>>   Removed Items
>>   -------------
>> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
>> index 7743205d3..f70065043 100644
>> --- a/lib/librte_ethdev/rte_ethdev.c
>> +++ b/lib/librte_ethdev/rte_ethdev.c
>> @@ -129,6 +129,7 @@ static const struct {
>>   	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
>>   	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
>>   	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
>> +	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
>>   };
>>
>>   #undef RTE_RX_OFFLOAD_BIT2STR
>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
>> index c36c1b631..c4e626da7 100644
>> --- a/lib/librte_ethdev/rte_ethdev.h
>> +++ b/lib/librte_ethdev/rte_ethdev.h
>> @@ -1048,6 +1048,7 @@ struct rte_eth_conf {
>>   #define DEV_RX_OFFLOAD_KEEP_CRC		0x00010000
>>   #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
>>   #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
>> +#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
>>
>>   #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
>>   				 DEV_RX_OFFLOAD_UDP_CKSUM | \
>> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
>> index 4fee10559..6698640fb 100644
>> --- a/lib/librte_ethdev/rte_flow.h
>> +++ b/lib/librte_ethdev/rte_flow.h
>> @@ -1538,7 +1538,8 @@ enum rte_flow_action_type {
>>
>>   	/**
>>   	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
>> -	 * PKT_RX_FDIR_ID mbuf flags.
>> +	 * PKT_RX_FDIR_ID mbuf flags when
>> +	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
>>   	 *
>>   	 * See struct rte_flow_action_mark.
>>   	 */
>> @@ -1546,7 +1547,8 @@ enum rte_flow_action_type {
>>
>>   	/**
>>   	 * Flags packets. Similar to MARK without a specific value; only
>> -	 * sets the PKT_RX_FDIR mbuf flag.
>> +	 * sets the PKT_RX_FDIR mbuf flag when
>> +	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
>>   	 *
>>   	 * No associated configuration structure.
>>   	 */
>> --
>> 2.17.1


  reply	other threads:[~2019-10-28 11:54 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 15:21 [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an offload pbhagavatula
2019-10-25 15:21 ` [dpdk-dev] [PATCH 2/2] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
2019-10-28 10:50 ` [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an offload Ori Kam
2019-10-28 11:53   ` Andrew Rybchenko [this message]
2019-10-28 14:00     ` Ori Kam
2019-10-31  9:49       ` Andrew Rybchenko
2019-10-31 14:49         ` Thomas Monjalon
2019-10-31 23:59           ` Zhang, Qi Z
2019-11-01 11:35           ` Andrew Rybchenko
2019-11-03 10:22             ` Ori Kam
2019-11-03 11:41               ` Andrew Rybchenko
2019-11-04 18:37                 ` Ori Kam
2019-11-05  6:50                   ` Andrew Rybchenko
2019-11-05  8:35                     ` Ori Kam
2019-11-05 11:30                       ` Andrew Rybchenko
2019-11-05 16:37                         ` Ori Kam
2019-11-06  6:40                           ` Andrew Rybchenko
2019-11-06  7:42                             ` Ori Kam
2019-11-08  8:35                               ` Andrew Rybchenko
2019-11-08  9:00                                 ` Tom Barbette
2019-11-08 10:28                                 ` Thomas Monjalon
2019-11-08 10:42                                   ` Andrew Rybchenko
2019-11-08 11:03                                     ` Thomas Monjalon
2019-11-08 11:40                                       ` Zhang, Qi Z
2019-11-08 12:12                                         ` Ori Kam
2019-11-08 12:20                                           ` Andrew Rybchenko
2019-11-08 12:42                                             ` Ori Kam
2019-11-08 13:16                                               ` Zhang, Qi Z
2019-11-08 13:26                                                 ` Thomas Monjalon
2019-11-08 13:06                                         ` Thomas Monjalon
2019-11-08 12:00                                       ` Andrew Rybchenko
2019-11-08 13:17                                         ` Thomas Monjalon
2019-11-08 13:27                                           ` Andrew Rybchenko
2019-11-08 13:30                                             ` Thomas Monjalon
2019-11-19  9:24                                               ` Andrew Rybchenko
2019-11-19  9:50                                                 ` Thomas Monjalon
2019-11-19 10:59                                                   ` Andrew Rybchenko
2019-11-19 11:09                                                     ` Thomas Monjalon
2020-07-03 14:34                                                       ` Ferruh Yigit
2021-02-17 13:45                                                         ` Ferruh Yigit
2021-02-17 14:10                                                           ` Thomas Monjalon
2021-04-20  1:05                                                             ` 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=fbdc0419-b93d-6e61-d6cf-341ecf101b13@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=thomas@monjalon.net \
    /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).