blob: fbb84100113cfb215d7c18440eb3c4194818f8de [file] [log] [blame]
developer5d148cb2023-06-02 13:08:11 +08001From bc06d56dc89af9d13d3b993dae0de46e76dfc3a7 Mon Sep 17 00:00:00 2001
2From: Sam Shih <sam.shih@mediatek.com>
3Date: Fri, 2 Jun 2023 13:06:28 +0800
4Subject: [PATCH] [networking][999-2705-hwnat_Kconfig_Makefile.patch]
5
6---
7 net/Kconfig | 12 ++++++++++++
8 net/Makefile | 3 +++
9 2 files changed, 15 insertions(+)
10
11diff --git a/net/Kconfig b/net/Kconfig
12index 46d9b3827..123e4bc28 100644
13--- a/net/Kconfig
14+++ b/net/Kconfig
15@@ -460,6 +460,18 @@ config FAILOVER
developerfd40db22021-04-29 10:08:25 +080016 migration of VMs with direct attached VFs by failing over to the
17 paravirtual datapath when the VF is unplugged.
18
19+config HW_NAT
20+ bool "HW NAT support"
21+ default n
22+ ---help---
23+ This feature provides a fast path to support network lan/wan nat.
24+ If you need hw_nat engine to reduce cpu loading, please say Y.
25+
26+ Note that the answer to this question doesn't directly affect the
27+ kernel: saying N will just cause the configurator to skip all
28+ the questions about Mediatek Ethernet devices. If you say Y,
29+ you will be asked for your specific card in the following questions.
30+
31 endif # if NET
32
33 # Used by archs to tell that they support BPF JIT compiler plus which flavour.
developer5d148cb2023-06-02 13:08:11 +080034diff --git a/net/Makefile b/net/Makefile
35index 9603e98f0..673f0a664 100644
36--- a/net/Makefile
37+++ b/net/Makefile
38@@ -62,6 +62,9 @@ endif
developerfd40db22021-04-29 10:08:25 +080039 obj-$(CONFIG_6LOWPAN) += 6lowpan/
40 obj-$(CONFIG_IEEE802154) += ieee802154/
41 obj-$(CONFIG_MAC802154) += mac802154/
42+ifeq ($(CONFIG_HW_NAT),y)
43+obj-y += nat/foe_hook/
44+endif
45
46 ifeq ($(CONFIG_NET),y)
47 obj-$(CONFIG_SYSCTL) += sysctl_net.o
developer5d148cb2023-06-02 13:08:11 +080048--
492.34.1
50