mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 09:21:35 +00:00
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 120ae502af169310aa53359d4faf2494dcee6927 Mon Sep 17 00:00:00 2001
|
|
From: Tallapragada Kalyan <quic_ktallapr@quicinc.com>
|
|
Date: Thu, 9 Jun 2022 09:32:38 +0530
|
|
Subject: [PATCH 267/281] net: set skb's fast_xmit flag in dev_fast_xmit API
|
|
|
|
set skb's fast_xmit flag in dev_fast_xmit API for linear packets
|
|
WiFi tx path can avoid some overhead due to checks based on this flag
|
|
|
|
Change-Id: Ied29f9d615d0cf48dd9dcd7fcf0fb210eb259a8f
|
|
Signed-off-by: Tallapragada Kalyan <quic_ktallapr@quicinc.com>
|
|
---
|
|
include/linux/skbuff.h | 2 ++
|
|
net/core/dev.c | 4 ++++
|
|
2 files changed, 6 insertions(+)
|
|
|
|
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
|
|
index 926c22f13395..44771a5360a0 100644
|
|
--- a/include/linux/skbuff.h
|
|
+++ b/include/linux/skbuff.h
|
|
@@ -986,6 +986,8 @@ struct sk_buff {
|
|
__u8 csum_not_inet:1;
|
|
__u8 scm_io_uring:1;
|
|
__u8 fast_forwarded:1;
|
|
+ /* Linear packets processed by dev_fast_xmit() */
|
|
+ __u8 fast_xmit:1;
|
|
/* 1 or 3 bit hole */
|
|
|
|
#ifdef CONFIG_NET_SCHED
|
|
diff --git a/net/core/dev.c b/net/core/dev.c
|
|
index fbf2a47a65ec..151324a29ccd 100644
|
|
--- a/net/core/dev.c
|
|
+++ b/net/core/dev.c
|
|
@@ -4162,6 +4162,10 @@ bool dev_fast_xmit(struct sk_buff *skb,
|
|
int cpu;
|
|
netdev_tx_t rc;
|
|
|
|
+ /* the fast_xmit flag will avoid multiple checks in wifi xmit path */
|
|
+ if (likely(!skb_is_nonlinear(skb)))
|
|
+ skb->fast_xmit = 1;
|
|
+
|
|
if (unlikely(!(dev->flags & IFF_UP))) {
|
|
return false;
|
|
}
|
|
--
|
|
2.17.1
|
|
|