[U-Boot] [PATCH 1/2] net: Convert CONFIG_IP_DEFRAG to Kconfig

Marek Vasut marek.vasut at gmail.com
Tue Jun 11 02:51:14 UTC 2019


Convert CONFIG_IP_DEFRAG to Kconfig, update defconfigs, headers
and whitelist. This patch is a follow-up on a patch by Christian
Gmeiner with the added config/header/whitelist updates.

Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Reported-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
---
 configs/apalis-tk1_defconfig         | 1 +
 configs/apalis_imx6_defconfig        | 1 +
 configs/apalis_t30_defconfig         | 1 +
 configs/colibri-imx6ull_defconfig    | 1 +
 configs/colibri_imx6_defconfig       | 1 +
 configs/colibri_imx7_defconfig       | 1 +
 configs/colibri_imx7_emmc_defconfig  | 1 +
 configs/colibri_t20_defconfig        | 1 +
 configs/colibri_t30_defconfig        | 1 +
 configs/sandbox64_defconfig          | 1 +
 configs/sandbox_defconfig            | 1 +
 configs/sandbox_flattree_defconfig   | 1 +
 configs/sandbox_noblk_defconfig      | 1 +
 configs/sandbox_spl_defconfig        | 1 +
 configs/tools-only_defconfig         | 1 +
 configs/xilinx_versal_virt_defconfig | 1 +
 include/configs/apalis-tk1.h         | 1 -
 include/configs/apalis_imx6.h        | 1 -
 include/configs/apalis_t30.h         | 1 -
 include/configs/colibri-imx6ull.h    | 1 -
 include/configs/colibri_imx6.h       | 1 -
 include/configs/colibri_imx7.h       | 1 -
 include/configs/colibri_t20.h        | 1 -
 include/configs/colibri_t30.h        | 1 -
 include/configs/sandbox.h            | 1 -
 include/configs/xilinx_versal.h      | 1 -
 net/Kconfig                          | 7 +++++++
 scripts/config_whitelist.txt         | 1 -
 28 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index be9d55e7d4..54031aa3b7 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 3292d644aa..26cd36efc7 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -53,6 +53,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DWC_AHSATA=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 31a763536d..1a48c553b9 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig
index 3dbb4d95b6..9c92f49494 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -45,6 +45,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6ull-colibri"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index efb11ed987..1ebdb5dcbb 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -53,6 +53,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6-colibri"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index bfb84ecde8..8f9edf3b44 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -45,6 +45,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index 9312de9406..08da620c50 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -40,6 +40,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 15fb9555f3..127523de9f 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_UBI=y
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 2d12fc10c4..326548e84a 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-colibri"
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index 1bc3bd3801..bfb1eaf0e7 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -74,6 +74,7 @@ CONFIG_OF_LIVE=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox64"
 CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_DEVRES=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 4877f1099a..4cffa2c604 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -79,6 +79,7 @@ CONFIG_OF_LIVE=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_DEVRES=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index 40593ee3a1..dda6832f83 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -59,6 +59,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_DEVRES=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index 24ff4b41da..ec8726b798 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -65,6 +65,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_DEVRES=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index bebd78d55b..3e0bf5d3b5 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -76,6 +76,7 @@ CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_SPL_OF_PLATDATA=y
 CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_REGMAP=y
 CONFIG_SPL_REGMAP=y
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index fb06076785..aa73661a92 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -9,6 +9,7 @@ CONFIG_FIT_SIGNATURE=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
+CONFIG_IP_DEFRAG=y
 # CONFIG_UDP_FUNCTION_FASTBOOT is not set
 CONFIG_SANDBOX_GPIO=y
 CONFIG_DM_I2C_COMPAT=y
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index b0b36a084f..9000573cda 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -42,6 +42,7 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_OF_BOARD=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index 9c8c8979f0..e43fd8fe5e 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -31,7 +31,6 @@
 #define CONFIG_E1000_NO_NVM
 
 /* General networking support */
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 9d9e16e5d9..f2cc898878 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -59,7 +59,6 @@
 #define CONFIG_FEC_XCV_TYPE		RGMII
 #define CONFIG_ETHPRIME			"FEC"
 #define CONFIG_FEC_MXC_PHYADDR		6
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		4096
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 77a5968cc2..c085be8b5f 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -28,7 +28,6 @@
 #define CONFIG_E1000_NO_NVM
 
 /* General networking support */
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index fc39e807b6..aed22284e4 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -19,7 +19,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(32 * SZ_1M)
 
 /* Network */
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index b540b3e074..44f63e6a2a 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -50,7 +50,6 @@
 #define CONFIG_FEC_XCV_TYPE		RMII
 #define CONFIG_ETHPRIME			"FEC"
 #define CONFIG_FEC_MXC_PHYADDR		1
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index c3b353b2c2..5b3817359a 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -22,7 +22,6 @@
 #define CONFIG_ETHPRIME                 "FEC"
 #define CONFIG_FEC_MXC_PHYADDR          0
 
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 6c4e9d4154..dd9f7225a0 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -18,7 +18,6 @@
 #define CONFIG_MACH_TYPE		MACH_TYPE_COLIBRI_TEGRA2
 
 /* General networking support */
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		1536
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 7ece00e646..a816ade310 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -27,7 +27,6 @@
 #define CONFIG_SYS_MMC_ENV_PART		1
 
 /* General networking support */
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE		16352
 #define CONFIG_TFTP_TSIZE
 
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index bf03baefe8..50affaf1a8 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -71,7 +71,6 @@
 #define CONFIG_BOOTP_DNS2
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_BOOTP_SERVERIP
-#define CONFIG_IP_DEFRAG
 
 #ifndef SANDBOX_NO_SDL
 #define CONFIG_SANDBOX_SDL
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index 2cc36e793b..b2521df3db 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -41,7 +41,6 @@
 #define CONFIG_BOOTP_BOOTFILESIZE
 #define CONFIG_BOOTP_MAY_FAIL
 
-#define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE	4096
 
 /* Miscellaneous configurable options */
diff --git a/net/Kconfig b/net/Kconfig
index f2363e5256..1a6fda9ebc 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -22,4 +22,11 @@ config NETCONSOLE
 	  Support the 'nc' input/output device for networked console.
 	  See README.NetConsole for details.
 
+config IP_DEFRAG
+	bool "Support IP datagram reassembly"
+	default n
+	help
+	  Selecting this will enable IP datagram reassembly according
+	  to the algorithm in RFC815.
+
 endif   # if NET
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8651d569c5..8ec700f6ca 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -927,7 +927,6 @@ CONFIG_IPAM390_GPIO_BOOTMODE
 CONFIG_IPAM390_GPIO_LED_GREEN
 CONFIG_IPAM390_GPIO_LED_RED
 CONFIG_IPROC
-CONFIG_IP_DEFRAG
 CONFIG_IRAM_BASE
 CONFIG_IRAM_END
 CONFIG_IRAM_SIZE
-- 
2.20.1



More information about the U-Boot mailing list