From patchwork Fri Feb 7 15:17:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1235053 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=X80XAoXk; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Df7f6nBMz9sRG for ; Sat, 8 Feb 2020 02:18:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 719708173E; Fri, 7 Feb 2020 16:17:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="X80XAoXk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8EBA28176E; Fri, 7 Feb 2020 16:17:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FORGED_SPF_HELO, SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1b::709]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 09C1C81731 for ; Fri, 7 Feb 2020 16:17:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LnZVyO40G1MbPLfNmTGIPUuS/B+f8uV7sS90j57L6WP8Xk+gZudSHYBo4+d0xZ7b6YvS6VHW5KrAObVMtUAbUkZiMMSNlCKi6vo9LYKMEfjb3sn0d3NJS2dwZZ8IgwZpKrn3jEbKQrUXboOGvUM0/Gk9PNSVpwSNoR4Oejd14m+OhxPmHw1rzwPN2MDTnbFhddRXzToJbhNfs8NxEruFpiHkdgCnUngCdPsXqzdCDor+YIoZmEqp2oMauWEtZVDtAFunlsLQzuV0TjOhlNJdMPdNPJR0RXp+TLxNp3nxWj8inCf0RunghNGwdbU2mKCDMPByj7m1lT5pDb8604b0aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XWqslTaK8Hc7FxaiKYpevw5zTYS5+GKzchgblA/gY0M=; b=bZPpiIynuxlhgyjMtwsR400avQ7H6N/V6HCs4rppZhIb8QSmiP5Nd4/qMyZ4NPPEhctLg0kAIAbaHsBibZfRqO+YNGgy9nK8q/DN9nxDoIJVFpjhqCN4jj8yon6TndxHNO7BIAVQHBNaI/WzRZp3WtCaO+SRd7YKivZZqkjpAPqG08XjvL+EwSldcyjRLwo7vwc+lJ6RUDFkha6hqWCgQC+i84bI0M047fHw/KEY1tVyKUVnHWC1jqVHludKwutV5sev27FUUP975FSalnK+ArJYL9E/LKCWrzEIi9HvQo6HFF+UwsGP7TcJ2vHaQGvG/3ho0kHADG+WbeDcMuTLeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XWqslTaK8Hc7FxaiKYpevw5zTYS5+GKzchgblA/gY0M=; b=X80XAoXkwEXKwTbBF1y0Vp0uExhp3BZETh6SsGvTXe0p33qGz7eQgA7oiUV/BnqKj0MRCoXclCEUFubderXF+E8OcxdsiaGReepHzY4eAOmcjUf//c89DIkrBP2KbM44VB83btBb/6fL+u6dzXhe7qg+PFp0oPwoOitAhzXrBzc= Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB3263.EURPRD10.PROD.OUTLOOK.COM (10.255.196.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.23; Fri, 7 Feb 2020 15:17:43 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::8175:5aa2:2870:766d]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::8175:5aa2:2870:766d%6]) with mapi id 15.20.2686.036; Fri, 7 Feb 2020 15:17:43 +0000 Received: from prevas-ravi.prevas.se (81.216.59.226) by HE1PR0202CA0011.eurprd02.prod.outlook.com (2603:10a6:3:8c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.21 via Frontend Transport; Fri, 7 Feb 2020 15:17:42 +0000 From: Rasmus Villemoes To: "u-boot@lists.denx.de" Subject: [PATCH] net: convert NET_MAXDEFRAG to Kconfig Thread-Topic: [PATCH] net: convert NET_MAXDEFRAG to Kconfig Thread-Index: AQHV3cm+6mohDtFwKE+Kc68vZLE8xA== Date: Fri, 7 Feb 2020 15:17:42 +0000 Message-ID: <20200207151701.25362-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0202CA0011.eurprd02.prod.outlook.com (2603:10a6:3:8c::21) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) x-mailer: git-send-email 2.23.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 462c06d1-05d5-4a96-5895-08d7abe0e0b0 x-ms-traffictypediagnostic: VI1PR10MB3263: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0306EE2ED4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(136003)(396003)(39850400004)(346002)(366004)(199004)(189003)(54906003)(316002)(71200400001)(478600001)(44832011)(4326008)(2616005)(107886003)(956004)(2906002)(5660300002)(26005)(8976002)(86362001)(186003)(1076003)(36756003)(16526019)(6506007)(6486002)(66946007)(52116002)(8676002)(8936002)(81156014)(81166006)(6512007)(66476007)(66556008)(64756008)(66446008)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB3263; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GR0t6GMwwF6NqZ1VcEYCoWhYI36IYii1x3ty6fFj/5IjJ5THH/Lv1mmTC61YXNxiM/2WpF1ZIZGt/QkoyWrgJCGDBX47cuPRU3DUvv8tuFYFZ1drUoDBKBVYVL5MwG5dElhYPH0qNMuLsaldWoa+XiYc1gvqEfq2c7IlAAkFjLhA3WbI3hpqYQ+PQMzZK6AIUH3qo14CyY6N0JtWuR4mQn/h3IYD/lLDs1Rx3Yoqy1v1aAb/7V9QPRY7vEIF6bJVFNyuudwgsC5+xP+vaNHK4XY8rkcMNOcd1nSVTMIPZT1RnSQrwtCVLSmT48cxHUUopBkg+4pJvKNvMrPSDZ118lzhKncZOycdjvYC0Q4fTHDfOW2H7dl4r0dpc1/VOiSOcf4hyJFITeRpc0Hs7tmcRWVeyA9ZsERkBpBGpha8epiw8g3BP6XkVDiet5uQ2Vbz x-ms-exchange-antispam-messagedata: /fhaYJiyAYhVtzVTDEDYXlWGS8BZQDCUVjFXw0CekIlzfhXi/pJfNJAwIEPMxzLuaLDaST4GjGxPI2T7XpzskG+OwtA5RMwOx88MY2mHcvyh/ZZOu104da2AuExhiODkFeLS45i6pvhYENfPMZPl8g== MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 462c06d1-05d5-4a96-5895-08d7abe0e0b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2020 15:17:42.8930 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Bls1EVxTwtbl/QiUS2KccfJX4YM1WrOOqXK61iN+b70uFCWCEPHoALOnz2sI8f2woqK7L/VaCOaOA2LC12iLDcfTVNNu+a1KIF/4SC+7o+I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3263 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Rasmus Villemoes Reviewed-by: Simon Glass --- 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