DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "Xueming(Steven) Li" <xuemingl@mellanox.com>, dev <dev@dpdk.org>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	 Thomas Monjalon <thomas@monjalon.net>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [RFC v2] ethdev: add flow metadata
Date: Thu, 23 Aug 2018 20:41:44 +0000	[thread overview]
Message-ID: <CB6E47F7-01B9-4763-9D8A-BABA06EEC450@mellanox.com> (raw)
In-Reply-To: <ba0bdf04-8e65-c8a9-b9fe-eab8692e76d0@intel.com>


> On Aug 20, 2018, at 8:45 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> On 6/26/2018 9:54 AM, Xueming Li wrote:
>> Currently, rte_flow pattern only match packet header fields.
>> This patch adds additional data to match the packet.
>> 
>> For example, in egress direction, to do an action depending on the VM
>> id, the application needs to configure rte_flow rule with the new
>> metadata pattern:
>>    pattern meta data is {vm} / end action encap …
>> Then the PMD will send VM id as metadata associated in mbuf to NIC,
>> then egress flow on NIC match metadata as other regular packet headers,
>> the appropriate encapsulation is done according to the VM id metadata.
>> 
>> Metadata could be used on ingress as well to save useful info before
>> flow modification (not defined yet) or decapsulation action. PMD is
>> responsible to save metadata into mbuf field. The application must get
>> metadata from the mbuf.
>> 
>> Cc: Thomas Monjalon <thomas@monjalon.net>
>> Cc: Olivier Matz <olivier.matz@6wind.com>
>> Cc: Shahaf Shuler <shahafs@mellanox.com>
>> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
>> ---
>> doc/guides/prog_guide/rte_flow.rst |  7 +++++++
>> lib/librte_ethdev/rte_flow.c       |  1 +
>> lib/librte_ethdev/rte_flow.h       | 28 ++++++++++++++++++++++++++++
>> 3 files changed, 36 insertions(+)
>> 
>> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
>> index b305a72a5..7989e5856 100644
>> --- a/doc/guides/prog_guide/rte_flow.rst
>> +++ b/doc/guides/prog_guide/rte_flow.rst
>> @@ -1191,6 +1191,13 @@ Normally preceded by any of:
>> - `Item: ICMP6_ND_NS`_
>> - `Item: ICMP6_ND_OPT`_
>> 
>> +Item: ``META``
>> +^^^^^^^^^^^^^^
>> +
>> +Matches a metadata variable.
>> +
>> +- ``data``: 64 bit value.
>> +
> 
> Isn't this "user data" more than metadata?
> 
> And there is only one userdata can be provided for a flow.
> Can there be a need to provide multiple userdata? Should we support it?
> For your example, on egress what if you want to do specific action on a flow for
> both VM id and process id, you can only pass single user data?
> What about passing a key-value pair?

It could be matter of how device supports metadata. I assume that most of devices
would support one single metadata. Then, we can leave it as user's choice. I mean
user can partition 64bit according to its need. E.g. (key << 32) | value.

Thanks,
Yongseok


      parent reply	other threads:[~2018-08-23 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 12:52 [dpdk-dev] [RFC v1] " Xueming Li
2018-06-26  8:54 ` [dpdk-dev] [RFC v2] " Xueming Li
2018-08-20 15:45   ` Ferruh Yigit
2018-08-20 16:03     ` Ferruh Yigit
2018-08-23 20:41     ` Yongseok Koh [this message]

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=CB6E47F7-01B9-4763-9D8A-BABA06EEC450@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=xuemingl@mellanox.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).