From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>
Cc: Jerin Jacob <jerinjacobk@gmail.com>,
"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
Olivier Matz <olivier.matz@6wind.com>,
Nithin Dabilpuram <nithind1988@gmail.com>,
Thomas Monjalon <thomas@monjalon.net>,
"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>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 1/3] mbuf: add Tx offloads for packet marking
Date: Wed, 3 Jun 2020 10:31:35 +0000 [thread overview]
Message-ID: <BYAPR11MB330142B490F4DE7FDE9D940D9A880@BYAPR11MB3301.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200602142537.GA6274@outlook.office365.com>
> > > > > > 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.
> > > > >
> > > > > For example:
> > > > >
> > > > > @@ -186,10 +186,16 @@ extern "C" {
> > > > >
> > > > > /* add new RX flags here, don't forget to update PKT_FIRST_FREE */
> > > > >
> > > > > +/* Reused Rx offload bits for Tx offloads */
> > > > > +#define PKT_X_TX_MARK_VLAN_DEI (1ULL << 0)
> > > > > +#define PKT_X_TX_MARK_IP_DSCP (1ULL << 1)
> > > > > +#define PKT_X_TX_MARK_IP_ECN (1ULL << 2)
> > > > > +
> > > > > #define PKT_FIRST_FREE (1ULL << 23)
> > > > > -#define PKT_LAST_FREE (1ULL << 40)
> > > > > +#define PKT_LAST_FREE (1ULL << 39)
> > > > >
> > > > > /* add new TX flags here, don't forget to update PKT_LAST_FREE */
> > > > > +#define PKT_TX_MARK_EN (1ULL << 40)
> > > > >
> > > > > Is this fine ?
> > > >
> > > > Any thoughts on this approach which uses only 1 bit in Tx flags out of 18
> > > > and reuse unused Rx flag bits ?
> >
> > My thought was not about re-defining the flags (I think it is better to keep them intact),
> > but adding a union for one of rx-only fields (packet_type/rss/timestamp).
>
> Ok. Adding a union field at packet_type field is also fine like below.
>
> @@ -187,9 +187,10 @@ extern "C" {
> /* add new RX flags here, don't forget to update PKT_FIRST_FREE */
>
> #define PKT_FIRST_FREE (1ULL << 23)
> -#define PKT_LAST_FREE (1ULL << 40)
> +#define PKT_LAST_FREE (1ULL << 39)
>
> /* add new TX flags here, don't forget to update PKT_LAST_FREE */
> +#define PKT_TX_MARK_EN (1ULL << 40)
>
> /**
> * Outer UDP checksum offload flag. This flag is used for enabling
> @@ -461,6 +462,14 @@ enum {
> #endif
> };
>
> +/* Tx packet marking flags in rte_mbuf::tx_mark.
> + * Valid only when PKT_TX_MARK_EN is set in
> + * rte_mbuf::ol_flags.
> + */
> +#define TX_MARK_VLAN_DEI (1ULL << 0)
> +#define TX_MARK_IP_DSCP (1ULL << 1)
> +#define TX_MARK_IP_ECN (1ULL << 2)
> +
> /**
> * The generic rte_mbuf, containing a packet mbuf.
> */
> @@ -543,6 +552,10 @@ struct rte_mbuf {
> };
> uint32_t inner_l4_type:4; /**< Inner L4 type. */
> };
> + struct {
> + uint32_t reserved:29;
> + uint32_t tx_mark:3;
> + };
> };
>
>
>
> Please correct me if this is not what you mean.
>
Yes, I thought about something like that.
next prev parent reply other threads:[~2020-06-03 10:31 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
2020-06-03 10:31 ` Ananyev, Konstantin [this message]
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=BYAPR11MB330142B490F4DE7FDE9D940D9A880@BYAPR11MB3301.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--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=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 \
--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).