From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 743B3A0597; Tue, 21 Apr 2020 13:04:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D7ED1D96E; Tue, 21 Apr 2020 13:04:13 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id E935C1D96E for ; Tue, 21 Apr 2020 13:04:11 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200421110411euoutp022de903c4cf1821d618e31ef6ad2a066a~H0N9HBgNc0113901139euoutp02z for ; Tue, 21 Apr 2020 11:04:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200421110411euoutp022de903c4cf1821d618e31ef6ad2a066a~H0N9HBgNc0113901139euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587467051; bh=1SzXIBXBU6uQIbCfBP30y/dGkQC8rFgBLCv5VTsmaEI=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=DLGy/9RXoO3X7ZBLLCgHnJLOcKDksYU8Mrt1ZRzWwtwwvUdSdtDx8LHeyC5YnlSXt RKNTVODi1icxkuaiYnYrFb34iKyeaqtvJmL5tYkzsRIpHBVT7oSFKbYVGHNl+hK27q bSP+4h8Ea/+dbGnpG61aTmKmGdFranbAx7EUGBrw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200421110410eucas1p21f7dd4213d6cae800c48f9e60dc2d0b1~H0N8rzFQr2281622816eucas1p2y; Tue, 21 Apr 2020 11:04:10 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 66.84.60679.A23DE9E5; Tue, 21 Apr 2020 12:04:10 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200421110409eucas1p1247ad347258887b1e51dfa46f761fb4b~H0N8DXflB1357613576eucas1p1H; Tue, 21 Apr 2020 11:04:09 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200421110409eusmtrp284641e8ccdfdd2ffa0344145a73288d0~H0N8CZsIF0919809198eusmtrp2H; Tue, 21 Apr 2020 11:04:09 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-b6-5e9ed32abdb2 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A0.6E.07950.923DE9E5; Tue, 21 Apr 2020 12:04:09 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200421110409eusmtip214e0e2784fac13b9e6395947a38abbe5~H0N7dNqxW1045710457eusmtip2L; Tue, 21 Apr 2020 11:04:09 +0000 (GMT) To: Aaron Conole , dev@dpdk.org Cc: Pavan Nikhilesh , Bruce Richardson , David Marchand , Ferruh Yigit , Anatoly Burakov From: Lukasz Wojciechowski Message-ID: <53ffc207-d570-e517-5683-cff422a52403@partner.samsung.com> Date: Tue, 21 Apr 2020 13:04:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200420192523.2546909-2-aconole@redhat.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOKsWRmVeSWpSXmKPExsWy7djP87pal+fFGWxfrGTx680DdotH9xYz W9xYZW+xfUUXm8W7T9uZLO7sPc1ucbznI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FyzWzWRoY13J3MXJySAiYSPyYsZGpi5GLQ0hgKaPE9dPXmbsYOYASMhIfLglA1AhL/LnW xQZR85pR4t7LZhaQhLCAt0THwatsILaIgLHEjg/nwQYxCzxllOi8tY8VouMto8TfdR+YQKrY BGwljsz8ygpi8wq4SbTO7GMHsVkEVCVeXtzJBrJZVCBWouWiJkSJoMTJmU/AlnEKWEmsnvOA EcRmFjCTmLf5ITOELS/RvHU2lC0iceNRC+MERqFZSNpnIWmZhaRlFpKWBYwsqxhFUkuLc9Nz i430ihNzi0vz0vWS83M3MQJjbduxn1t2MHa9Cz7EKMDBqMTDe+P8vDgh1sSy4srcQ4wSHMxK IrwWWkAh3pTEyqrUovz4otKc1OJDjKZAv01klhJNzgemgbySeENTQ3MLS0NzY3NjMwslcd4O gYMxQgLpiSWp2ampBalFMH1MHJxSDYyT9mZ3cfGk7L2yfhazkEk8Z5nBsgMW0xQ2dhX3zF1j sEd6WcPCi/vS5T+xxr+72R/G4aLXtWf3noMXeT+5xvrv2ss59eglid1XcyfLZB9cfWnTLmf2 N5v+dK1u2b1A1+C+indSKe/C29c1NOylncxq1OU9/N5wyuVEXFKdKmTI8Oj0OvN9+cVKLMUZ iYZazEXFiQC35iNWywIAAA== X-CMS-MailID: 20200421110409eucas1p1247ad347258887b1e51dfa46f761fb4b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200420192540eucas1p1548897e346ad67c30d6932f157f143ce X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200420192540eucas1p1548897e346ad67c30d6932f157f143ce References: <20200417131410.1343135-1-aconole@redhat.com> <20200420192523.2546909-1-aconole@redhat.com> <20200420192523.2546909-2-aconole@redhat.com> Subject: Re: [dpdk-dev] [PATCH v6 1/3] ip_frag: ensure minimum v4 fragmentation length X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" W dniu 20.04.2020 o 21:25, Aaron Conole pisze: > Do a formal parameter check of mtu length, as well as > checking the the various inputs for validity. If any > aren't acceptable, we bail. > > Acked-by: Konstantin Ananyev > Acked-by: Lukasz Wojciechowski > Signed-off-by: Aaron Conole > --- > lib/librte_ip_frag/rte_ipv4_fragmentation.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c > index 9e9f986cc5..e9de335ae2 100644 > --- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c > +++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > #include "ip_frag_common.h" > > @@ -76,6 +77,15 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in, > uint16_t fragment_offset, flag_offset, frag_size; > uint16_t frag_bytes_remaining; > > + /* > + * Formal parameter checking. > + */ > + if (unlikely(pkt_in == NULL) || unlikely(pkts_out == NULL) || > + unlikely(nb_pkts_out == 0) || > + unlikely(pool_direct == NULL) || unlikely(pool_indirect == NULL) || > + unlikely(mtu_size < RTE_ETHER_MIN_MTU)) > + return -EINVAL; > + > /* > * Ensure the IP payload length of all fragments is aligned to a > * multiple of 8 bytes as per RFC791 section 2.3. Acked-by: Lukasz Wojciechowski -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com