All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Mintz, Yuval" <Yuval.Mintz@cavium.com>, Jakub Kicinski <kubakici@wp.pl>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"alexei.starovoitov@gmail.com" <alexei.starovoitov@gmail.com>
Subject: Re: [PATCH v2 net-next 10/11] qede: Add basic XDP support
Date: Tue, 29 Nov 2016 19:42:39 +0100	[thread overview]
Message-ID: <583DCC1F.7020509@iogearbox.net> (raw)
In-Reply-To: <BL2PR07MB23061A22119C747AA7E9A2FA8D8D0@BL2PR07MB2306.namprd07.prod.outlook.com>

On 11/29/2016 06:51 PM, Mintz, Yuval wrote:
>>> You also need to wrap this under rcu_read_lock() (at least I haven't seen
>>> it in your patches) for same reasons as stated in 326fe02d1ed6 ("net/mlx4_en:
>>> protect ring->xdp_prog with rcu_read_lock"), as otherwise xdp_prog could
>>> disappear underneath you. mlx4 and nfp does it correctly, looks like mlx5
>>> doesn't.
>
>> My understanding was that Yuval is always doing full stop()/start() so
>> there should be no RX packets in flight while the XDP prog is being
>> changed.  But thinking about it again, perhaps is worth adding the
>> optimization to forego the full qede_reload() in qede_xdp_set() if there
>> is a program already loaded and just do the xchg()+put() (and add RCU
>> protection on the fast path)?
>
> Yeps. That the current state of the code.
> I'll surely pursue this later, but I don't think all this added complexity
> is required for the initial submission.
>
> BTW, one of the problems [or perhaps 'lack of motivation' is a better term]
> I had with the program switching scenario was that there was no sample
> application that did it.
> If it's really an interesting [basic] scenario, perhaps it's worthy to add
> a sample user app. that will repeatedly switch the attached eBPF?

Fwiw, I'm still waiting for Stephen to process his queue, and then I have
a patch for iproute2 to add a minimal initial front-end that can be useful
for experimenting/testing. The atomic switching scenario w/o stop()/start()
would definitely be useful when you need to fix an issue or modify behavior
in your currently loaded program on the fly when you cannot afford small
downtime.

  reply	other threads:[~2016-11-29 18:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 14:46 [PATCH v2 net-next 00/11] qed*: Add XDP support Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 01/11] qede: Optimize aggregation information size Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 02/11] qed: Optimize qed_chain datapath usage Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 03/11] qede: Remove 'num_tc' Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 04/11] qede: Refactor statistics gathering Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 05/11] qede: Refactor data-path Rx flow Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 06/11] qede: Revise state locking scheme Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 07/11] qed*: Handle-based L2-queues Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 08/11] qede: Don't check netdevice for rx-hash Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 09/11] qede: Better utilize the qede_[rt]x_queue Yuval Mintz
2016-11-29 14:47 ` [PATCH v2 net-next 10/11] qede: Add basic XDP support Yuval Mintz
2016-11-29 15:48   ` Daniel Borkmann
2016-11-29 17:10     ` Jakub Kicinski
2016-11-29 17:51       ` Mintz, Yuval
2016-11-29 18:42         ` Daniel Borkmann [this message]
2016-11-29 18:28       ` Daniel Borkmann
2016-11-29 14:47 ` [PATCH v2 net-next 11/11] qede: Add support for XDP_TX Yuval Mintz
2016-11-30 19:32 ` [PATCH v2 net-next 00/11] qed*: Add XDP support David Miller

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=583DCC1F.7020509@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=Yuval.Mintz@cavium.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kubakici@wp.pl \
    --cc=netdev@vger.kernel.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 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.