All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nambiar, Amritha" <amritha.nambiar@intel.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"Gomes, Vinicius" <vinicius.gomes@intel.com>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>
Subject: RE: [net-next PATCH v2 0/4] Extend action skbedit to RX queue mapping
Date: Fri, 9 Sep 2022 09:18:29 +0000	[thread overview]
Message-ID: <MWHPR11MB12939CF44A137DD8349B1EB5F1439@MWHPR11MB1293.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAKgT0UcCrEAfiEi-EVkXAmZxdyD910yr2v54iYe3nzQdaX+6ng@mail.gmail.com>

> -----Original Message-----
> From: Alexander Duyck <alexander.duyck@gmail.com>
> Sent: Thursday, September 8, 2022 8:28 AM
> To: Nambiar, Amritha <amritha.nambiar@intel.com>
> Cc: netdev@vger.kernel.org; kuba@kernel.org; jhs@mojatatu.com;
> jiri@resnulli.us; xiyou.wangcong@gmail.com; Gomes, Vinicius
> <vinicius.gomes@intel.com>; Samudrala, Sridhar
> <sridhar.samudrala@intel.com>
> Subject: Re: [net-next PATCH v2 0/4] Extend action skbedit to RX queue
> mapping
> 
> On Wed, Sep 7, 2022 at 6:14 PM Amritha Nambiar
> <amritha.nambiar@intel.com> wrote:
> >
> > Based on the discussion on
> > https://lore.kernel.org/netdev/20220429171717.5b0b2a81@kernel.org/,
> > the following series extends skbedit tc action to RX queue mapping.
> > Currently, skbedit action in tc allows overriding of transmit queue.
> > Extending this ability of skedit action supports the selection of receive
> > queue for incoming packets. Offloading this action is added for receive
> > side. Enabled ice driver to offload this type of filter into the
> > hardware for accepting packets to the device's receive queue.
> >
> > v2: Added documentation in Documentation/networking
> >
> > ---
> >
> > Amritha Nambiar (4):
> >       act_skbedit: Add support for action skbedit RX queue mapping
> >       act_skbedit: Offload skbedit queue mapping for receive queue
> >       ice: Enable RX queue selection using skbedit action
> >       Documentation: networking: TC queue based filtering
> 
> I don't think skbedit is the right thing to be updating for this. In
> the case of Tx we were using it because at the time we stored the
> sockets Tx queue in the skb, so it made sense to edit it there if we
> wanted to tweak things before it got to the qdisc layer. However it
> didn't have a direct impact on the hardware and only really affected
> the software routing in the device, which eventually resulted in which
> hardware queue and qdisc was selected.
> 
> The problem with editing the receive queue is that the hardware
> offloaded case versus the software offloaded can have very different
> behaviors. I wonder if this wouldn't be better served by being an

Could you please explain how the hardware offload and software cases
behave differently in the skbedit case. From Jakub's suggestion on
https://lore.kernel.org/netdev/20220503084732.363b89cc@kernel.org/,
it looked like the skbedit action fits better to align the hardware and
software description of RX queue offload (considering the skb metadata
remains same in offload vs no-offload case).

> extension of the mirred ingress redirect action which is already used
> for multiple hardware offloads as I recall.
> 
> In this case you would want to be redirecting packets received on a
> port to being received on a specific queue on that port. By using the
> redirect action it would take the packet out of the receive path and
> reinsert it, being able to account for anything such as the RPS
> configuration on the device so the behavior would be closer to what
> the hardware offloaded behavior would be.

Wouldn't this be an overkill as we only want to accept packets into a 
predetermined queue? IIUC, the mirred redirect action typically moves
packets from one interface to another, the filter is added on interface
different from the destination interface. In our case, with the
destination interface being the same, I am not understanding the need
for a loopback. Also, WRT to RPS, not sure I understand the impact
here. In hardware, once the offloaded filter executes to select the queue,
RSS does not run. In software, if RPS executes before
sch_handle_ingress(), wouldn't any tc-actions (mirred redirect or skbedit
overriding the queue) behave in similar way ? 

  reply	other threads:[~2022-09-09  9:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  1:23 [net-next PATCH v2 0/4] Extend action skbedit to RX queue mapping Amritha Nambiar
2022-09-08  1:24 ` [net-next PATCH v2 1/4] act_skbedit: Add support for action skbedit " Amritha Nambiar
2022-09-08  1:24 ` [net-next PATCH v2 2/4] act_skbedit: Offload skbedit queue mapping for receive queue Amritha Nambiar
2022-09-08  1:24 ` [net-next PATCH v2 3/4] ice: Enable RX queue selection using skbedit action Amritha Nambiar
2022-09-08  1:24 ` [net-next PATCH v2 4/4] Documentation: networking: TC queue based filtering Amritha Nambiar
2022-09-08 17:34   ` kernel test robot
2022-09-08 15:27 ` [net-next PATCH v2 0/4] Extend action skbedit to RX queue mapping Alexander Duyck
2022-09-09  9:18   ` Nambiar, Amritha [this message]
2022-09-09 18:35     ` Alexander Duyck
2022-09-15  8:45       ` Nambiar, Amritha
2022-09-15 15:21         ` Alexander Duyck
2022-09-15 22:09           ` Nambiar, Amritha
2022-09-16 15:58             ` Alexander Duyck
2022-09-21 20:29 ` Jakub Kicinski
2022-09-22  8:19   ` Nambiar, Amritha
2022-09-22 12:29     ` Jakub Kicinski
2022-09-23  1:09       ` Nambiar, Amritha
2022-09-23 13:02         ` Jakub Kicinski

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=MWHPR11MB12939CF44A137DD8349B1EB5F1439@MWHPR11MB1293.namprd11.prod.outlook.com \
    --to=amritha.nambiar@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=vinicius.gomes@intel.com \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.