DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Ilya Maximets <i.maximets@ovn.org>,
	Jerin Jacob <jerinjacobk@gmail.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Roni Bar Yanai <roniba@mellanox.com>,
	Rony Efraim <ronye@mellanox.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"Iremonger, Bernard" <bernard.iremonger@intel.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	david.marchand@redhat.com, rasland@mellanox.com
Subject: Re: [dpdk-dev] [PATCH v2 0/3] ethdev: configure SR-IOV VF from host
Date: Thu, 07 Nov 2019 15:44:14 +0100	[thread overview]
Message-ID: <12486120.BHqsEW5yeX@xps> (raw)
In-Reply-To: <4481782.P5sk1fEGuH@xps>

Bad news for the DPDK API below:

03/11/2019 23:09, Thomas Monjalon:
> 03/11/2019 16:27, Ananyev, Konstantin:
> > 
> > > > > If we consider what Intel did, i.e. configure VF in place of
> > > > > representor for some operations, there are two drawbacks:
> > > > > - confusing that some ops apply to representor, others apply to VF
> > > > > - some ops are not possible on representor (because targetted to VF)

It seems this confusion and limitation is not scary enough to convince
of the right approach.

Most probably this figure was not well understood:

VF1 ------ VF1 rep /--------\
                   | switch | uplink rep ------ uplink ------ wire
VF2 ------ VF2 rep \--------/    (PF)

Please understand that a packet going from the VF rep to the VF,
is Tx from the representor point of view,
while it is Rx from the VF point of view.
It should explain why VF and rep are different.

One more explanation: doing Rx/Tx from the VF rep is the way,
for a vSwitch, to manage the forwarding in CPU,
before offloading it in the HW switch with flow rules.

After reading how the representor is implemented in Intel PMDs,
I understand there is no intent to do some vSwitch offload with SR-IOV.
The Mellanox PMD is capable of such full offload, that's why
the representor port must be a real DPDK port, not a ghost.


> > > > >
> > > > > I still feel that the addition of one single bit in the port ID is an
> > > > > elegant solution to target either the VF or its representor.
> > > >
> > > > Since we already have a confusion about what is configured when operations
> > > > are performed on a representor port we have 2 options:
> > > 
> > > I don't agree we have. I don't think there is any design note or API doc that says the ethdev configuration on representor should be applied
> > > on VF (please share if I missed it).
> > > The fact that there are some drivers that implemented it doesn't mean it is correct.
> > 
> > Well, it means that at least authors and reviewers of these patches,
> > plus probably next-net maintainers believe that it is correct.
> > At least they did - when patch was applied.

For information, a Mellanox paper of a netdevconf talk in 2016,
which is giving more information about the ideas behind the switchdev model:
https://netdevconf.info/1.2/papers/efraim-gerlitz-sriov-ovs-final.pdf


> > If that is not clearly stated in the doc - it might be just the gap in the documentation,
> 
> Gap in the documentation? We should state that the config should be applied
> to the port specified with port_id and no other one? Funny
> 
> > that needs to be fixed, not a mandate to break existing behavior.
> 
> So because you managed to have a wrong patch applied in your PMD,
> you want to make it the generic API in ethdev?
> What a process!
> 
> Hey guys, if you want to change an API behaviour in a way others don't,
> you just have to implement what you want in your PMD silently,
> then you will be able to change the API to comply with your behaviour.
> Wonderful.
> If we allow such practice, DPDK is dead.

During the Technical Board yesterday, it was decided to go with Intel
understanding of what is a representor, i.e. a ghost of the VF.
It was asked to implement the representor operations on the representor
port with a special flag to make explicit a non-VF operation.
I really tried to implement this reversed logic.
One blocker is to check the port ID flag in every functions,
including the inline Rx/Tx. So I came to the conclusion that the
reverse logic is really ugly and it has no short-term benefit
compared to the mix we have currently.
After long hours thinking in the night, I prefer focusing on the release.
It means we will continue to mix VF and representor operations
with the same port ID. For the record, I believe it is very bad.



  reply	other threads:[~2019-11-07 14:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 15:06 [dpdk-dev] [RFC] " Thomas Monjalon
2019-08-15 15:34 ` Jerin Jacob Kollanukkaran
2019-08-15 17:59   ` Thomas Monjalon
2019-08-29 15:02 ` Iremonger, Bernard
2019-09-04  8:23   ` Thomas Monjalon
2019-10-29 18:50 ` [dpdk-dev] [PATCH v2 0/3] " Thomas Monjalon
2019-10-29 18:50   ` [dpdk-dev] [PATCH v2 1/3] ethdev: identify " Thomas Monjalon
2019-10-29 18:50   ` [dpdk-dev] [PATCH v2 2/3] ethdev: set VF MAC address " Thomas Monjalon
2019-11-01  0:18     ` [dpdk-dev] [RFC PATCH] net/i[xgb|40]e: " Thomas Monjalon
2019-10-29 18:50   ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: " Thomas Monjalon
2019-10-30  4:08   ` [dpdk-dev] [PATCH v2 0/3] ethdev: configure SR-IOV VF " Jerin Jacob
2019-10-30  7:22     ` Shahaf Shuler
2019-10-30  9:24       ` Jerin Jacob
2019-11-01  0:24         ` Thomas Monjalon
2019-11-01  9:06           ` Ilya Maximets
2019-11-01  9:56             ` Ilya Maximets
2019-10-30  8:56     ` Thomas Monjalon
2019-10-30  9:15       ` Jerin Jacob
2019-11-01  0:33         ` Thomas Monjalon
2019-11-01 11:01           ` Jerin Jacob
2019-11-01 13:25           ` Jerin Jacob
2019-11-03  6:31             ` Shahaf Shuler
2019-10-30 15:07   ` Ilya Maximets
2019-10-30 15:49     ` Thomas Monjalon
2019-10-30 16:09       ` Ilya Maximets
2019-10-30 21:42         ` Thomas Monjalon
2019-11-01  9:32           ` Ilya Maximets
2019-11-03  6:48             ` Shahaf Shuler
2019-11-03 15:27               ` Ananyev, Konstantin
2019-11-03 22:09                 ` Thomas Monjalon
2019-11-07 14:44                   ` Thomas Monjalon [this message]
2019-11-04 10:28               ` Ilya Maximets
2019-11-04 14:30                 ` Asaf Penso
2019-11-04 14:58                   ` Ilya Maximets
2019-11-04 20:33                 ` Shahaf Shuler
2019-11-05 12:15                   ` Ilya Maximets

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=12486120.BHqsEW5yeX@xps \
    --to=thomas@monjalon.net \
    --cc=ajit.khaparde@broadcom.com \
    --cc=arybchenko@solarflare.com \
    --cc=bernard.iremonger@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=i.maximets@ovn.org \
    --cc=jerinjacobk@gmail.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=rasland@mellanox.com \
    --cc=roniba@mellanox.com \
    --cc=ronye@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=stephen@networkplumber.org \
    /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).