All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: "Michał Kazior" <kazikcz@gmail.com>, lorenzo.bianconi@redhat.com
Cc: kvalo@codeaurora.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Felix Fietkau <nbd@nbd.name>,
	brouer@redhat.com
Subject: Re: [RFC 0/5] add XDP support to mt76x2e/mt76x0e drivers
Date: Thu, 29 Nov 2018 14:53:15 +0100	[thread overview]
Message-ID: <87k1kwq9bo.fsf@toke.dk> (raw)
In-Reply-To: <CABvG-CVpYXpjE9vxsA90qzsGm3n48SBYv-dYWAB8vi9-dvhK4A@mail.gmail.com>

Michał Kazior <kazikcz@gmail.com> writes:

> On Thu, 29 Nov 2018 at 14:00, Lorenzo Bianconi
> <lorenzo.bianconi@redhat.com> wrote:
> [...]
>> > The other direction will probably be more difficult, at least if 802.11
>> > frames need to be built in software. It *might* be possible with the XDP
>> > egress hook we are planning (with a suitable set of helpers, the eBPF
>> > program could build the 802.11 frames), but I'm not really sure if that
>> > is worth doing as I'm quite sure there are some hairy edge cases
>> > there...
>>
>> The possible issue with XDP_DROP action you are referring to here is A-MPDU
>> reordering on rx side, right? If so I guess the issue will be fixed by
>> tid_agg_rx->reorder_timer. Are you referring to other possible edge cases?
>
> What I'm thinking is reordering could be one of possible things to
> offload to an XDP program. It would require per-station data structure
> to keep track of the frame sequence numbers (among other things). Same
> could be said for crypto offloads (would require XDP programs to be
> able to use crypto apis I guess?).

In principle, all of this could be done. But we need to think carefully
about what things it really makes sense to offload to XDP. In the
general case, we will end up re-implementing all of mac80211 in eBPF,
which is obviously not ideal. However, fast-path handling in XDP, which
will punt to the full stack on edge cases, is probably doable (and is
the general model we envision for XDP programs).

For crypto in particular, I wonder if there is much of a speedup to be
had if the crypto is in software anyway. Wouldn't that dominate the
processing time? Whereas, if the crypto is offloaded to hardware,
fast-path packet processing in XDP might make sense. This would
translate to the fallback mode I mention above: If hardware crypto is
enabled, handle in XDP fast-path, otherwise punt to mac80211 for full
(crypto) processing.

-Toke

  reply	other threads:[~2018-11-29 13:53 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 22:21 [RFC 0/5] add XDP support to mt76x2e/mt76x0e drivers Lorenzo Bianconi
2018-11-27 22:21 ` [RFC 1/5] mac80211: introduce ieee80211_xdp handler Lorenzo Bianconi
2018-11-27 22:21 ` [RFC 2/5] mac80211: introduce ieee80211_vif_to_netdev routine Lorenzo Bianconi
2018-11-27 22:21 ` [RFC 3/5] mt76: split mt76_dma_rx_reset in init_rx_reset and complete_rx_reset Lorenzo Bianconi
2018-11-27 22:21 ` [RFC 4/5] mt76: make mt76x02_vif_init return int Lorenzo Bianconi
2018-11-27 22:21 ` [RFC 5/5] mt76: add XDP support Lorenzo Bianconi
2018-11-28 10:15 ` [RFC 0/5] add XDP support to mt76x2e/mt76x0e drivers Kalle Valo
2018-11-28 10:44   ` Lorenzo Bianconi
2018-11-28 12:36     ` Toke Høiland-Jørgensen
2018-11-28 12:53       ` Michał Kazior
2018-11-28 14:19         ` Toke Høiland-Jørgensen
2018-11-28 13:11       ` Lorenzo Bianconi
2018-11-28 14:21         ` Toke Høiland-Jørgensen
2018-11-28 14:35           ` Lorenzo Bianconi
2018-11-28 14:43             ` Toke Høiland-Jørgensen
2018-11-28 15:35               ` Lorenzo Bianconi
2018-11-28 23:12                 ` Toke Høiland-Jørgensen
2018-11-29 12:59                   ` Lorenzo Bianconi
2018-11-29 13:29                     ` Toke Høiland-Jørgensen
2018-11-29 13:45                     ` Michał Kazior
2018-11-29 13:53                       ` Toke Høiland-Jørgensen [this message]
2018-12-03 17:57                         ` Johannes Berg
2018-12-03 19:36                           ` Toke Høiland-Jørgensen
2018-12-03 19:41                             ` Johannes Berg
2018-12-03 19:51                               ` Toke Høiland-Jørgensen
2018-12-03 20:00                               ` Lorenzo Bianconi
2018-11-28 15:43       ` Jesper Dangaard Brouer
2018-11-28 15:43         ` Jesper Dangaard Brouer
2018-11-29 10:30         ` Lorenzo Bianconi
2018-11-29 13:27           ` Toke Høiland-Jørgensen
2018-11-29 13:27             ` Toke Høiland-Jørgensen
2018-11-29 13:41             ` Michał Kazior
2018-11-29 13:48               ` Toke Høiland-Jørgensen
2018-11-29 13:58             ` Lorenzo Bianconi
2018-11-29 14:06               ` Toke Høiland-Jørgensen
2018-11-29 14:06                 ` Toke Høiland-Jørgensen
2018-11-29 15:45                 ` Lorenzo Bianconi
2018-11-29 16:06                   ` Toke Høiland-Jørgensen

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=87k1kwq9bo.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=brouer@redhat.com \
    --cc=kazikcz@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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.