DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Dekel Peled <dekelp@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>
Cc: Ori Kam <orika@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>
Subject: Re: [dpdk-dev] [RFC] ethdev: support metadata as flow rule criteria
Date: Thu, 23 Aug 2018 16:34:49 +0100	[thread overview]
Message-ID: <6ee5f829-79bc-43dc-a2b5-aeacbad4fd62@intel.com> (raw)
In-Reply-To: <VI1PR05MB42248D2A8FCCE4A2F4DCE8C9B6390@VI1PR05MB4224.eurprd05.prod.outlook.com>

On 8/13/2018 9:03 AM, Dekel Peled wrote:
> Adding relevant maintainers.
>  
>> -----Original Message-----
>> From: Dekel Peled [mailto:dekelp@mellanox.com]
>> Sent: Monday, August 13, 2018 10:47 AM
>> To: dev@dpdk.org
>> Cc: Ori Kam <orika@mellanox.com>; Shahaf Shuler
>> <shahafs@mellanox.com>
>> Subject: [RFC] ethdev: support metadata as flow rule criteria
>>
>> Current implementation of rte_flow allows match pattern of flow rule, based
>> on packet data or header fields.
>> This limits the application use of match patterns.
>>
>> For example, consider a vswitch application which controls a set of VMs,
>> connected with virtio, in a fabric with overlay of VXLAN.
>> Several VMs can have the same inner tuple, while the outer tuple is different
>> and controlled by the vswitch (encap action).
>> For the vswtich to be able to offload the rule to the NIC, it must use a unique
>> match criteria, independent from the inner tuple, to perform the encap
>> action.
>>
>> This RFC adds support for additional metadata to use as match pattern.
>> The metadata is an opaque item, fully controlled by the application.
>>
>> The use of metadata is relevant for egress rules only.
>> It can be set in the flow rule using the RTE_FLOW_ITEM_META.
>>
>> Application should set the packet metdata in the mbuf->metadata field, and
>> set the PKT_TX_METADATA flag in the mbuf->ol_flags.
>> The NIC will use the packet metadata as match criteria for relevant flow rules.
>>
>> For example, to do an encap action depending on the VM id, the application
>> needs to configure 'match on metadata' rte_flow rule with VM id as
>> metadata, along with desired encap action.
>> When preparing an egress data packet, application will set VM id data in
>> mbuf metadata field and set PKT_TX_METADATA flag.
>>
>> PMD will send data packets to NIC, with VM id as metadata.
>> Egress flow on NIC will match metadata as done with other criteria.
>> Upon match on metadata (VM id) the appropriate encap action will be
>> performed.
>>
>> This RFC introduces metadata item type for rte_flow
>> RTE_FLOW_ITEM_META, along with corresponding struct
>> rte_flow_item_meta and ol_flag PKT_TX_METADATA.
>> It also enhances struct rte_mbuf with new data item, uint64_t metadata.
>>
>> Comments are welcome.
>>
>> Signed-off-by: Dekel Peled <dekelp@mellanox.com>

Why not use mbuf->udata64 but add a new field?


In your sample, the information that "metadata" contains the VM id needs to be
implemented into PMD so that it can program HW accordingly, this is not
flexible. What if app needs to provide another custom id, how PMD can know if
provided metadata is VM id or custom id?
Won't be better to provide an id_type and id_value, PMD can be implemented to
behave different for id_type and use the id_value in the context of that type?

  parent reply	other threads:[~2018-08-23 15:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13  7:46 Dekel Peled
2018-08-13  8:03 ` Dekel Peled
2018-08-21 13:08   ` Ananyev, Konstantin
2018-08-22  7:59     ` Dekel Peled
2018-08-22 12:13       ` Ananyev, Konstantin
2018-08-23 21:34         ` Yongseok Koh
2018-08-23 15:34   ` Ferruh Yigit [this message]
2018-08-22 13:31 ` Andrew Rybchenko
2018-08-23 21:31   ` Yongseok Koh
2018-08-24 10:11     ` Ananyev, Konstantin
2018-08-28 19:15       ` Yongseok Koh
2018-08-26 14:09 ` [dpdk-dev] [RFC v2] " Dekel Peled
2018-08-28 19:44   ` Yongseok Koh
2018-08-29  6:33     ` Dekel Peled
2018-08-29 12:06       ` Somnath Kotur
2018-08-30  6:02         ` Dekel Peled

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=6ee5f829-79bc-43dc-a2b5-aeacbad4fd62@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@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).