DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ivan Malov <Ivan.Malov@oktetlabs.ru>, Ori Kam <orika@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v1 02/12] ethdev: add eswitch port item to flow API
Date: Thu, 7 Oct 2021 19:06:31 +0300	[thread overview]
Message-ID: <d4510c53-c551-44a4-43e0-bdc31b55d8e0@oktetlabs.ru> (raw)
In-Reply-To: <76c32bc6-2695-62fb-c88c-38046244e2b8@oktetlabs.ru>

Hi Ori, Ivan,

On 10/7/21 5:35 PM, Ivan Malov wrote:
> Hi Ori,
> 
> On 07/10/2021 16:00, Ori Kam wrote:
>> Hi Ivan,
>>
>>> -----Original Message-----
>>> From: Ivan Malov <Ivan.Malov@oktetlabs.ru>
>>> Subject: Re: [PATCH v1 02/12] ethdev: add eswitch port item to flow API
>>>
>>> Hi all,
>>>
>>> I apologise for sending more mail. In fact, yet another option comes 
>>> to mind. In
>>> order to move away from confusion with "port mirroring" but preserve the
>>> "symmetry" flavour in the new name, we can go for "SHADOW_PORT".
>>>
>>> So, to sum up, I propose the new diagram (see the previous letter) 
>>> and the new
>>> naming scheme: items / actions ETHDEV_PORT and SHADOW_PORT.
>>>
>>
>> I'm O.K with the suggested names Andrew what do you think?

Acceptable. I think I like REMOTE_PORT more. But have no strong opinion.

>>
>>> I hope this will get us on the same page.
>>>
>>> On 06/10/2021 21:00, Ivan Malov wrote:
>>>> BTW, one more alternative to "MIRROR_PORT" is "REMOTE_PORT".
>>>>
>>>> On 06/10/2021 18:30, Ivan Malov wrote:
>>>>> Hi Ori,
>>>>>
>>>>> By the looks of it, we are starting to run into slight 
>>>>> misunderstanding.
>>
>> 😊 This I a confusing subject.
> 
> Yes. Offloads tend to get more complex over time. So do network 
> adapters. But I hope that this work on PORT_ID replacement is leading us 
> toward the least confusing concept, little by little.
> 
>>
>>>>>
>>>>> As I see it, the main consequence of our Sep 14 gathering in Jitsi
>>>>> was understanding of the fact that the concept of item / action
>>>>> PORT_ID is vague and needs a replacement. As a bare minimum, separate
>>>>> items should be used: one for an ethdev port and another one for the
>>>>> "represented entity".
>>>>>
>>>>> This "represented entity" can be network (via network port), or a
>>>>> guest machine (via a PF / VF plugged to it), or another ethdev (in
>>>>> the case when the ethdev we are looking at is a PF/VF representor and
>>>>> this PF/VF is also plugged to the DPDK application).
>>>>>
>>>>> So, if I get this right, you don't object this summary. Very well.
>>
>> Good summery and I agree to it.
> 
> Thank you.
> 
>> Just one question, what happens if there is no represented entity?
>> This will mean that there will be not use of the shadow_port item/action?
>> Doesn't it break your diagram?
> 
> In this case, item SHADOW_PORT is valid, for sure, but there's simply no
> traffic to match. No packets enter the embedded switch FROM the entity.
> 
> Action SHADOW_PORT pointing at non-existent entity should probably
> drop the packets. Well, at least, this sounds logical to me. Even
> if this is not the case for some vendors, such action can simply
> be turned down by the PMD during parsing ("invalid destination").

IMHO it would be more logical to return an error on request.

> By the way, we currently have action VF. What if this VF is not plugged
> anywhere? What is supposed to happen to traffic sent to that VF?

Yes, it is delivered to VF and since nobody is listening, traffic is
dropped.

> And action PHY_PORT? If the port in question is down (no cable
> attached), are the packets going to be just dropped?

Yes, of course.

However, it is a big difference with non-existing SHADOW.

>>
>>>>>
>>>>> But, in the current approach, we stick with term "ESWITCH_PORT" for
>>>>> that "represented entity", and, as I see it, this term is not quite
>>>>> descriptive when someone tries to understand which exact port of the
>>>>> embedded switch is implied. Attempts to clarify it by virtue of terms
>>>>> "external" or "the most remote" are not-so-successful.
>>>>>
>>>>> I fully understand that.
>>>>>
>>>>> But the good news is that the original diagram of the new concept can
>>>>> be improved in a way that can allow to dispose of misleading words.
>>>>>
>>>>>
>>>>>        [ A ]       <-- ethdev
>>>>>          |
>>>>>        [ B ]       <-- embedded switch (logical) port
>>>>>          |
>>>>>          |
>>>>>          |
>>>>> ===============  <-- plane of symmetry
>>>>>          |
>>>>>          |
>>>>>          |
>>>>>        [ C ]       <-- embedded switch (logical) port
>>>>>          |
>>>>>        [ D ]       <-- represented entity
>>>>>
>>>>>
>>>>> 1. The application sees the ethdev (A) and can assume that this
>>>>>      ethdev is served by some logical port (B) in the embedded
>>>>>      switch. Precise nature of this port is vendor-specific.
>>>>>
>>>>>      For example, for a regular (non-representor) ethdev,
>>>>>      this port can be a PF, or a VF. This is obvious to
>>>>>      DPDK developers, but the application doesn't need
>>>>>      to have this knowledge. It only sees the ethdev.
>>>>>
>>>>>      If this ethdev is a representor, port (B) can be a truly
>>>>>      separate logical port or, alternatively, some vendors
>>>>>      may use "PF + metadata" approach. This port (B) is
>>>>>      just assumed to exist. The rest is vendor-specific.
>>>>>
>>>>> 2. The application fully understands that the "wire" plugged to
>>>>>      the ethdev it sees has an opposite end. Over there, there's
>>>>>      some "represented entity" (D). Once again, the application
>>>>>      does not know the nature of that "represented entity".
>>>>>      To it, this entity is just some traffic endpoint.
>>>>>
>>>>>      And the application understands that this "represented entity"
>>>>>      is connected to the NIC by means of another logical port (C).
>>>>>      The nature of this port is unknown. The application does not
>>>>>      need to have this knowledge. To it, this port just exists.
>>>>>
>>
>> My question from above what happens if there is no represented port?
>> The concept of representors is relatively new. So some HW may not 
>> support representors.
>> or you are assuming that if we have E-Switch by definition we have 
>> representors?
> 
> The new items / actions ETHDEV_PORT + SHADOW_PORT are going to be
> documented to say clearly that they can only be used in "transfer"
> flows. And if the PMD can accept "transfer" flows, this means that we
> indeed have the embedded switch. And these items / actions are OK.

Ack

  reply	other threads:[~2021-10-07 16:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 15:30 Ivan Malov
2021-10-06 18:00 ` Ivan Malov
2021-10-06 19:36   ` Ivan Malov
2021-10-07 13:00     ` Ori Kam
2021-10-07 14:35       ` Ivan Malov
2021-10-07 16:06         ` Andrew Rybchenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-07 12:51 [dpdk-dev] [RFC PATCH] ethdev: clarify flow attribute and action port ID semantics Ivan Malov
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 00/12] ethdev: rework transfer flow API Andrew Rybchenko
2021-10-01 13:47   ` [dpdk-dev] [PATCH v1 02/12] ethdev: add eswitch port item to " Andrew Rybchenko
2021-10-03 12:40     ` Ori Kam
2021-10-03 18:10       ` Ivan Malov
2021-10-04  5:45         ` Ori Kam
2021-10-04 11:05           ` Ivan Malov
2021-10-04 11:37             ` Ori Kam
2021-10-04 11:58               ` Ivan Malov
2021-10-05  6:20                 ` Ori Kam
2021-10-05  9:19                   ` Andrew Rybchenko
2021-10-05 12:12                     ` Ivan Malov

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=d4510c53-c551-44a4-43e0-bdc31b55d8e0@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=Ivan.Malov@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.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).