All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Magnus Karlsson <magnus.karlsson@intel.com>
Cc: bjorn.topel@intel.com, ast@kernel.org, daniel@iogearbox.net,
	netdev@vger.kernel.org,
	Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH bpf-next v2 0/5] xsk: fix bug when trying to use both copy and zero-copy mode
Date: Mon, 1 Oct 2018 13:31:46 -0700	[thread overview]
Message-ID: <20181001133146.1b8f3810@cakuba.netronome.com> (raw)
In-Reply-To: <1538398297-14862-1-git-send-email-magnus.karlsson@intel.com>

On Mon,  1 Oct 2018 14:51:32 +0200, Magnus Karlsson wrote:
> Jakub, please take a look at your patches. The last one I had to
> change slightly to make it fit with the new interface
> xdp_get_umem_from_qid(). An added bonus with this function is that we,
> in the future, can also use it from the driver to get a umem, thus
> simplifying driver implementations (and later remove the umem from the
> NDO completely). Björn will mail patches, at a later point in time,
> using this in the i40e and ixgbe drivers, that removes a good chunk of
> code from the ZC implementations. 

Nice, drivers which don't follow the prepare/commit model of handling
reconfigurations will benefit!

> I also made your code aware of Tx queues. If we create a socket that
> only has a Tx queue, then the queue id will refer to a Tx queue id
> only and could be larger than the available amount of Rx queues.
> Please take a look at it.

The semantics of Tx queue id are slightly unclear.  To me XDP is
associated with Rx, so the qid in driver context can only refer to 
Rx queue and its associated XDP Tx queue.  It does not mean the Tx
queue stack uses, like it does for copy fallback.  If one doesn't have
a Rx queue $id, there will be no associated XDP Tx queue $id (in all
drivers but Intel, and virtio, which use per-CPU Tx queues making TX
queue even more meaningless).

Its to be seen how others implement AF_XDP.  My general feeling is
that we should only talk about Rx queues in context of driver XDP. 

  parent reply	other threads:[~2018-10-02  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 12:51 [PATCH bpf-next v2 0/5] xsk: fix bug when trying to use both copy and zero-copy mode Magnus Karlsson
2018-10-01 12:51 ` [PATCH bpf-next v2 1/5] net: add umem reference in netdev{_rx}_queue Magnus Karlsson
2018-10-01 12:51 ` [PATCH bpf-next v2 2/5] xsk: fix bug when trying to use both copy and zero-copy on one queue id Magnus Karlsson
2018-10-01 12:51 ` [PATCH bpf-next v2 3/5] ethtool: rename local variable max -> curr Magnus Karlsson
2018-10-01 12:51 ` [PATCH bpf-next v2 4/5] ethtool: don't allow disabling queues with umem installed Magnus Karlsson
2018-10-01 12:51 ` [PATCH bpf-next v2 5/5] xsk: simplify xdp_clear_umem_at_qid implementation Magnus Karlsson
2018-10-01 20:31 ` Jakub Kicinski [this message]
2018-10-02 12:49   ` [PATCH bpf-next v2 0/5] xsk: fix bug when trying to use both copy and zero-copy mode Magnus Karlsson
2018-10-02 16:58     ` Jakub Kicinski
2018-10-05  7:35 ` Daniel Borkmann

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=20181001133146.1b8f3810@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=magnus.karlsson@intel.com \
    --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.