[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210608121340.GB1971@ranger.igk.intel.com>
Date: Tue, 8 Jun 2021 14:13:40 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
Cc: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"bjorn@...nel.org" <bjorn@...nel.org>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH intel-next 2/2] ice: introduce XDP Tx fallback path
On Thu, Jun 03, 2021 at 01:52:38AM +0100, Nguyen, Anthony L wrote:
> On Tue, 2021-06-01 at 13:32 +0200, Maciej Fijalkowski wrote:
> > Under rare circumstances there might be a situation where a
> > requirement
> > of having a XDP Tx queue per core could not be fulfilled and some of
> > the
> > Tx resources would have to be shared between cores. This yields a
> > need
> > for placing accesses to xdp_rings array onto critical section
> > protected
> > by spinlock.
> >
> > Design of handling such scenario is to at first find out how many
> > queues
> > are there that XDP could use. Any number that is not less than the
> > half
> > of a count of cores of platform is allowed. XDP queue count < cpu
> > count
> > is signalled via new VSI state ICE_VSI_XDP_FALLBACK which carries the
> > information further down to Rx rings where new ICE_TX_XDP_LOCKED is
> > set
> > based on the mentioned VSI state. This ring flag indicates that
> > locking
> > variants for getting/putting xdp_ring need to be used in fast path.
> >
> > For XDP_REDIRECT the impact on standard case (one XDP ring per CPU)
> > can
> > be reduced a bit by providing a separate ndo_xdp_xmit and swap it at
> > configuration time. However, due to the fact that net_device_ops
> > struct
> > is a const, it is not possible to replace a single ndo, so for the
> > locking variant of ndo_xdp_xmit, whole net_device_ops needs to be
> > replayed.
> >
> > It has an impact on performance (1-2 %) of a non-fallback path as
> > branches are introduced.
> >
> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
> > ---
> > drivers/net/ethernet/intel/ice/ice.h | 37 +++++++++
> > drivers/net/ethernet/intel/ice/ice_base.c | 5 ++
> > drivers/net/ethernet/intel/ice/ice_lib.c | 4 +-
> > drivers/net/ethernet/intel/ice/ice_main.c | 76
> > ++++++++++++++++++-
> > drivers/net/ethernet/intel/ice/ice_txrx.c | 62 ++++++++++++++-
> > drivers/net/ethernet/intel/ice/ice_txrx.h | 2 +
> > drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 13 +++-
> > 7 files changed, 191 insertions(+), 8 deletions(-)
>
> This isn't applying to next-queue/dev-queue. I believe it's becuase the
> branch has the soon to be sent tracing patch from Magnus [1].
Thanks for a heads up Tony, I'll send rebased revision.
>
> Thanks,
> Tony
>
> [1] https://patchwork.ozlabs.org/project/intel-wired-
> lan/patch/20210510093854.31652-3-magnus.karlsson@...il.com/
Powered by blists - more mailing lists