wifi: mac80211: add support for declaring netdev GSO support
Subsystems (2)
RFC 1/1 wifi: mac80211: add support for declaring netdev GSO support
Improve performance by deferring GSO segmentation until after the sta lookup, flow hash calculation and aggregation check. Pass the segmented packets to fq in one batch.
GSO packets can't be passed to the driver, because they have metadata stored in skb->cb, which gets overwritten by mac80211. Because of that, segmentation needs to be done unconditionally in mac80211.
Signed-off-by Felix Fietkau <[email protected]>
--- include/net/fq_impl.h | 16 ++++--- net/mac80211/tx.c | 98 ++++++++++++++++++++++++++++++++----------- 2 files changed, 83 insertions(+), 31 deletions(-)
include/net/fq_impl.h +10 -6
@@ -200,6 +200,7 @@ static void fq_tin_enqueue(struct fq *fq, fq_skb_free_t free_func) {struct fq_flow *flow; +struct sk_buff *next;bool oom;lockdep_assert_held (&fq->lock);
@@ -214,11 +215,15 @@ static void fq_tin_enqueue(struct fq *fq, } flow->tin = tin; - flow->backlog += skb->len; - tin->backlog_bytes += skb->len; - tin->backlog_packets++; - fq->memory_usage += skb->truesize; - fq->backlog++; + skb_list_walk_safe(skb, skb, next) { +skb_mark_not_on_list (skb); + flow->backlog += skb->len; + tin->backlog_bytes += skb->len; + tin->backlog_packets++; + fq->memory_usage += skb->truesize; + fq->backlog++; +__skb_queue_tail (&flow->queue, skb); + }if (list_empty (&flow->flowchain)) { flow->deficit = fq->quantum;
@@ -226,7 +231,6 @@ static void fq_tin_enqueue(struct fq *fq, &tin->new_flows); } -__skb_queue_tail (&flow->queue, skb); oom = (fq->memory_usage > fq->memory_limit);while (fq->backlog > fq->limit || oom) { flow =fq_find_fattest_flow (fq);
net/mac80211/tx.c +73 -25
164 lines not on this page · raw message
Signature · 1 line
2.36.1