From: Thomas Monjalon <thomas@monjalon.net>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>
Cc: dev@dpdk.org, "Ananyev,
Konstantin" <konstantin.ananyev@intel.com>,
Jerin Jacob <jerinjacobk@gmail.com>,
"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
Nithin Dabilpuram <nithind1988@gmail.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>,
Andrew Rybchenko <arybchenko@solarflare.com>,
Ori Kam <orika@mellanox.com>,
"Burakov, Anatoly" <anatoly.burakov@intel.com>,
"Mcnamara, John" <john.mcnamara@intel.com>,
"Kovacevic, Marko" <marko.kovacevic@intel.com>,
dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
Krzysztof Kanas <kkanas@marvell.com>,
"techboard@dpdk.org" <techboard@dpdk.org>,
Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 1/3] mbuf: add Tx offloads for packet marking
Date: Wed, 03 Jun 2020 16:56:08 +0200 [thread overview]
Message-ID: <1634872.Uel37ra6X5@thomas> (raw)
In-Reply-To: <20200603113822.GI12564@platinum>
03/06/2020 13:38, Olivier Matz:
> On Wed, Jun 03, 2020 at 04:14:14PM +0530, Nithin Dabilpuram wrote:
> > On Wed, Jun 03, 2020 at 10:28:44AM +0200, Olivier Matz wrote:
> > > On Tue, Jun 02, 2020 at 07:55:37PM +0530, Nithin Dabilpuram wrote:
> > > > On Tue, Jun 02, 2020 at 10:53:08AM +0000, Ananyev, Konstantin wrote:
> > > > > > > > > I also share Olivier's concern about consuming 3 bits in ol_flags for that feature.
> > > > > > > > > Can it probably be squeezed somehow?
> > > > > > > > > Let say we reserve one flag that this information is present or not, and
> > > > > > > > > re-use one of rx-only fields for store additional information (packet_type, or so).
> > > > > > > > > Or might be some other approach.
> > > > > > > >
> > > > > > > > We are fine with this approach where we define one bit in Tx offloads for pkt
> > > > > > > > marking and and 3 bits reused from Rx offload flags area.
[...]
> > > I'm not a big fan of reusing Rx fields or flags for Tx.
> > > It's not obvious for an application than adding a tx_mark will overwrite
> > > the packet_type. I understand that the risk is limited because packet_type
> > > is Rx and the marks are Tx, but there is still one.
Mixing Rx and Tx info in the same field is a bad design pattern
which will create a lot of difficult bugs.
> > I'm also not a big fan but just wanted to take this approach so that,
> > it can both conserve space and also help fast path.
> > Reusing Rx area is however not a new thing as is already followed for
> > mbuf->txadapter field.
Yes there is a txadapter field union'ed with flow director and QoS.
This is a bad pattern that I highlighted in this presentation (slide 8):
https://www.dpdk.org/wp-content/uploads/sites/35/2019/10/DynamicMbuf.pdf
> Yes, and in my opinion this is something we should avoid when possible,
> because it makes some features exclusive (ex: the big union with
> sched/rss/adapter/usr/...).
Yes, the "RSS union" must be cleaned-up, as some other mbuf parts.
> > Apart from documentation issue, Is there any other issue or future
> > ramification with using Rx field's for Tx ?
>
> No, I don't see any other issue except the ones we already mentioned
> (doc, code clarity, ).
"doc clarity" should be understood as the opposite of
"design leading inevitably to bugs".
> > If it is only about documentation, then we can add more documentation to make things clear.
More documentation won't make a bad design better, unfortunately.
> > > To summarize the different proposed approaches (please correct me if I'm wrong):
> > >
> > > a- add 3 Tx mbuf flags
> > > (-) consumes limited resource
> > >
> > > b- add 3 dynamic flags
> > > (-) slower
> >
> > - Tx burst Vector implementation can't be done for this tx offload as
> > offset keeps changing.
>
> A vector implementation can be done. But yes, it would be slower than
> with a static flag.
>
> > > c- add 1 Tx flag and union with Rx field
> > > (-) exclusive with Rx field
> > > (-) still consumes one flag
> > >
> > > My preference is still b-, for these reasons:
Me too, my preference is (b).
next prev parent reply other threads:[~2020-06-03 14:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 7:22 [dpdk-dev] " Nithin Dabilpuram
2020-04-17 7:22 ` [dpdk-dev] [PATCH 2/3] net/octeontx2: add tm packet marking cb Nithin Dabilpuram
2020-04-17 7:22 ` [dpdk-dev] [PATCH 3/3] net/octeontx2: add Tx packet marking offload support Nithin Dabilpuram
2020-05-01 11:18 ` [dpdk-dev] [PATCH 1/3] mbuf: add Tx offloads for packet marking Jerin Jacob
2020-05-04 8:06 ` Olivier Matz
2020-05-04 8:27 ` [dpdk-dev] [EXT] " Nithin Dabilpuram
2020-05-04 9:16 ` Olivier Matz
2020-05-04 10:04 ` Nithin Dabilpuram
2020-05-04 12:27 ` Olivier Matz
2020-05-05 6:19 ` Nithin Dabilpuram
2020-05-13 12:28 ` Nithin Dabilpuram
2020-05-14 20:29 ` Olivier Matz
2020-05-15 10:08 ` Nithin Dabilpuram
2020-05-15 10:30 ` Ananyev, Konstantin
2020-05-15 13:57 ` Nithin Dabilpuram
2020-05-28 15:43 ` Nithin Dabilpuram
2020-05-30 15:12 ` Jerin Jacob
2020-06-02 10:53 ` Ananyev, Konstantin
2020-06-02 14:25 ` Nithin Dabilpuram
2020-06-03 8:28 ` Olivier Matz
2020-06-03 10:44 ` Nithin Dabilpuram
2020-06-03 11:38 ` Olivier Matz
2020-06-03 12:52 ` Nithin Dabilpuram
2020-06-03 16:14 ` Slava Ovsiienko
2020-06-08 9:39 ` Nithin Dabilpuram
2020-06-03 14:56 ` Thomas Monjalon [this message]
2020-06-03 10:31 ` Ananyev, Konstantin
2020-05-15 13:12 ` Thomas Monjalon
2020-05-15 13:44 ` Nithin Dabilpuram
2020-05-15 15:10 ` Thomas Monjalon
2020-05-15 16:26 ` Jerin Jacob
2020-05-15 16:52 ` Thomas Monjalon
2020-05-15 17:00 ` Jerin Jacob
2020-05-15 18:07 ` Nithin Dabilpuram
2023-07-31 12:54 ` [dpdk-dev] " Thomas Monjalon
2023-08-14 8:11 ` Nithin Dabilpuram
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=1634872.Uel37ra6X5@thomas \
--to=thomas@monjalon.net \
--cc=anatoly.burakov@intel.com \
--cc=arybchenko@solarflare.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=john.mcnamara@intel.com \
--cc=kkanas@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=marko.kovacevic@intel.com \
--cc=ndabilpuram@marvell.com \
--cc=nithind1988@gmail.com \
--cc=olivier.matz@6wind.com \
--cc=orika@mellanox.com \
--cc=techboard@dpdk.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).