All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: convert NET_MAXDEFRAG to Kconfig
@ 2020-02-07 15:17 Rasmus Villemoes
  2020-02-07 17:37 ` Simon Glass
  2020-02-13 22:12 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Rasmus Villemoes @ 2020-02-07 15:17 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 net/Kconfig                  | 10 ++++++++++
 net/net.c                    |  3 ---
 scripts/config_whitelist.txt |  1 -
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/net/Kconfig b/net/Kconfig
index a07f6746c5..96bbce1778 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -29,6 +29,16 @@ config IP_DEFRAG
 	  Selecting this will enable IP datagram reassembly according
 	  to the algorithm in RFC815.
 
+config NET_MAXDEFRAG
+	int "Size of buffer used for IP datagram reassembly"
+	depends on IP_DEFRAG
+	default 16384
+	range 1024 65536
+	help
+	  This defines the size of the statically allocated buffer
+	  used for reassembly, and thus an upper bound for the size of
+	  IP datagrams that can be received.
+
 config TFTP_BLOCKSIZE
 	int "TFTP block size"
 	default 1468
diff --git a/net/net.c b/net/net.c
index 5199d679a1..322b1f81bf 100644
--- a/net/net.c
+++ b/net/net.c
@@ -882,9 +882,6 @@ int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport,
  * to the algorithm in RFC815. It returns NULL or the pointer to
  * a complete packet, in static storage
  */
-#ifndef CONFIG_NET_MAXDEFRAG
-#define CONFIG_NET_MAXDEFRAG 16384
-#endif
 #define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG)
 
 #define IP_MAXUDP (IP_PKTSIZE - IP_HDR_SIZE)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index cf1808e051..669d0bf65d 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1226,7 +1226,6 @@ CONFIG_NETSPACE_LITE_V2
 CONFIG_NETSPACE_MAX_V2
 CONFIG_NETSPACE_MINI_V2
 CONFIG_NETSPACE_V2
-CONFIG_NET_MAXDEFRAG
 CONFIG_NET_MULTI
 CONFIG_NET_RETRY_COUNT
 CONFIG_NEVER_ASSERT_ODT_TO_CPU
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] net: convert NET_MAXDEFRAG to Kconfig
  2020-02-07 15:17 [PATCH] net: convert NET_MAXDEFRAG to Kconfig Rasmus Villemoes
@ 2020-02-07 17:37 ` Simon Glass
  2020-02-13 22:12 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-02-07 17:37 UTC (permalink / raw)
  To: u-boot

On Fri, 7 Feb 2020 at 08:17, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  net/Kconfig                  | 10 ++++++++++
>  net/net.c                    |  3 ---
>  scripts/config_whitelist.txt |  1 -
>  3 files changed, 10 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] net: convert NET_MAXDEFRAG to Kconfig
  2020-02-07 15:17 [PATCH] net: convert NET_MAXDEFRAG to Kconfig Rasmus Villemoes
  2020-02-07 17:37 ` Simon Glass
@ 2020-02-13 22:12 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-02-13 22:12 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 07, 2020 at 03:17:42PM +0000, Rasmus Villemoes wrote:

> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200213/346932b8/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-13 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 15:17 [PATCH] net: convert NET_MAXDEFRAG to Kconfig Rasmus Villemoes
2020-02-07 17:37 ` Simon Glass
2020-02-13 22:12 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.