Updated and refreshed patches.

Renamed patches to keep their original numbering from codelinaro.org
Fixed minor bugs and added support for the qca-nss-drv-l2tpv2 module
This commit is contained in:
SqTER-PL
2025-03-09 21:32:46 +01:00
committed by Lucas Asvio
parent b93287296b
commit 5536c2039e
70 changed files with 617 additions and 399 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/netfilter/nf_conntrack_ecache.c --- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c
@@ -324,7 +324,6 @@ void nf_conntrack_register_notifier(stru @@ -266,7 +266,6 @@ void nf_conntrack_register_notifier(stru
mutex_lock(&nf_ct_ecache_mutex); mutex_lock(&nf_ct_ecache_mutex);
notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb, notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb,
lockdep_is_held(&nf_ct_ecache_mutex)); lockdep_is_held(&nf_ct_ecache_mutex));

View File

@@ -1329,3 +1329,47 @@
#define NF_FLOW_TIMEOUT (30 * HZ) #define NF_FLOW_TIMEOUT (30 * HZ)
#define nf_flowtable_time_stamp (u32)jiffies #define nf_flowtable_time_stamp (u32)jiffies
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -403,6 +403,30 @@ err_tlock:
}
EXPORT_SYMBOL_GPL(l2tp_session_register);
+void l2tp_stats_update(struct l2tp_tunnel *tunnel,
+ struct l2tp_session *session,
+ struct l2tp_stats *stats)
+{
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
+ &tunnel->stats.rx_packets);
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
+ &tunnel->stats.rx_bytes);
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
+ &tunnel->stats.tx_packets);
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
+ &tunnel->stats.tx_bytes);
+
+ atomic_long_add(atomic_long_read(&stats->rx_packets),
+ &session->stats.rx_packets);
+ atomic_long_add(atomic_long_read(&stats->rx_bytes),
+ &session->stats.rx_bytes);
+ atomic_long_add(atomic_long_read(&stats->tx_packets),
+ &session->stats.tx_packets);
+ atomic_long_add(atomic_long_read(&stats->tx_bytes),
+ &session->stats.tx_bytes);
+}
+EXPORT_SYMBOL_GPL(l2tp_stats_update);
+
/*****************************************************************************
* Receive data handling
*****************************************************************************/
--- a/net/l2tp/l2tp_core.h
+++ b/net/l2tp/l2tp_core.h
@@ -231,6 +231,8 @@ struct l2tp_session *l2tp_session_get(co
struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth);
struct l2tp_session *l2tp_session_get_by_ifname(const struct net *net,
const char *ifname);
+void l2tp_stats_update(struct l2tp_tunnel *tunnel, struct l2tp_session *session,
+ struct l2tp_stats *stats);
/* Tunnel and session lifetime management.
* Creation of a new instance is a two-step process: create, then register.

View File

@@ -90,7 +90,7 @@
{ {
--- a/include/linux/netdevice.h --- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h +++ b/include/linux/netdevice.h
@@ -4732,6 +4732,15 @@ void dev_uc_flush(struct net_device *dev @@ -4701,6 +4701,15 @@ void dev_uc_flush(struct net_device *dev
void dev_uc_init(struct net_device *dev); void dev_uc_init(struct net_device *dev);
/** /**

View File

@@ -1,7 +1,7 @@
From ed42112c77bfb68594f49e252ace2dd6b8c8e7ff Mon Sep 17 00:00:00 2001 From 3b9b9ff11f657056fced33c4c65bdc0107ae4614 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name> From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 16 Mar 2023 17:21:39 +0530 Date: Thu, 16 Mar 2023 17:21:39 +0530
Subject: [PATCH 063/281] OpenWrt: Subject: [PATCH 058/500] OpenWrt:
613-netfilter_optional_tcp_window_check.patch 613-netfilter_optional_tcp_window_check.patch
netfilter: optional tcp window check netfilter: optional tcp window check
@@ -11,6 +11,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Change-Id: I6f7a23b89062cca58c87554e75ae32b0e2aa2831 Change-Id: I6f7a23b89062cca58c87554e75ae32b0e2aa2831
Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com> Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com>
(cherry picked from commit ed42112c77bfb68594f49e252ace2dd6b8c8e7ff)
--- ---
include/net/netns/conntrack.h | 1 + include/net/netns/conntrack.h | 1 +
net/netfilter/nf_conntrack_proto_tcp.c | 9 ++++++++- net/netfilter/nf_conntrack_proto_tcp.c | 9 ++++++++-

View File

@@ -1,7 +1,7 @@
From a647c9cf03fd82ce5e090891e5ffa68e22dcf88d Mon Sep 17 00:00:00 2001 From c9e8cfc5a7e5d2ded5e9934272af7b9b453183f1 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Mon, 8 May 2017 11:49:21 -0700 Date: Mon, 8 May 2017 11:49:21 -0700
Subject: [PATCH 234/281] OpenWRT: 644-bridge_optimize_netfilter_hooks.patch Subject: [PATCH 171/500] OpenWRT: 644-bridge_optimize_netfilter_hooks.patch
This patch applies the following upstreamed This patch applies the following upstreamed
openwrt patch from 3.14 kernel. openwrt patch from 3.14 kernel.
@@ -10,6 +10,7 @@ commit 76b37c24252b (OpenWrt: apply 644-bridge_optimize_netfilter_hooks.patch)
Change-Id: I4dde201c34717321115c9c067dc10d0b38d6eee6 Change-Id: I4dde201c34717321115c9c067dc10d0b38d6eee6
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org> Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
(cherry picked from commit a647c9cf03fd82ce5e090891e5ffa68e22dcf88d)
--- ---
net/bridge/br_forward.c | 4 ++-- net/bridge/br_forward.c | 4 ++--
net/bridge/br_input.c | 6 +++--- net/bridge/br_input.c | 6 +++---
@@ -41,7 +42,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
} }
--- a/net/bridge/br_input.c --- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c +++ b/net/bridge/br_input.c
@@ -75,7 +75,7 @@ int br_pass_frame_up(struct sk_buff *skb @@ -67,7 +67,7 @@ static int br_pass_frame_up(struct sk_bu
BR_INPUT_SKB_CB(skb)->promisc = promisc; BR_INPUT_SKB_CB(skb)->promisc = promisc;
@@ -50,7 +51,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
dev_net(indev), NULL, skb, indev, NULL, dev_net(indev), NULL, skb, indev, NULL,
br_netif_receive_skb); br_netif_receive_skb);
} }
@@ -433,7 +433,7 @@ static rx_handler_result_t br_handle_fra @@ -405,7 +405,7 @@ static rx_handler_result_t br_handle_fra
* - returns = 0 (stolen/nf_queue) * - returns = 0 (stolen/nf_queue)
* Thus return 1 from the okfn() to signal the skb is ok to pass * Thus return 1 from the okfn() to signal the skb is ok to pass
*/ */
@@ -59,7 +60,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
dev_net(skb->dev), NULL, skb, skb->dev, NULL, dev_net(skb->dev), NULL, skb, skb->dev, NULL,
br_handle_local_finish) == 1) { br_handle_local_finish) == 1) {
return RX_HANDLER_PASS; return RX_HANDLER_PASS;
@@ -454,7 +454,7 @@ forward: @@ -426,7 +426,7 @@ forward:
if (ether_addr_equal(p->br->dev->dev_addr, dest)) if (ether_addr_equal(p->br->dev->dev_addr, dest))
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
@@ -109,10 +110,10 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
.proc_handler = brnf_sysctl_call_tables, .proc_handler = brnf_sysctl_call_tables,
}, },
+ { + {
+ .procname = "bridge-nf-call-ebtables", + .procname = "bridge-nf-call-ebtables",
+ .maxlen = sizeof(int), + .maxlen = sizeof(int),
+ .mode = 0644, + .mode = 0644,
+ .proc_handler = brnf_sysctl_call_tables, + .proc_handler = brnf_sysctl_call_tables,
+ }, + },
{ } { }
}; };
@@ -121,7 +122,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
brnf->call_iptables = 1; brnf->call_iptables = 1;
brnf->call_ip6tables = 1; brnf->call_ip6tables = 1;
brnf->call_arptables = 1; brnf->call_arptables = 1;
+ brnf->call_ebtables = 0; + brnf->call_ebtables = 1;
brnf->filter_vlan_tagged = 0; brnf->filter_vlan_tagged = 0;
brnf->filter_pppoe_tagged = 0; brnf->filter_pppoe_tagged = 0;
brnf->pass_vlan_indev = 0; brnf->pass_vlan_indev = 0;
@@ -135,15 +136,15 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
--- a/net/bridge/br_private.h --- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h +++ b/net/bridge/br_private.h
@@ -20,6 +20,7 @@ @@ -19,6 +19,7 @@
#include <linux/if_vlan.h>
#include <linux/rhashtable.h> #include <linux/rhashtable.h>
#include <linux/refcount.h> #include <linux/refcount.h>
#include <linux/export.h>
+#include <linux/netfilter.h> +#include <linux/netfilter.h>
#define BR_HASH_BITS 8 #define BR_HASH_BITS 8
#define BR_HASH_SIZE (1 << BR_HASH_BITS) #define BR_HASH_SIZE (1 << BR_HASH_BITS)
@@ -1934,12 +1935,25 @@ extern const struct nf_br_ops __rcu *nf_ @@ -1932,12 +1933,25 @@ extern const struct nf_br_ops __rcu *nf_
int br_nf_core_init(void); int br_nf_core_init(void);
void br_nf_core_fini(void); void br_nf_core_fini(void);
void br_netfilter_rtable_init(struct net_bridge *); void br_netfilter_rtable_init(struct net_bridge *);

View File

@@ -1,7 +1,7 @@
From b5f89637414ada5125cbc9138f5b27cbfa8fe1b5 Mon Sep 17 00:00:00 2001 From 6447fffde1be8235684aaa6b94e016e9c18f7776 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <quic_msezgin@quicinc.com> From: Murat Sezgin <quic_msezgin@quicinc.com>
Date: Wed, 10 May 2023 13:15:19 -0700 Date: Wed, 10 May 2023 13:15:19 -0700
Subject: [PATCH 219/281] bridge: Add new bridge APIs needed for network HW Subject: [PATCH 212/500] bridge: Add new bridge APIs needed for network HW
acceleration acceleration
Bridge acceleration hardware needs to perform certain operations, Bridge acceleration hardware needs to perform certain operations,

View File

@@ -1,7 +1,7 @@
From 16c72f2199f57a4b2f0295b8d08881cc94ad7e0b Mon Sep 17 00:00:00 2001 From 9286d857a8a538f4bc6c14996327a8b653ad88a7 Mon Sep 17 00:00:00 2001
From: Kathiravan T <kathirav@codeaurora.org> From: Kathiravan T <kathirav@codeaurora.org>
Date: Thu, 7 Feb 2013 12:15:11 -0800 Date: Thu, 7 Feb 2013 12:15:11 -0800
Subject: [PATCH 274/281] Revert "ARM: dma-mapping: remove dmac_clean_range and Subject: [PATCH 094/500] Revert "ARM: dma-mapping: remove dmac_clean_range and
dmac_inv_range" dmac_inv_range"
This partially reverts 'commit 702b94bff3c505 ("ARM: dma-mapping: This partially reverts 'commit 702b94bff3c505 ("ARM: dma-mapping:

View File

@@ -1,7 +1,7 @@
From f765b8ae3df6783fed448413937781aa984389ea Mon Sep 17 00:00:00 2001 From 4d24f7603ac3c0a8c4fe4983ae31fcb4476b1724 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Thu, 5 May 2016 14:01:51 -0700 Date: Thu, 5 May 2016 14:01:51 -0700
Subject: [PATCH 231/281] neighbour: Add a new neigh mac update notifier Subject: [PATCH 092/500] neighbour: Add a new neigh mac update notifier
With this new notifier, neighbour subsystem will With this new notifier, neighbour subsystem will
provide a neighbour mac address update notification provide a neighbour mac address update notification

View File

@@ -1,7 +1,7 @@
From ce18a6fdff6a39a01111d74f513d2ef66142047c Mon Sep 17 00:00:00 2001 From 1667939d350f5b0db4d82df3efcef249fa5404db Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 5 Aug 2020 13:21:27 -0700 Date: Wed, 5 Aug 2020 13:21:27 -0700
Subject: [PATCH 246/281] net:ipv6: Fix IPv6 user route change event calls Subject: [PATCH 146/500] net:ipv6: Fix IPv6 user route change event calls
These events should be called only when the route table is These events should be called only when the route table is
changed by the userspace. So, we should call them in the changed by the userspace. So, we should call them in the
@@ -10,33 +10,12 @@ ioctl and the netlink message handler function.
Change-Id: If7ec615014cfc79d5fa72878e49eaf99c2560c32 Change-Id: If7ec615014cfc79d5fa72878e49eaf99c2560c32
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org> Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
--- ---
net/ipv6/route.c | 31 +++++++++++++++++++++---------- net/ipv6/route.c | 24 ++++++++++++++++++++----
1 file changed, 21 insertions(+), 10 deletions(-) 1 file changed, 20 insertions(+), 4 deletions(-)
--- a/net/ipv6/route.c --- a/net/ipv6/route.c
+++ b/net/ipv6/route.c +++ b/net/ipv6/route.c
@@ -3876,9 +3876,6 @@ int ip6_route_add(struct fib6_config *cf @@ -4502,6 +4502,10 @@ int ipv6_route_ioctl(struct net *net, un
return PTR_ERR(rt);
err = __ip6_ins_rt(rt, &cfg->fc_nlinfo, extack);
- if (!err)
- atomic_notifier_call_chain(&ip6route_chain,
- RTM_NEWROUTE, rt);
fib6_info_release(rt);
return err;
@@ -3899,9 +3896,7 @@ static int __ip6_del_rt(struct fib6_info
spin_lock_bh(&table->tb6_lock);
err = fib6_del(rt, info);
spin_unlock_bh(&table->tb6_lock);
- if (!err)
- atomic_notifier_call_chain(&ip6route_chain,
- RTM_DELROUTE, rt);
+
out:
fib6_info_release(rt);
return err;
@@ -4510,6 +4505,10 @@ int ipv6_route_ioctl(struct net *net, un
break; break;
} }
rtnl_unlock(); rtnl_unlock();
@@ -47,7 +26,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
return err; return err;
} }
@@ -5532,11 +5531,17 @@ static int inet6_rtm_delroute(struct sk_ @@ -5524,11 +5528,17 @@ static int inet6_rtm_delroute(struct sk_
} }
if (cfg.fc_mp) if (cfg.fc_mp)
@@ -67,7 +46,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
} }
static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh,
@@ -5553,9 +5558,15 @@ static int inet6_rtm_newroute(struct sk_ @@ -5545,9 +5555,15 @@ static int inet6_rtm_newroute(struct sk_
cfg.fc_metric = IP6_RT_PRIO_USER; cfg.fc_metric = IP6_RT_PRIO_USER;
if (cfg.fc_mp) if (cfg.fc_mp)

View File

@@ -0,0 +1,109 @@
From 04d249769b277035aeaac85ac2a73a85ec163fcb Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Tue, 25 Jan 2022 16:09:56 -0800
Subject: [PATCH 178/500] net: add fast xmit api
this new function bypass most validation on the skb, and call
netdev_start_xmit directly from this function.
Change-Id: Ifc9019370a7a3839945ca83e24d675fd898c23c1
Signed-off-by: Ken Zhu <quic_guigenz@quicinc.com>
---
include/linux/netdevice.h | 2 ++
net/core/dev.c | 74 +++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3183,6 +3183,8 @@ static inline int dev_direct_xmit(struct
return ret;
}
+bool dev_fast_xmit(struct sk_buff *skb, struct net_device *dev,
+ netdev_features_t features);
int register_netdevice(struct net_device *dev);
void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
void unregister_netdevice_many(struct list_head *head);
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4329,6 +4329,80 @@ struct netdev_queue *netdev_core_pick_tx
}
/**
+ * dev_fast_xmit - fast xmit the skb
+ * @skb:buffer to transmit
+ * @dev: the device to be transmited to
+ * @features: the skb features could bed used
+ * sucessful return true
+ * failed return false
+ */
+bool dev_fast_xmit(struct sk_buff *skb,
+ struct net_device *dev,
+ netdev_features_t features)
+{
+ struct netdev_queue *txq;
+ int cpu;
+ netdev_tx_t rc;
+
+ if (unlikely(!(dev->flags & IFF_UP))) {
+ return false;
+ }
+
+ if (unlikely(skb_needs_linearize(skb, features))) {
+ return false;
+ }
+
+ rcu_read_lock_bh();
+ cpu = smp_processor_id();
+
+ /* If device don't need the dst, release it now, otherwise make sure
+ * the refcount increased.
+ */
+ if (likely(dev->priv_flags & IFF_XMIT_DST_RELEASE)) {
+ skb_dst_drop(skb);
+ } else {
+ skb_dst_force(skb);
+ }
+
+ txq = netdev_core_pick_tx(dev, skb, NULL);
+
+ if (likely(txq->xmit_lock_owner != cpu)) {
+#define FAST_HARD_TX_LOCK(features, txq, cpu) { \
+ if ((features & NETIF_F_LLTX) == 0) { \
+ __netif_tx_lock(txq, cpu); \
+ } else { \
+ __netif_tx_acquire(txq); \
+ } \
+}
+
+#define FAST_HARD_TX_UNLOCK(features, txq) { \
+ if ((features & NETIF_F_LLTX) == 0) { \
+ __netif_tx_unlock(txq); \
+ } else { \
+ __netif_tx_release(txq); \
+ } \
+}
+ netdev_features_t dev_features = dev->features;
+ FAST_HARD_TX_LOCK(dev_features, txq, cpu);
+ if (likely(!netif_xmit_stopped(txq))) {
+ rc = netdev_start_xmit(skb, dev, txq, 0);
+ if (unlikely(!dev_xmit_complete(rc))) {
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ goto fail;
+ }
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ rcu_read_unlock_bh();
+ return true;
+ }
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ }
+fail:
+ rcu_read_unlock_bh();
+ return false;
+}
+EXPORT_SYMBOL(dev_fast_xmit);
+
+/**
* __dev_queue_xmit() - transmit a buffer
* @skb: buffer to transmit
* @sb_dev: suboordinate device used for L2 forwarding offload

View File

@@ -17,7 +17,7 @@ Signed-off-by: Tushar Ganatra <quic_tganatra@quicinc.com>
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -4505,6 +4505,11 @@ int __dev_queue_xmit(struct sk_buff *skb @@ -4434,6 +4434,11 @@ int __dev_queue_xmit(struct sk_buff *skb
skb_reset_mac_header(skb); skb_reset_mac_header(skb);
skb_assert_len(skb); skb_assert_len(skb);

View File

@@ -0,0 +1,39 @@
From 61b8596727cb75c134ca6367b956d0e4596bfc69 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 179/500] 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(+)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -989,6 +989,8 @@ struct sk_buff {
#if IS_ENABLED(CONFIG_IP_SCTP)
__u8 csum_not_inet:1;
#endif
+ /* Linear packets processed by dev_fast_xmit() */
+ __u8 fast_xmit:1;
#if defined(CONFIG_NET_SCHED) || defined(CONFIG_NET_XGRESS)
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4344,6 +4344,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;
}

View File

@@ -1,7 +1,7 @@
From fe56e8cb75f113577dbf3edb717ea967f3723e22 Mon Sep 17 00:00:00 2001 From da352a66ee871ddba0e1970f029ca17d5b4fd99b Mon Sep 17 00:00:00 2001
From: Suman Ghosh <quic_sumaghos@quicinc.com> From: Suman Ghosh <quic_sumaghos@quicinc.com>
Date: Sat, 4 Sep 2021 01:09:20 +0530 Date: Sat, 4 Sep 2021 01:09:20 +0530
Subject: [PATCH 278/281] arm/arm64: Add new APIs to perform dma cache Subject: [PATCH 095/500] arm/arm64: Add new APIs to perform dma cache
maintenance operation without dsb. maintenance operation without dsb.
Change-Id: I511657af343c8dc668ab7280362b3cdd57579360 Change-Id: I511657af343c8dc668ab7280362b3cdd57579360

View File

@@ -1,7 +1,7 @@
From c1be565d9240421e69de2ff13b53919134c03edd Mon Sep 17 00:00:00 2001 From 6b9e06c4d45f9bd567df8a7c249274835eb52d12 Mon Sep 17 00:00:00 2001
From: Ram Chandra Jangir <rjangir@codeaurora.org> From: Ram Chandra Jangir <rjangir@codeaurora.org>
Date: Sat, 30 Jul 2016 19:31:53 +0530 Date: Sat, 30 Jul 2016 19:31:53 +0530
Subject: [PATCH 232/281] netfilter: iptable: Fix IPv4 default checks Subject: [PATCH 148/500] netfilter: iptable: Fix IPv4 default checks
OpenWRT: 610-netfilter_match_bypass_default_checks.patch OpenWRT: 610-netfilter_match_bypass_default_checks.patch
This change fixes up the above patch that had some code get dropped This change fixes up the above patch that had some code get dropped

View File

@@ -1,7 +1,7 @@
From c38b43a2a98eaf2dd3401998e982716e98339907 Mon Sep 17 00:00:00 2001 From 58a9e8c4c441c739821255d88b7c08330b392303 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Tue, 27 Jan 2015 11:10:26 -0800 Date: Tue, 27 Jan 2015 11:10:26 -0800
Subject: [PATCH 224/281] ipv6: Export ndisc_send_ns() function for public use. Subject: [PATCH 143/500] ipv6: Export ndisc_send_ns() function for public use.
This API is needed to implement a connection This API is needed to implement a connection
manager for hardware accelaration. manager for hardware accelaration.

View File

@@ -1,7 +1,7 @@
From 0564884785c2f49419b8d14ca98141c8e85cd8ab Mon Sep 17 00:00:00 2001 From 1d404a9f8dcd1824aa3aff2c3e21bcff7db90c40 Mon Sep 17 00:00:00 2001
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Date: Thu, 17 Mar 2016 10:57:38 -0600 Date: Thu, 17 Mar 2016 10:57:38 -0600
Subject: [PATCH 251/281] net: core: neighbour: Change the print format for Subject: [PATCH 093/500] net: core: neighbour: Change the print format for
addresses addresses
Print format %p displays the kernel address while bypassing the Print format %p displays the kernel address while bypassing the

View File

@@ -1,7 +1,7 @@
From a6c62be5177cf3b383188a79241bd6d5833173d0 Mon Sep 17 00:00:00 2001 From f6505b020f13fc9f0181758eb8ea436dcc39feb3 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Mon, 6 Apr 2020 11:08:09 -0700 Date: Mon, 6 Apr 2020 11:08:09 -0700
Subject: [PATCH 243/281] netfilter: export udp_get_timeouts function Subject: [PATCH 147/500] netfilter: export udp_get_timeouts function
This function is required for acceleration support. This function is required for acceleration support.

View File

@@ -1,7 +1,7 @@
From 776142dbbc2a3da1d47d1042822f72ba3127417b Mon Sep 17 00:00:00 2001 From 665f257e04d6534e2001e3db73c0922a2968b48b Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 10 Feb 2016 15:38:12 -0800 Date: Wed, 10 Feb 2016 15:38:12 -0800
Subject: [PATCH 225/281] net: ipv4/ipv6: Added route table update notify chain Subject: [PATCH 145/500] net: ipv4/ipv6: Added route table update notify chain
Registered modules are notified for the changes in the Registered modules are notified for the changes in the
route table. route table.
@@ -129,7 +129,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
out: out:
fib6_info_release(rt); fib6_info_release(rt);
return err; return err;
@@ -6356,6 +6364,18 @@ static int ip6_route_dev_notify(struct n @@ -6372,6 +6380,18 @@ static int ip6_route_dev_notify(struct n
return NOTIFY_OK; return NOTIFY_OK;
} }

View File

@@ -1,7 +1,7 @@
From ae56f1dceb55a3e8e5fadf9bc109270436e3d8fa Mon Sep 17 00:00:00 2001 From 3d811fe6ee3a874861faadb64e44650ed466a808 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <quic_msezgin@quicinc.com> From: Murat Sezgin <quic_msezgin@quicinc.com>
Date: Thu, 18 May 2023 21:11:09 -0700 Date: Thu, 18 May 2023 21:11:09 -0700
Subject: [PATCH 220/281] net: bridge: Added bridge fdb update notify chain Subject: [PATCH 213/500] net: bridge: Added bridge fdb update notify chain
Registered modules are notified based on two events: Registered modules are notified based on two events:
1. Dst port changes for any existing bridge fdb entry 1. Dst port changes for any existing bridge fdb entry
@@ -61,16 +61,15 @@ Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
void br_fdb_cleanup(struct work_struct *work) void br_fdb_cleanup(struct work_struct *work)
{ {
struct net_bridge *br = container_of(work, struct net_bridge, struct net_bridge *br = container_of(work, struct net_bridge,
@@ -527,6 +541,8 @@ void br_fdb_cleanup(struct work_struct * @@ -527,6 +541,7 @@ void br_fdb_cleanup(struct work_struct *
unsigned long delay = hold_time(br); unsigned long delay = hold_time(br);
unsigned long work_delay = delay; unsigned long work_delay = delay;
unsigned long now = jiffies; unsigned long now = jiffies;
+ u8 mac_addr[6]; + u8 mac_addr[6];
+
/* this part is tricky, in order to avoid blocking learning and /* this part is tricky, in order to avoid blocking learning and
* consequently forwarding, we rely on rcu to delete objects with * consequently forwarding, we rely on rcu to delete objects with
@@ -553,8 +569,12 @@ void br_fdb_cleanup(struct work_struct * @@ -553,8 +568,12 @@ void br_fdb_cleanup(struct work_struct *
work_delay = min(work_delay, this_timer - now); work_delay = min(work_delay, this_timer - now);
} else { } else {
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
@@ -85,15 +84,22 @@ Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
spin_unlock_bh(&br->hash_lock); spin_unlock_bh(&br->hash_lock);
} }
} }
@@ -886,6 +906,11 @@ void br_fdb_update(struct net_bridge *br @@ -881,6 +900,7 @@ void br_fdb_update(struct net_bridge *br
br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH);
WRITE_ONCE(fdb->dst, source);
fdb_modified = true;
+
/* Take over HW learned entry */
if (unlikely(test_bit(BR_FDB_ADDED_BY_EXT_LEARN,
&fdb->flags))) &fdb->flags)))
clear_bit(BR_FDB_ADDED_BY_EXT_LEARN, @@ -891,6 +911,10 @@ void br_fdb_update(struct net_bridge *br
&fdb->flags); */
if (unlikely(test_bit(BR_FDB_LOCKED, &fdb->flags)))
clear_bit(BR_FDB_LOCKED, &fdb->flags);
+ +
+ atomic_notifier_call_chain( + atomic_notifier_call_chain(
+ &br_fdb_update_notifier_list, + &br_fdb_update_notifier_list,
+ 0, (void *)addr); + 0, (void *)addr);
+ }
/* Clear locked flag when roaming to an
* unlocked port. if (unlikely(test_bit(BR_FDB_ADDED_BY_USER, &flags)))
*/

View File

@@ -1,7 +1,7 @@
From 449a86c59f4c7c0c58314755b9b638145e8a8d5a Mon Sep 17 00:00:00 2001 From c1cf7f080f65c7da040280ce72edf3aec80d6e5f Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 11 Mar 2020 11:20:40 -0700 Date: Wed, 11 Mar 2020 11:20:40 -0700
Subject: [PATCH 221/281] Updated the br_port_dev_get function to take an skb Subject: [PATCH 214/500] Updated the br_port_dev_get function to take an skb
- If the skb is non-NULL, call the br_port_dev_get_hook (if it exists), - If the skb is non-NULL, call the br_port_dev_get_hook (if it exists),
to try and fetch the port. to try and fetch the port.

View File

@@ -104,7 +104,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) { br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) {
--- a/net/bridge/br_private.h --- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h +++ b/net/bridge/br_private.h
@@ -907,6 +907,7 @@ void br_manage_promisc(struct net_bridge @@ -908,6 +908,7 @@ void br_manage_promisc(struct net_bridge
int nbp_backup_change(struct net_bridge_port *p, struct net_device *backup_dev); int nbp_backup_change(struct net_bridge_port *p, struct net_device *backup_dev);
/* br_input.c */ /* br_input.c */
@@ -112,7 +112,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb); int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb);
rx_handler_func_t *br_get_rx_handler(const struct net_device *dev); rx_handler_func_t *br_get_rx_handler(const struct net_device *dev);
@@ -2268,4 +2269,8 @@ void br_do_suppress_nd(struct sk_buff *s @@ -2282,4 +2283,8 @@ void br_do_suppress_nd(struct sk_buff *s
u16 vid, struct net_bridge_port *p, struct nd_msg *msg); u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m); struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid); bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);

View File

@@ -1,7 +1,7 @@
From 781701738687f5cc13ae949410b162a2cdda817f Mon Sep 17 00:00:00 2001 From 05f608faa62c7f5ecd930908d3fdfbc24d92050b Mon Sep 17 00:00:00 2001
From: Zhi Chen <zhichen@codeaurora.org> From: Zhi Chen <zhichen@codeaurora.org>
Date: Thu, 27 Aug 2015 16:37:09 -0700 Date: Thu, 27 Aug 2015 16:37:09 -0700
Subject: [PATCH 227/281] bridge: add fdb events in linux bridge Subject: [PATCH 216/500] bridge: add fdb events in linux bridge
Notify fdb changing events to those modules which are interested in Notify fdb changing events to those modules which are interested in
hosts joining/leaving or bridge port changing. This is required by hosts joining/leaving or bridge port changing. This is required by

View File

@@ -1,6 +1,24 @@
From a05aa24a03675158abf450788bb29bedfdf74b34 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 11 Mar 2020 12:44:01 -0700
Subject: [PATCH 217/500] net: Add netdevice notification for bridge activity
This modification allows programs to get notified whenever a
device is added to or removed from a bridge. This will be used
by NSS Qdisc for updating bridge shaper configuration.
Change-Id: I97aa6951c98ba83cd0d176cd60a9e9fd910f7ad4
Signed-off-by: Shashank Balashankar <sbalasha@codeaurora.org>
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
---
include/linux/netdevice.h | 2 ++
net/bridge/br_if.c | 3 +++
net/core/dev.c | 1 +
3 files changed, 6 insertions(+)
--- a/include/linux/netdevice.h --- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h +++ b/include/linux/netdevice.h
@@ -2939,6 +2939,8 @@ enum netdev_cmd { @@ -2959,6 +2959,8 @@ enum netdev_cmd {
NETDEV_OFFLOAD_XSTATS_REPORT_USED, NETDEV_OFFLOAD_XSTATS_REPORT_USED,
NETDEV_OFFLOAD_XSTATS_REPORT_DELTA, NETDEV_OFFLOAD_XSTATS_REPORT_DELTA,
NETDEV_XDP_FEAT_CHANGE, NETDEV_XDP_FEAT_CHANGE,
@@ -30,12 +48,11 @@
* therefore there is no reason for a NETDEV_RELEASE event. * therefore there is no reason for a NETDEV_RELEASE event.
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -1730,6 +1730,8 @@ const char *netdev_cmd_to_name(enum netd @@ -1730,6 +1730,7 @@ const char *netdev_cmd_to_name(enum netd
N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_ENABLE) N(OFFLOAD_XSTATS_DISABLE) N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_ENABLE) N(OFFLOAD_XSTATS_DISABLE)
N(OFFLOAD_XSTATS_REPORT_USED) N(OFFLOAD_XSTATS_REPORT_DELTA) N(OFFLOAD_XSTATS_REPORT_USED) N(OFFLOAD_XSTATS_REPORT_DELTA)
N(XDP_FEAT_CHANGE) N(XDP_FEAT_CHANGE)
+ N(BR_JOIN) N(BR_LEAVE) + N(BR_JOIN) N(BR_LEAVE)
+
} }
#undef N #undef N
return "UNKNOWN_NETDEV_EVENT"; return "UNKNOWN_NETDEV_EVENT";

View File

@@ -1,7 +1,7 @@
From 86f006a651d5415d046be00c851d15e86abae6bb Mon Sep 17 00:00:00 2001 From e9c45fea02f4636bda0b5175029802c2f15652ff Mon Sep 17 00:00:00 2001
From: Murat Sezgin <quic_msezgin@quicinc.com> From: Amitesh Anand <quic_amitesh@quicinc.com>
Date: Thu, 18 May 2023 21:11:39 -0700 Date: Thu, 18 May 2023 21:11:39 -0700
Subject: [PATCH 230/281] bridge: Port Hy-Fi bridging hooks Subject: [PATCH 218/500] bridge: Port Hy-Fi bridging hooks
Introduce two new netfilter hooks. The first allows the Hy-Fi bridging Introduce two new netfilter hooks. The first allows the Hy-Fi bridging
logic to indicate a different egress port (thereby overriding the FDB). logic to indicate a different egress port (thereby overriding the FDB).
@@ -31,6 +31,7 @@ Pass serial number to Linux bridge port lookup
Change-Id: I392bbc82fab30c345b14e7927b6b0fa119d19a57 Change-Id: I392bbc82fab30c345b14e7927b6b0fa119d19a57
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org> Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com> Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
Signed-off-by: Amitesh Anand <quic_amitesh@quicinc.com>
--- ---
include/linux/if_bridge.h | 15 +++++++++++++-- include/linux/if_bridge.h | 15 +++++++++++++--
net/bridge/br.c | 4 ++++ net/bridge/br.c | 4 ++++
@@ -192,15 +193,15 @@ Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
errout: errout:
--- a/net/bridge/br_private.h --- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h +++ b/net/bridge/br_private.h
@@ -19,6 +19,7 @@ @@ -20,6 +20,7 @@
#include <linux/if_vlan.h>
#include <linux/rhashtable.h> #include <linux/rhashtable.h>
#include <linux/refcount.h> #include <linux/refcount.h>
#include <linux/netfilter.h>
+#include <linux/export.h> +#include <linux/export.h>
#define BR_HASH_BITS 8 #define BR_HASH_BITS 8
#define BR_HASH_SIZE (1 << BR_HASH_BITS) #define BR_HASH_SIZE (1 << BR_HASH_BITS)
@@ -2273,4 +2274,12 @@ bool br_is_neigh_suppress_enabled(const @@ -2287,4 +2288,12 @@ bool br_is_neigh_suppress_enabled(const
#define __br_get(__hook, __default, __args ...) \ #define __br_get(__hook, __default, __args ...) \
(__hook ? (__hook(__args)) : (__default)) (__hook ? (__hook(__args)) : (__default))

View File

@@ -1,7 +1,7 @@
From b10ef8fe182915a8af2a0cc2ebca16d45f4aaba1 Mon Sep 17 00:00:00 2001 From e3247be9648ac47c6901ebba781ec641481363ec Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Fri, 2 Jun 2017 10:22:27 -0700 Date: Fri, 2 Jun 2017 10:22:27 -0700
Subject: [PATCH 235/281] bridge: Add flag to force netfilter hook evaluation Subject: [PATCH 219/500] bridge: Add flag to force netfilter hook evaluation
Add a sysctl (similar to the ones for iptables/ip6tables) to allow user Add a sysctl (similar to the ones for iptables/ip6tables) to allow user
space to force evaluation of Netfilter hooks registered with the bridge. space to force evaluation of Netfilter hooks registered with the bridge.
@@ -36,8 +36,8 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
static inline __be16 vlan_proto(const struct sk_buff *skb) static inline __be16 vlan_proto(const struct sk_buff *skb)
@@ -1253,6 +1254,12 @@ static struct ctl_table brnf_table[] = { @@ -1253,6 +1254,12 @@ static struct ctl_table brnf_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = brnf_sysctl_call_tables, .proc_handler = brnf_sysctl_call_tables,
}, },
+ { + {
+ .procname = "bridge-nf-call-custom", + .procname = "bridge-nf-call-custom",
@@ -51,8 +51,8 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
@@ -1262,6 +1269,7 @@ static inline void br_netfilter_sysctl_d @@ -1262,6 +1269,7 @@ static inline void br_netfilter_sysctl_d
brnf->call_ip6tables = 1; brnf->call_ip6tables = 1;
brnf->call_arptables = 1; brnf->call_arptables = 1;
brnf->call_ebtables = 0; brnf->call_ebtables = 1;
+ brnf->call_custom = 0; + brnf->call_custom = 1;
brnf->filter_vlan_tagged = 0; brnf->filter_vlan_tagged = 0;
brnf->filter_pppoe_tagged = 0; brnf->filter_pppoe_tagged = 0;
brnf->pass_vlan_indev = 0; brnf->pass_vlan_indev = 0;

View File

@@ -1,7 +1,7 @@
From a64c7ddebaa8749d35fc54b7fcb7f1b7ce076da3 Mon Sep 17 00:00:00 2001 From 9e0457cba1c3d3ccf31a60ebc3fcde18d546ded2 Mon Sep 17 00:00:00 2001
From: Zhu Ken <guigenz@codeaurora.org> From: Zhu Ken <guigenz@codeaurora.org>
Date: Tue, 27 Oct 2015 13:40:51 -0700 Date: Tue, 27 Oct 2015 13:40:51 -0700
Subject: [PATCH 236/281] net: bridge: don't loopback multicast when hairpin Subject: [PATCH 220/500] net: bridge: don't loopback multicast when hairpin
enabled enabled
some virtual service test cases need to enable bridge hairpin. some virtual service test cases need to enable bridge hairpin.

View File

@@ -1,7 +1,7 @@
From 0746a30988584dc8740c8bdc8d75a36452a84ca0 Mon Sep 17 00:00:00 2001 From ba6be6488f6b3fcaed5f72f445cf04edfdeaa49d Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Tue, 9 Feb 2016 18:00:05 -0800 Date: Tue, 9 Feb 2016 18:00:05 -0800
Subject: [PATCH 237/281] Fixed the br_dev_xmit function to call Hy-Fi hooks Subject: [PATCH 221/500] Fixed the br_dev_xmit function to call Hy-Fi hooks
- Previously this wasn't calling the Hy-Fi hooks (meaning that all - Previously this wasn't calling the Hy-Fi hooks (meaning that all
locally generated traffic was sent on a FDB selected port, and hence locally generated traffic was sent on a FDB selected port, and hence
@@ -36,7 +36,7 @@ Signed-off-by: Mughilan Ramajayam <mughilan@codeaurora.org>
dest = eth_hdr(skb)->h_dest; dest = eth_hdr(skb)->h_dest;
if (is_broadcast_ether_addr(dest)) { if (is_broadcast_ether_addr(dest)) {
br_flood(br, skb, BR_PKT_BROADCAST, false, true, vid); br_flood(br, skb, BR_PKT_BROADCAST, false, true, vid);
@@ -109,10 +113,19 @@ netdev_tx_t br_dev_xmit(struct sk_buff * @@ -109,11 +113,21 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
br_multicast_flood(mdst, skb, brmctx, false, true); br_multicast_flood(mdst, skb, brmctx, false, true);
else else
br_flood(br, skb, BR_PKT_MULTICAST, false, true, vid); br_flood(br, skb, BR_PKT_MULTICAST, false, true, vid);
@@ -57,5 +57,7 @@ Signed-off-by: Mughilan Ramajayam <mughilan@codeaurora.org>
+ br_flood(br, skb, BR_PKT_UNICAST, false, true, vid); + br_flood(br, skb, BR_PKT_UNICAST, false, true, vid);
+ } + }
} }
+
out: out:
rcu_read_unlock(); rcu_read_unlock();
return NETDEV_TX_OK;

View File

@@ -1,7 +1,7 @@
From 70105ee0b32d3c84625fcf33622263dfceb9abc7 Mon Sep 17 00:00:00 2001 From 44dd3e7f5c8a6adddce555e12c98c912a96e33c2 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Thu, 12 Mar 2020 17:25:42 -0700 Date: Thu, 12 Mar 2020 17:25:42 -0700
Subject: [PATCH 238/281] bridge: Extend struct br_fdb_event Subject: [PATCH 222/500] bridge: Extend struct br_fdb_event
Send an FDB update event with device information Send an FDB update event with device information
@@ -36,17 +36,16 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
const struct net_bridge_port *src, const struct net_bridge_port *src,
--- a/net/bridge/br_fdb.c --- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c
@@ -574,8 +574,7 @@ void br_fdb_cleanup(struct work_struct * @@ -574,7 +574,7 @@ void br_fdb_cleanup(struct work_struct *
unsigned long delay = hold_time(br); unsigned long delay = hold_time(br);
unsigned long work_delay = delay; unsigned long work_delay = delay;
unsigned long now = jiffies; unsigned long now = jiffies;
- u8 mac_addr[6]; - u8 mac_addr[6];
-
+ struct br_fdb_event fdb_event; + struct br_fdb_event fdb_event;
/* this part is tricky, in order to avoid blocking learning and /* this part is tricky, in order to avoid blocking learning and
* consequently forwarding, we rely on rcu to delete objects with * consequently forwarding, we rely on rcu to delete objects with
@@ -603,10 +602,11 @@ void br_fdb_cleanup(struct work_struct * @@ -602,10 +602,11 @@ void br_fdb_cleanup(struct work_struct *
} else { } else {
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
if (!hlist_unhashed(&f->fdb_node)) { if (!hlist_unhashed(&f->fdb_node)) {
@@ -60,7 +59,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
} }
spin_unlock_bh(&br->hash_lock); spin_unlock_bh(&br->hash_lock);
} }
@@ -903,10 +903,19 @@ static bool __fdb_mark_active(struct net @@ -902,10 +903,19 @@ static bool __fdb_mark_active(struct net
test_and_clear_bit(BR_FDB_NOTIFY_INACTIVE, &fdb->flags)); test_and_clear_bit(BR_FDB_NOTIFY_INACTIVE, &fdb->flags));
} }
@@ -80,7 +79,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
/* some users want to always flood. */ /* some users want to always flood. */
if (hold_time(br) == 0) if (hold_time(br) == 0)
@@ -932,6 +941,10 @@ void br_fdb_update(struct net_bridge *br @@ -931,6 +941,10 @@ void br_fdb_update(struct net_bridge *br
if (unlikely(source != READ_ONCE(fdb->dst) && if (unlikely(source != READ_ONCE(fdb->dst) &&
!test_bit(BR_FDB_STICKY, &fdb->flags))) { !test_bit(BR_FDB_STICKY, &fdb->flags))) {
br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH); br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH);
@@ -90,13 +89,13 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
+ fdb_event.dev = source->dev; + fdb_event.dev = source->dev;
WRITE_ONCE(fdb->dst, source); WRITE_ONCE(fdb->dst, source);
fdb_modified = true; fdb_modified = true;
/* Take over HW learned entry */
@@ -942,7 +955,7 @@ void br_fdb_update(struct net_bridge *br @@ -947,7 +961,7 @@ void br_fdb_update(struct net_bridge *br
atomic_notifier_call_chain( atomic_notifier_call_chain(
&br_fdb_update_notifier_list, &br_fdb_update_notifier_list,
- 0, (void *)addr); - 0, (void *)addr);
+ 0, (void *)&fdb_event); + 0, (void *)&fdb_event);
}
/* Clear locked flag when roaming to an if (unlikely(test_bit(BR_FDB_ADDED_BY_USER, &flags)))
* unlocked port.

View File

@@ -1,7 +1,7 @@
From fc86132bb4893d1747dc2c652a9ad722096dd4f8 Mon Sep 17 00:00:00 2001 From 7e591cce95cbb06256e278c3617ea4cb7b01b6ef Mon Sep 17 00:00:00 2001
From: Zhu Ken <guigenz@codeaurora.org> From: Zhu Ken <guigenz@codeaurora.org>
Date: Wed, 14 Jun 2017 11:45:28 -0700 Date: Wed, 14 Jun 2017 11:45:28 -0700
Subject: [PATCH 244/281] bridge: fix eapol packet dropping issue Subject: [PATCH 223/500] bridge: fix eapol packet dropping issue
wpa_supplicant would receive EAPOL packet to start 802.1x session even if wpa_supplicant would receive EAPOL packet to start 802.1x session even if
its wireless STA interface enslaved in a bridge is disabled. its wireless STA interface enslaved in a bridge is disabled.

View File

@@ -1,7 +1,7 @@
From a3b1392df5e6480db14e9036cbe57f6f9b762d5a Mon Sep 17 00:00:00 2001 From a22553300ace19831f0e7189bc2d43dc4cfd41b5 Mon Sep 17 00:00:00 2001
From: Varsha Mishra <varsham@codeaurora.org> From: Varsha Mishra <varsham@codeaurora.org>
Date: Thu, 11 Jun 2020 18:45:40 +0530 Date: Thu, 11 Jun 2020 18:45:40 +0530
Subject: [PATCH 245/281] bridge: Get hairpin enabled information from bridge. Subject: [PATCH 224/500] bridge: Get hairpin enabled information from bridge.
Add API to let other modules find out if bridge has Add API to let other modules find out if bridge has
hairpin enabled or not. hairpin enabled or not.

View File

@@ -1,7 +1,7 @@
From 38749dbfcfb8b471b9eea391729b9a2a1f215bf2 Mon Sep 17 00:00:00 2001 From 67ba6859810f6699481f9a70434a437fc0a112be Mon Sep 17 00:00:00 2001
From: Tian Yang <tiany@codeaurora.org> From: Tian Yang <tiany@codeaurora.org>
Date: Wed, 9 Sep 2020 15:11:58 -0700 Date: Wed, 9 Sep 2020 15:11:58 -0700
Subject: [PATCH 247/281] net_bridge: Export br_fdb_find_rcu symbol Subject: [PATCH 225/500] net_bridge: Export br_fdb_find_rcu symbol
Export br_fdb_find_rcu symbol to be used for other module Export br_fdb_find_rcu symbol to be used for other module
to find fdb entry. to find fdb entry.

View File

@@ -1,7 +1,7 @@
From 337dafaa0d7bf49e25b4ec74ff44ca697abd06bc Mon Sep 17 00:00:00 2001 From b1d5d5d9430d915a4650efed5684d8166907bf51 Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com> From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Tue, 2 May 2023 21:39:54 -0700 Date: Tue, 2 May 2023 21:39:54 -0700
Subject: [PATCH 213/281] bridge: fix bridge vlan filter toggle issue Subject: [PATCH 226/500] bridge: fix bridge vlan filter toggle issue
when vlan filter is disabled, it could cause new bridge when vlan filter is disabled, it could cause new bridge
creation failed if vlan filter setting existing in the creation failed if vlan filter setting existing in the
@@ -15,7 +15,7 @@ Signed-off-by: Ken Zhu <quic_guigenz@quicinc.com>
--- a/net/bridge/br_netlink.c --- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c
@@ -1320,6 +1320,7 @@ static int br_changelink(struct net_devi @@ -1322,6 +1322,7 @@ static int br_changelink(struct net_devi
br_stp_set_bridge_priority(br, priority); br_stp_set_bridge_priority(br, priority);
} }
@@ -23,7 +23,7 @@ Signed-off-by: Ken Zhu <quic_guigenz@quicinc.com>
if (data[IFLA_BR_VLAN_FILTERING]) { if (data[IFLA_BR_VLAN_FILTERING]) {
u8 vlan_filter = nla_get_u8(data[IFLA_BR_VLAN_FILTERING]); u8 vlan_filter = nla_get_u8(data[IFLA_BR_VLAN_FILTERING]);
@@ -1328,7 +1329,6 @@ static int br_changelink(struct net_devi @@ -1330,7 +1331,6 @@ static int br_changelink(struct net_devi
return err; return err;
} }

View File

@@ -0,0 +1,27 @@
From e0e514c2e9307cae2ae43e991158c8c362a7b40a Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 16 Dec 2020 09:54:50 -0800
Subject: [PATCH 228/500] net: bridge: Disable custom and ebtables calls by
default
These flags will be enabled by the user.
Change-Id: I3418f5c40a93d485383bf7e7fd9afc12ef1519d0
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
---
net/bridge/br_netfilter_hooks.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -1268,8 +1268,8 @@ static inline void br_netfilter_sysctl_d
brnf->call_iptables = 1;
brnf->call_ip6tables = 1;
brnf->call_arptables = 1;
- brnf->call_ebtables = 1;
- brnf->call_custom = 1;
+ brnf->call_ebtables = 0;
+ brnf->call_custom = 0;
brnf->filter_vlan_tagged = 0;
brnf->filter_pppoe_tagged = 0;
brnf->pass_vlan_indev = 0;

View File

@@ -1,7 +1,7 @@
From 507188b4c93e2641fd271bd08d881136a1de2068 Mon Sep 17 00:00:00 2001 From 02b406e82dfde895c03a03e9016844138a2ea421 Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com> From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Thu, 14 Oct 2021 08:50:03 -0700 Date: Thu, 14 Oct 2021 08:50:03 -0700
Subject: [PATCH 260/281] net: fix potential memory leak Subject: [PATCH 232/500] net: fix potential memory leak
When A packets come from a disabled port, if it is not a accepted When A packets come from a disabled port, if it is not a accepted
EAPOL, it has no chance to get freed. EAPOL, it has no chance to get freed.

View File

@@ -1,7 +1,7 @@
From 246b87f0daff042ad215c9c55b411e70ae5406e2 Mon Sep 17 00:00:00 2001 From 72a14726b11c05783835c06efb0ea12ca1afb4d0 Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com> From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Mon, 25 Apr 2022 13:54:20 -0700 Date: Mon, 25 Apr 2022 13:54:20 -0700
Subject: [PATCH 263/281] net: do time update rather than fully update in the Subject: [PATCH 233/500] net: do time update rather than fully update in the
fdb fdb
keep the fdb up to date when do refresh. keep the fdb up to date when do refresh.

View File

@@ -1,7 +1,8 @@
From 4746722090513b5ad66819a758004ac198ccc56f Mon Sep 17 00:00:00 2001 From dd3ba779d4ed0ae717c1f1b8d0bbcf2adbfd6963 Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com> From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Thu, 28 Sep 2023 10:44:56 -0700 Date: Thu, 28 Sep 2023 10:44:56 -0700
Subject: [PATCH] linux: fix dscpremark extention doesn't set the type length Subject: [PATCH 175/500] linux: fix dscpremark extention doesn't set the type
length
It needs to set up the type length for each extension. It needs to set up the type length for each extension.

View File

@@ -1,7 +1,7 @@
From 6f8beb8ec2047f645b488dd95be6f98ce0584165 Mon Sep 17 00:00:00 2001 From 5c907ac28f19fdef880d56e0ffc15a0d6369c372 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <quic_msezgin@quicinc.com> From: Murat Sezgin <quic_msezgin@quicinc.com>
Date: Thu, 18 May 2023 08:47:34 -0700 Date: Thu, 18 May 2023 08:47:34 -0700
Subject: [PATCH 271/281] net: Add extra priv_flag support in netdevice Subject: [PATCH 181/500] net: Add extra priv_flag support in netdevice
This patch adds a flag in struct net_device which This patch adds a flag in struct net_device which
is an extension to priv_flags and is used to is an extension to priv_flags and is used to
@@ -37,14 +37,14 @@ Signed-off-by: Suruchi Agarwal <quic_suruchia@quicinc.com>
Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com> Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
--- ---
drivers/net/ifb.c | 1 + drivers/net/ifb.c | 1 +
include/linux/netdevice.h | 36 ++++++++++++++++++++++++++++++++++-- include/linux/netdevice.h | 35 ++++++++++++++++++++++++++++++++++-
net/ipv4/ip_gre.c | 2 +- net/ipv4/ip_gre.c | 2 +-
net/ipv6/ip6_gre.c | 4 +--- net/ipv6/ip6_gre.c | 4 +---
4 files changed, 37 insertions(+), 6 deletions(-) 4 files changed, 37 insertions(+), 5 deletions(-)
--- a/drivers/net/ifb.c --- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c +++ b/drivers/net/ifb.c
@@ -326,6 +326,7 @@ static void ifb_setup(struct net_device @@ -351,6 +351,7 @@ static void ifb_setup(struct net_device
dev->flags |= IFF_NOARP; dev->flags |= IFF_NOARP;
dev->flags &= ~IFF_MULTICAST; dev->flags &= ~IFF_MULTICAST;
dev->priv_flags &= ~IFF_TX_SKB_SHARING; dev->priv_flags &= ~IFF_TX_SKB_SHARING;
@@ -104,7 +104,15 @@ Signed-off-by: Murat Sezgin <quic_msezgin@quicinc.com>
const struct net_device_ops *netdev_ops; const struct net_device_ops *netdev_ops;
const struct xdp_metadata_ops *xdp_metadata_ops; const struct xdp_metadata_ops *xdp_metadata_ops;
int ifindex; int ifindex;
@@ -5247,6 +5276,11 @@ static inline bool netif_is_failover_sla @@ -4306,7 +4335,6 @@ static inline bool netif_dormant(const s
return test_bit(__LINK_STATE_DORMANT, &dev->state);
}
-
/**
* netif_testing_on - mark device as under test.
* @dev: network device
@@ -5258,6 +5286,11 @@ static inline bool netif_is_failover_sla
return dev->priv_flags & IFF_FAILOVER_SLAVE; return dev->priv_flags & IFF_FAILOVER_SLAVE;
} }

View File

@@ -1,7 +1,7 @@
From 8e6a2101624053c79ea39fe4aed435a3bd5a6f3f Mon Sep 17 00:00:00 2001 From cb26188380781e99501632228bd8c74710c49884 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Fri, 24 Apr 2020 10:59:16 -0700 Date: Fri, 24 Apr 2020 10:59:16 -0700
Subject: [PATCH 233/281] net: Export dev_shutdown() Subject: [PATCH 182/500] net: Export dev_shutdown()
This API is needed by interface drivers to ensure qdiscs are destroyed This API is needed by interface drivers to ensure qdiscs are destroyed
before the NSS interfaces are destroyed. Since Linux destroys qdiscs before the NSS interfaces are destroyed. Since Linux destroys qdiscs
@@ -16,7 +16,7 @@ Signed-off-by: Shyam Sunder <ssunde@codeaurora.org>
--- a/net/sched/sch_generic.c --- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c
@@ -1494,6 +1494,7 @@ void dev_shutdown(struct net_device *dev @@ -1495,6 +1495,7 @@ void dev_shutdown(struct net_device *dev
WARN_ON(timer_pending(&dev->watchdog_timer)); WARN_ON(timer_pending(&dev->watchdog_timer));
} }

View File

@@ -1,7 +1,7 @@
From bbe88f4bc0087f25eb2608f9112d480ce92b33a5 Mon Sep 17 00:00:00 2001 From 7a12e1c963727e2988cc80a2cd91160d4db78ffa Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Wed, 11 Mar 2020 11:58:55 -0700 Date: Wed, 11 Mar 2020 11:58:55 -0700
Subject: [PATCH 226/281] net: patch linux kernel to support shortcut-fe Subject: [PATCH 245/500] net: patch linux kernel to support shortcut-fe
1, add a new flag 'fast_forwarded' in skb structure. 1, add a new flag 'fast_forwarded' in skb structure.
2, put a hook in '__netif_receive_skb_core' to 2, put a hook in '__netif_receive_skb_core' to
@@ -16,10 +16,10 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h +++ b/include/linux/skbuff.h
@@ -984,6 +984,8 @@ struct sk_buff { @@ -991,6 +991,8 @@ struct sk_buff {
#if IS_ENABLED(CONFIG_IP_SCTP)
__u8 csum_not_inet:1;
#endif #endif
/* Linear packets processed by dev_fast_xmit() */
__u8 fast_xmit:1;
+ __u8 fast_forwarded:1; + __u8 fast_forwarded:1;
+ /* 1 or 3 bit hole */ + /* 1 or 3 bit hole */
@@ -27,7 +27,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
__u16 tc_index; /* traffic control index */ __u16 tc_index; /* traffic control index */
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -3625,8 +3625,13 @@ static int xmit_one(struct sk_buff *skb, @@ -3626,8 +3626,13 @@ static int xmit_one(struct sk_buff *skb,
unsigned int len; unsigned int len;
int rc; int rc;
@@ -43,7 +43,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
#ifdef CONFIG_ETHERNET_PACKET_MANGLE #ifdef CONFIG_ETHERNET_PACKET_MANGLE
if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb))) if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb)))
@@ -5396,6 +5401,9 @@ void netdev_rx_handler_unregister(struct @@ -5480,6 +5485,9 @@ void netdev_rx_handler_unregister(struct
} }
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
@@ -53,7 +53,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
/* /*
* Limit the use of PFMEMALLOC reserves to those protocols that implement * Limit the use of PFMEMALLOC reserves to those protocols that implement
* the special handling of PFMEMALLOC skbs. * the special handling of PFMEMALLOC skbs.
@@ -5443,6 +5451,7 @@ static int __netif_receive_skb_core(stru @@ -5527,6 +5535,7 @@ static int __netif_receive_skb_core(stru
bool deliver_exact = false; bool deliver_exact = false;
int ret = NET_RX_DROP; int ret = NET_RX_DROP;
__be16 type; __be16 type;
@@ -61,7 +61,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb); net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb);
@@ -5481,6 +5490,14 @@ another_round: @@ -5565,6 +5574,14 @@ another_round:
goto out; goto out;
} }

View File

@@ -17,7 +17,7 @@ Signed-off-by: John Sanli <quic_jsanli@quicinc.com>
--- a/net/ipv6/ip6_tunnel.c --- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c
@@ -1562,17 +1562,19 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str @@ -1540,17 +1540,19 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield); dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);

View File

@@ -1,7 +1,7 @@
From 8632dd2d78d1935c3eab058017eab4f2d1702ecc Mon Sep 17 00:00:00 2001 From 7e55d330bd4736543b74f82d17ceeab9cc482980 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Fri, 24 Apr 2020 10:58:42 -0700 Date: Fri, 24 Apr 2020 10:58:42 -0700
Subject: [PATCH 228/281] inet: vlan: Added an API to return next VLAN device Subject: [PATCH 090/500] inet: vlan: Added an API to return next VLAN device
The new API returns the next dev when a VLAN dev passed The new API returns the next dev when a VLAN dev passed
in parameter i.e. in parameter i.e.
@@ -18,9 +18,9 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
--- a/include/linux/if_vlan.h --- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h
@@ -147,6 +147,7 @@ extern void __vlan_dev_update_accel_stat @@ -144,6 +144,7 @@ extern int vlan_for_each(struct net_devi
struct rtnl_link_stats64 *stats); int (*action)(struct net_device *dev, int vid,
void *arg), void *arg);
extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
+extern struct net_device *vlan_dev_next_dev(const struct net_device *dev); +extern struct net_device *vlan_dev_next_dev(const struct net_device *dev);
extern u16 vlan_dev_vlan_id(const struct net_device *dev); extern u16 vlan_dev_vlan_id(const struct net_device *dev);
@@ -28,7 +28,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
--- a/net/8021q/vlan_core.c --- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c
@@ -130,6 +130,13 @@ struct net_device *vlan_dev_real_dev(con @@ -110,6 +110,13 @@ struct net_device *vlan_dev_real_dev(con
} }
EXPORT_SYMBOL(vlan_dev_real_dev); EXPORT_SYMBOL(vlan_dev_real_dev);

View File

@@ -1,7 +1,7 @@
From 3fda44006f8cbca0670305f6543c223f8e6a0243 Mon Sep 17 00:00:00 2001 From 02d4a6aaa370c93878fc21ad812f219529759c3d Mon Sep 17 00:00:00 2001
From: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com> From: Sachin Kohli <quic_sachkohl@quicinc.com>
Date: Thu, 1 Jun 2023 17:23:35 +0530 Date: Tue, 19 Dec 2023 10:15:33 +0530
Subject: [PATCH] net: vxlan: Adding APIs to VxLAN driver. Subject: [PATCH 206/500] net: vxlan: Adding APIs to VxLAN driver.
Adding new APIs to verify VxLAN netdevice and Adding new APIs to verify VxLAN netdevice and
update mac entries in VxLAN's fdb. update mac entries in VxLAN's fdb.

View File

@@ -0,0 +1,69 @@
From c8f7549b4a1d08cc6a894a39c31eab8fcaf9cfdd Mon Sep 17 00:00:00 2001
From: Subhash Kumar Katnapally <quic_skatnapa@quicinc.com>
Date: Mon, 10 Jul 2023 18:43:50 +0530
Subject: [PATCH 247/500] net: tc filter/taps support for sfe path
Added sysctl to toggle filter support in sfe path.
Change-Id: I724a96283a7e3436c98505e2da94bf84bc05d5b8
Signed-off-by: Subhash Kumar Katnapally <quic_skatnapa@quicinc.com>
---
net/core/dev.c | 33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2128,6 +2128,9 @@ static int call_netdevice_notifiers_mtu(
return call_netdevice_notifiers_info(val, &info.info);
}
+bool fast_tc_filter = false;
+EXPORT_SYMBOL_GPL(fast_tc_filter);
+
#ifdef CONFIG_NET_INGRESS
static DEFINE_STATIC_KEY_FALSE(ingress_needed_key);
@@ -5574,11 +5577,13 @@ another_round:
goto out;
}
- fast_recv = rcu_dereference(athrs_fast_nat_recv);
- if (fast_recv) {
- if (fast_recv(skb)) {
- ret = NET_RX_SUCCESS;
- goto out;
+ if (likely(!fast_tc_filter)) {
+ fast_recv = rcu_dereference(athrs_fast_nat_recv);
+ if (fast_recv) {
+ if (fast_recv(skb)) {
+ ret = NET_RX_SUCCESS;
+ goto out;
+ }
}
}
@@ -5634,6 +5639,24 @@ skip_classify:
goto out;
}
+ if (unlikely(!fast_tc_filter)) {
+ goto skip_fast_recv;
+ }
+
+ fast_recv = rcu_dereference(athrs_fast_nat_recv);
+ if (fast_recv) {
+ if (pt_prev) {
+ ret = deliver_skb(skb, pt_prev, orig_dev);
+ pt_prev = NULL;
+ }
+
+ if (fast_recv(skb)) {
+ ret = NET_RX_SUCCESS;
+ goto out;
+ }
+ }
+skip_fast_recv:
+
rx_handler = rcu_dereference(skb->dev->rx_handler);
if (rx_handler) {
if (pt_prev) {

View File

@@ -1,7 +1,7 @@
From 14b84b541426e1237e33aced57d08a25d1885098 Mon Sep 17 00:00:00 2001 From 8a24a1c2c3cfbf93d661cfb50468b4a9a5a74254 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Tue, 27 Jan 2015 18:06:30 +0000 Date: Tue, 27 Jan 2015 18:06:30 +0000
Subject: [PATCH 222/281] vlan: Add vlan stats update function Subject: [PATCH 091/500] vlan: Add vlan stats update function
Change-Id: Ib1165b37f29d48e5dbcee2c709b2f873dfb3e34d Change-Id: Ib1165b37f29d48e5dbcee2c709b2f873dfb3e34d
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org> Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
@@ -20,9 +20,9 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
+ struct rtnl_link_stats64 *stats); + struct rtnl_link_stats64 *stats);
+ +
extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
extern struct net_device *vlan_dev_next_dev(const struct net_device *dev);
extern u16 vlan_dev_vlan_id(const struct net_device *dev); extern u16 vlan_dev_vlan_id(const struct net_device *dev);
extern __be16 vlan_dev_vlan_proto(const struct net_device *dev); @@ -237,6 +240,12 @@ extern void vlan_vids_del_by_dev(struct
@@ -236,6 +239,12 @@ extern void vlan_vids_del_by_dev(struct
extern bool vlan_uses_dev(const struct net_device *dev); extern bool vlan_uses_dev(const struct net_device *dev);
#else #else

View File

@@ -1,7 +1,7 @@
From 5f63a10caee09a5cec9a0da7f6b9cde39decf0c7 Mon Sep 17 00:00:00 2001 From 9e984fe0cbc5e1ec616f52f1964cc0b4e158138a Mon Sep 17 00:00:00 2001
From: Murat Sezgin <quic_msezgin@quicinc.com> From: Murat Sezgin <quic_msezgin@quicinc.com>
Date: Thu, 11 May 2023 11:54:05 -0700 Date: Thu, 11 May 2023 11:54:05 -0700
Subject: [PATCH 269/281] net: Add DSCP remarking feature for HW acceleration. Subject: [PATCH 352/500] net: Add DSCP remarking feature for HW acceleration.
DSCP remarking is an advanced QoS feature of acceleration DSCP remarking is an advanced QoS feature of acceleration
engine. With this feature it is possible to set the accelerated engine. With this feature it is possible to set the accelerated

View File

@@ -1,7 +1,8 @@
From 691195eec4f741a2e73accae97092cf0a0203a54 Mon Sep 17 00:00:00 2001 From d7d651481155a9225f5a5a0482631950e8fb6d69 Mon Sep 17 00:00:00 2001
From: Ratheesh Kannoth <rkannoth@codeaurora.org> From: Ratheesh Kannoth <rkannoth@codeaurora.org>
Date: Fri, 15 May 2020 12:36:11 +0530 Date: Fri, 15 May 2020 12:36:11 +0530
Subject: [PATCH] net/bonding: Added acceleration support over LAG interface Subject: [PATCH 311/500] net/bonding: Added acceleration support over LAG
interface
The accel support is enabled for the following LAG modes, The accel support is enabled for the following LAG modes,
1. Balance-Xor (Static LAG) 1. Balance-Xor (Static LAG)
@@ -29,6 +30,7 @@ functions in kernel header file instead of uapi header file.
Change-Id: I1b33f07015b79ec4ac702a9079da01f1c2a08bbb Change-Id: I1b33f07015b79ec4ac702a9079da01f1c2a08bbb
Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org> Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
Signed-off-by: Pavithra R <quic_pavir@quicinc.com>
--- ---
drivers/net/bonding/bond_3ad.c | 160 ++++++++++++++++- drivers/net/bonding/bond_3ad.c | 160 ++++++++++++++++-
drivers/net/bonding/bond_main.c | 306 ++++++++++++++++++++++++++++++-- drivers/net/bonding/bond_main.c | 306 ++++++++++++++++++++++++++++++--
@@ -77,7 +79,15 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
/* ================= api to bonding and kernel code ================== */ /* ================= api to bonding and kernel code ================== */
@@ -1073,6 +1105,28 @@ static void ad_mux_machine(struct port * @@ -430,7 +462,6 @@ static u16 __ad_timer_to_ticks(u16 timer
return retval;
}
-
/* ================= ad_rx_machine helper functions ================== */
/**
@@ -1073,6 +1104,28 @@ static void ad_mux_machine(struct port *
ad_disable_collecting_distributing(port, ad_disable_collecting_distributing(port,
update_slave_arr); update_slave_arr);
port->ntt = true; port->ntt = true;
@@ -106,7 +116,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
break; break;
case AD_MUX_COLLECTING_DISTRIBUTING: case AD_MUX_COLLECTING_DISTRIBUTING:
port->actor_oper_port_state |= LACP_STATE_COLLECTING; port->actor_oper_port_state |= LACP_STATE_COLLECTING;
@@ -1917,6 +1971,7 @@ static void ad_enable_collecting_distrib @@ -1917,6 +1970,7 @@ static void ad_enable_collecting_distrib
bool *update_slave_arr) bool *update_slave_arr)
{ {
if (port->aggregator->is_active) { if (port->aggregator->is_active) {
@@ -114,7 +124,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
slave_dbg(port->slave->bond->dev, port->slave->dev, slave_dbg(port->slave->bond->dev, port->slave->dev,
"Enabling port %d (LAG %d)\n", "Enabling port %d (LAG %d)\n",
port->actor_port_number, port->actor_port_number,
@@ -1924,6 +1979,14 @@ static void ad_enable_collecting_distrib @@ -1924,6 +1978,14 @@ static void ad_enable_collecting_distrib
__enable_port(port); __enable_port(port);
/* Slave array needs update */ /* Slave array needs update */
*update_slave_arr = true; *update_slave_arr = true;
@@ -129,7 +139,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
} }
} }
@@ -2683,6 +2746,102 @@ int bond_3ad_get_active_agg_info(struct @@ -2683,6 +2745,102 @@ int bond_3ad_get_active_agg_info(struct
return ret; return ret;
} }
@@ -379,7 +389,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
bond_set_carrier(bond); bond_set_carrier(bond);
} }
@@ -4100,7 +4164,216 @@ static inline u32 bond_eth_hash(struct s @@ -4100,11 +4164,221 @@ static inline u32 bond_eth_hash(struct s
return 0; return 0;
ep = (struct ethhdr *)(data + mhoff); ep = (struct ethhdr *)(data + mhoff);
@@ -597,7 +607,12 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
} }
static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *data, static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *data,
@@ -5230,15 +5503,16 @@ static netdev_tx_t bond_3ad_xor_xmit(str int hlen, __be16 l2_proto, int *nhoff, int *ip_proto, bool l34)
+
{
const struct ipv6hdr *iph6;
const struct iphdr *iph;
@@ -5230,15 +5504,16 @@ static netdev_tx_t bond_3ad_xor_xmit(str
struct net_device *dev) struct net_device *dev)
{ {
struct bonding *bond = netdev_priv(dev); struct bonding *bond = netdev_priv(dev);
@@ -621,7 +636,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
} }
/* in broadcast mode, we send everything to all usable interfaces. */ /* in broadcast mode, we send everything to all usable interfaces. */
@@ -5488,8 +5762,9 @@ static netdev_tx_t __bond_start_xmit(str @@ -5488,8 +5763,9 @@ static netdev_tx_t __bond_start_xmit(str
return bond_xmit_roundrobin(skb, dev); return bond_xmit_roundrobin(skb, dev);
case BOND_MODE_ACTIVEBACKUP: case BOND_MODE_ACTIVEBACKUP:
return bond_xmit_activebackup(skb, dev); return bond_xmit_activebackup(skb, dev);
@@ -632,7 +647,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
return bond_3ad_xor_xmit(skb, dev); return bond_3ad_xor_xmit(skb, dev);
case BOND_MODE_BROADCAST: case BOND_MODE_BROADCAST:
return bond_xmit_broadcast(skb, dev); return bond_xmit_broadcast(skb, dev);
@@ -5926,6 +6201,9 @@ static void bond_destructor(struct net_d @@ -5926,6 +6202,9 @@ static void bond_destructor(struct net_d
if (bond->wq) if (bond->wq)
destroy_workqueue(bond->wq); destroy_workqueue(bond->wq);
@@ -642,7 +657,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
free_percpu(bond->rr_tx_counter); free_percpu(bond->rr_tx_counter);
} }
@@ -6479,6 +6757,11 @@ int bond_create(struct net *net, const c @@ -6479,6 +6758,11 @@ int bond_create(struct net *net, const c
bond_work_init_all(bond); bond_work_init_all(bond);
@@ -656,7 +671,7 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
return res; return res;
--- a/include/net/bond_3ad.h --- a/include/net/bond_3ad.h
+++ b/include/net/bond_3ad.h +++ b/include/net/bond_3ad.h
@@ -302,6 +302,12 @@ int bond_3ad_lacpdu_recv(const struct sk @@ -302,8 +302,13 @@ int bond_3ad_lacpdu_recv(const struct sk
struct slave *slave); struct slave *slave);
int bond_3ad_set_carrier(struct bonding *bond); int bond_3ad_set_carrier(struct bonding *bond);
void bond_3ad_update_lacp_rate(struct bonding *bond); void bond_3ad_update_lacp_rate(struct bonding *bond);
@@ -669,6 +684,8 @@ Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
void bond_3ad_update_ad_actor_settings(struct bonding *bond); void bond_3ad_update_ad_actor_settings(struct bonding *bond);
int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats); int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats);
size_t bond_3ad_stats_size(void); size_t bond_3ad_stats_size(void);
#endif /* _NET_BOND_3AD_H */
-
--- a/include/net/bonding.h --- a/include/net/bonding.h
+++ b/include/net/bonding.h +++ b/include/net/bonding.h
@@ -90,6 +90,8 @@ @@ -90,6 +90,8 @@

View File

@@ -1,7 +1,7 @@
From 8daa619cff9acc2be5c0161019cd33e486171047 Mon Sep 17 00:00:00 2001 From 0d05596ba18a44aca87082b75989bb4114f896d8 Mon Sep 17 00:00:00 2001
From: Murat Sezgin <msezgin@codeaurora.org> From: Murat Sezgin <msezgin@codeaurora.org>
Date: Tue, 18 Apr 2017 15:48:01 -0700 Date: Tue, 18 Apr 2017 15:48:01 -0700
Subject: [PATCH 270/281] net: conntrack events, support multiple registrant Subject: [PATCH 353/500] net: conntrack events, support multiple registrant
Change-Id: Iebfb254590fb594f5baf232f849d1b7ae45ef757 Change-Id: Iebfb254590fb594f5baf232f849d1b7ae45ef757
Signed-off-by: Zhi Chen <zhichen@codeaurora.org> Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
@@ -88,7 +88,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
if (e == NULL) if (e == NULL)
--- a/include/net/netns/conntrack.h --- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h
@@ -104,6 +104,9 @@ struct netns_ct { @@ -105,6 +105,9 @@ struct netns_ct {
u8 sysctl_checksum; u8 sysctl_checksum;
struct ip_conntrack_stat __percpu *stat; struct ip_conntrack_stat __percpu *stat;
@@ -225,7 +225,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
void nf_conntrack_register_notifier(struct net *net, void nf_conntrack_register_notifier(struct net *net,
const struct nf_ct_event_notifier *new) const struct nf_ct_event_notifier *new)
{ {
@@ -270,8 +328,16 @@ void nf_conntrack_register_notifier(stru @@ -269,8 +327,16 @@ void nf_conntrack_register_notifier(stru
rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new); rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new);
mutex_unlock(&nf_ct_ecache_mutex); mutex_unlock(&nf_ct_ecache_mutex);
} }
@@ -242,7 +242,7 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
void nf_conntrack_unregister_notifier(struct net *net) void nf_conntrack_unregister_notifier(struct net *net)
{ {
mutex_lock(&nf_ct_ecache_mutex); mutex_lock(&nf_ct_ecache_mutex);
@@ -279,6 +345,7 @@ void nf_conntrack_unregister_notifier(st @@ -278,6 +344,7 @@ void nf_conntrack_unregister_notifier(st
mutex_unlock(&nf_ct_ecache_mutex); mutex_unlock(&nf_ct_ecache_mutex);
/* synchronize_rcu() is called after netns pre_exit */ /* synchronize_rcu() is called after netns pre_exit */
} }

View File

@@ -0,0 +1,79 @@
From 5fcf20d94d49ec2b8a0fae1b2119e3fae91c4fdc Mon Sep 17 00:00:00 2001
From: Ratheesh Kannoth <quic_rkannoth@quicinc.com>
Date: Fri, 17 Dec 2021 19:17:58 +0530
Subject: [PATCH 356/500] net: Move skb_vlan_untag(skb) after sfe hook
Change-Id: I5a019761f363dd81bf5e52eea606b9076f22e6af
Signed-off-by: Ratheesh Kannoth <quic_rkannoth@quicinc.com>
---
net/core/dev.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -558,7 +558,6 @@ static inline void netdev_set_addr_lockd
*
*******************************************************************************/
-
/*
* Add a protocol ID to the list. Now that the input handler is
* smarter we can dispense with all the messy stuff that used to be
@@ -660,7 +659,6 @@ void dev_remove_pack(struct packet_type
}
EXPORT_SYMBOL(dev_remove_pack);
-
/*******************************************************************************
*
* Device Interface Subroutines
@@ -1670,7 +1668,6 @@ void dev_close(struct net_device *dev)
}
EXPORT_SYMBOL(dev_close);
-
/**
* dev_disable_lro - disable Large Receive Offload on a device
* @dev: device
@@ -3259,7 +3256,6 @@ void dev_kfree_skb_any_reason(struct sk_
}
EXPORT_SYMBOL(dev_kfree_skb_any_reason);
-
/**
* netif_device_detach - mark device as removed
* @dev: network device
@@ -5571,12 +5567,6 @@ another_round:
}
}
- if (eth_type_vlan(skb->protocol)) {
- skb = skb_vlan_untag(skb);
- if (unlikely(!skb))
- goto out;
- }
-
if (likely(!fast_tc_filter)) {
fast_recv = rcu_dereference(athrs_fast_nat_recv);
if (fast_recv) {
@@ -5587,6 +5577,12 @@ another_round:
}
}
+ if (eth_type_vlan(skb->protocol)) {
+ skb = skb_vlan_untag(skb);
+ if (unlikely(!skb))
+ goto out;
+ }
+
if (skb_skip_tc_classify(skb))
goto skip_classify;
@@ -8583,7 +8579,6 @@ void *netdev_lower_dev_get_private(struc
}
EXPORT_SYMBOL(netdev_lower_dev_get_private);
-
/**
* netdev_lower_state_changed - Dispatch event about lower device state change
* @lower_dev: device

View File

@@ -67,7 +67,7 @@ Signed-off-by: Swati Singh <quic_swasing@quicinc.com>
__be16 proto) __be16 proto)
--- a/net/ipv6/ip6_tunnel.c --- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c
@@ -2469,6 +2469,26 @@ struct net *ip6_tnl_get_link_net(const s @@ -2424,6 +2424,26 @@ struct net *ip6_tnl_get_link_net(const s
} }
EXPORT_SYMBOL(ip6_tnl_get_link_net); EXPORT_SYMBOL(ip6_tnl_get_link_net);

View File

@@ -12,7 +12,22 @@ Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
Signed-off-by: John Sanli <quic_jsanli@quicinc.com> Signed-off-by: John Sanli <quic_jsanli@quicinc.com>
Signed-off-by: Pavithra R <quic_pavir@quicinc.com> Signed-off-by: Pavithra R <quic_pavir@quicinc.com>
--- ---
net/ipv4/ip_tunnel_core.c | 2 +-
net/ipv6/ip6_tunnel.c | 24 +++++++++++++++++++++++-
net/ipv6/sit.c | 18 ++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -61,7 +61,7 @@ void iptunnel_xmit(struct sock *sk, stru
int skb_iif;
/* Save input interface index */
- skb_iif = skb->skb_iif;
+ skb_iif = skb->skb_iif;
skb_scrub_packet(skb, xnet);
--- a/net/ipv6/ip6_tunnel.c --- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c
@@ -100,6 +100,23 @@ static inline int ip6_tnl_mpls_supported @@ -100,6 +100,23 @@ static inline int ip6_tnl_mpls_supported

View File

@@ -1,8 +1,8 @@
From 96ab6b43388743ebc70a0b40290f6f5655e3c33f Mon Sep 17 00:00:00 2001 From d07039264a75c131e627d5f2f13cf286efb63e42 Mon Sep 17 00:00:00 2001
From: Suman Ghosh <sumaghos@codeaurora.org> From: Suman Ghosh <sumaghos@codeaurora.org>
Date: Thu, 10 Dec 2020 00:11:41 +0530 Date: Thu, 10 Dec 2020 00:11:41 +0530
Subject: [PATCH] net: macvlan: Add statistics update function for macvlan net Subject: [PATCH 412/500] net: macvlan: Add statistics update function for
device. macvlan net device.
Signed-off-by: Suman Ghosh <sumaghos@codeaurora.org> Signed-off-by: Suman Ghosh <sumaghos@codeaurora.org>
Change-Id: I9cd995f9d1c0f85c61781a8af845b4dbb86bebd0 Change-Id: I9cd995f9d1c0f85c61781a8af845b4dbb86bebd0

View File

@@ -1,39 +0,0 @@
From af7d2a61b63bdb996746d38288842624e662a447 Mon Sep 17 00:00:00 2001
From: Ratheesh Kannoth <quic_rkannoth@quicinc.com>
Date: Fri, 17 Dec 2021 19:17:58 +0530
Subject: [PATCH 261/281] net: Move skb_vlan_untag(skb) after sfe hook
Change-Id: I5a019761f363dd81bf5e52eea606b9076f22e6af
Signed-off-by: Ratheesh Kannoth <quic_rkannoth@quicinc.com>
---
net/core/dev.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5486,12 +5486,6 @@ another_round:
}
}
- if (eth_type_vlan(skb->protocol)) {
- skb = skb_vlan_untag(skb);
- if (unlikely(!skb))
- goto out;
- }
-
fast_recv = rcu_dereference(athrs_fast_nat_recv);
if (fast_recv) {
if (fast_recv(skb)) {
@@ -5500,6 +5494,12 @@ another_round:
}
}
+ if (eth_type_vlan(skb->protocol)) {
+ skb = skb_vlan_untag(skb);
+ if (unlikely(!skb))
+ goto out;
+ }
+
if (skb_skip_tc_classify(skb))
goto skip_classify;

View File

@@ -1,173 +0,0 @@
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(+)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -990,6 +990,8 @@ struct sk_buff {
__u8 csum_not_inet:1;
#endif
__u8 fast_forwarded:1;
+ /* Linear packets processed by dev_fast_xmit() */
+ __u8 fast_xmit:1;
/* 1 or 3 bit hole */
#if defined(CONFIG_NET_SCHED) || defined(CONFIG_NET_XGRESS)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4336,6 +4336,144 @@ struct netdev_queue *netdev_core_pick_tx
}
/**
+ * dev_fast_xmit_vp - fast xmit the skb to a PPE virtual port
+ * @skb:buffer to transmit
+ * @dev: the device to be transmited to
+ * sucessful return true
+ * failed return false
+ */
+bool dev_fast_xmit_vp(struct sk_buff *skb,
+ struct net_device *dev)
+{
+ struct netdev_queue *txq;
+ int cpu;
+ netdev_tx_t rc;
+
+ if (unlikely(!(dev->flags & IFF_UP))) {
+ return false;
+ }
+
+ if (unlikely(skb_is_nonlinear(skb))) {
+ return false;
+ }
+
+ rcu_read_lock_bh();
+ cpu = smp_processor_id();
+
+ /*
+ * TODO: Skip this altogether and eventually move this call to ppe_vp
+ * this would avoid multiple function calls when giving packet to wifi VAP.
+ */
+ txq = netdev_core_pick_tx(dev, skb, NULL);
+
+ if (likely(txq->xmit_lock_owner != cpu)) {
+#define FAST_VP_HARD_TX_LOCK(txq, cpu) { \
+ __netif_tx_lock(txq, cpu); \
+}
+
+#define FAST_VP_HARD_TX_UNLOCK(txq) { \
+ __netif_tx_unlock(txq); \
+}
+ skb->fast_xmit = 1;
+ FAST_VP_HARD_TX_LOCK(txq, cpu);
+ if (likely(!netif_xmit_stopped(txq))) {
+ rc = netdev_start_xmit(skb, dev, txq, 0);
+ if (unlikely(!dev_xmit_complete(rc))) {
+ FAST_VP_HARD_TX_UNLOCK(txq);
+ goto q_xmit;
+ }
+ FAST_VP_HARD_TX_UNLOCK(txq);
+ rcu_read_unlock_bh();
+ return true;
+ }
+ FAST_VP_HARD_TX_UNLOCK(txq);
+ }
+q_xmit:
+ skb->fast_xmit = 0;
+ rcu_read_unlock_bh();
+ return false;
+}
+EXPORT_SYMBOL(dev_fast_xmit_vp);
+
+/**
+ * dev_fast_xmit - fast xmit the skb
+ * @skb:buffer to transmit
+ * @dev: the device to be transmited to
+ * @features: the skb features could bed used
+ * sucessful return true
+ * failed return false
+ */
+bool dev_fast_xmit(struct sk_buff *skb,
+ struct net_device *dev,
+ netdev_features_t features)
+{
+ struct netdev_queue *txq;
+ 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;
+ }
+
+ if (unlikely(skb_needs_linearize(skb, features))) {
+ return false;
+ }
+
+ rcu_read_lock_bh();
+ cpu = smp_processor_id();
+
+ /* If device don't need the dst, release it now, otherwise make sure
+ * the refcount increased.
+ */
+ if (likely(dev->priv_flags & IFF_XMIT_DST_RELEASE)) {
+ skb_dst_drop(skb);
+ } else {
+ skb_dst_force(skb);
+ }
+
+ txq = netdev_core_pick_tx(dev, skb, NULL);
+
+ if (likely(txq->xmit_lock_owner != cpu)) {
+#define FAST_HARD_TX_LOCK(features, txq, cpu) { \
+ if ((features & NETIF_F_LLTX) == 0) { \
+ __netif_tx_lock(txq, cpu); \
+ } else { \
+ __netif_tx_acquire(txq); \
+ } \
+}
+
+#define FAST_HARD_TX_UNLOCK(features, txq) { \
+ if ((features & NETIF_F_LLTX) == 0) { \
+ __netif_tx_unlock(txq); \
+ } else { \
+ __netif_tx_release(txq); \
+ } \
+}
+ netdev_features_t dev_features = dev->features;
+ FAST_HARD_TX_LOCK(dev_features, txq, cpu);
+ if (likely(!netif_xmit_stopped(txq))) {
+ rc = netdev_start_xmit(skb, dev, txq, 0);
+ if (unlikely(!dev_xmit_complete(rc))) {
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ goto fail;
+ }
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ rcu_read_unlock_bh();
+ return true;
+ }
+ FAST_HARD_TX_UNLOCK(dev_features, txq);
+ }
+fail:
+ rcu_read_unlock_bh();
+ return false;
+}
+EXPORT_SYMBOL(dev_fast_xmit);
+
+/**
* __dev_queue_xmit() - transmit a buffer
* @skb: buffer to transmit
* @sb_dev: suboordinate device used for L2 forwarding offload

View File

@@ -1,3 +1,19 @@
From b98da2135d8a0fdbcae37c842a318800c64abe4a Mon Sep 17 00:00:00 2001
From: Shivani Soni <quic_soni@quicinc.com>
Date: Wed, 27 Dec 2023 13:03:26 +0530
Subject: [PATCH] arm/arm64: enable hairpin for WLAN netdevices only.
enable hairpin for the WLAN netdevices.
For ethernet interfaces, hairpin not allowed
due to issues with switchdevs.
Change-Id: I72bcecfe52b2eac34bbb0d98249806bd8a82bf14
Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
Signed-off-by: Karthik T S <quic_kartikts@quicinc.com>
---
net/bridge/br_forward.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
--- a/net/bridge/br_forward.c --- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c
@@ -24,11 +24,29 @@ static inline int should_deliver(const s @@ -24,11 +24,29 @@ static inline int should_deliver(const s

View File

@@ -1,4 +1,4 @@
From d34da78089af855bf1406cea24342b0cc4c8225d Mon Sep 17 00:00:00 2001 From 05ab5d62b66de6e131f71de08254dd84ef41f8c2 Mon Sep 17 00:00:00 2001
From: Ken Zhu <quic_guigenz@quicinc.com> From: Ken Zhu <quic_guigenz@quicinc.com>
Date: Thu, 4 Apr 2024 16:01:38 -0700 Date: Thu, 4 Apr 2024 16:01:38 -0700
Subject: [PATCH] [net] [bridge] Allow unicast loop back when hairpin enabled Subject: [PATCH] [net] [bridge] Allow unicast loop back when hairpin enabled