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 DC97BA058A; Fri, 17 Apr 2020 13:52:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A65C229CB; Fri, 17 Apr 2020 13:52:48 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 465011E4AF for ; Fri, 17 Apr 2020 13:52:46 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200417115246euoutp0121ca17b2509c0af684882ed397b3eb05~GmTOzKCvw0875208752euoutp01B for ; Fri, 17 Apr 2020 11:52:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200417115246euoutp0121ca17b2509c0af684882ed397b3eb05~GmTOzKCvw0875208752euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587124366; bh=7ZeYVk9dTJ9ktjs20Z09GelvP5MzedLeuo3TjSb7Hoo=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=jjB9fWWY6aIjgygWj5QrJZpM0dCdeCTz8nxUxYtN3EejVLNvdgDvFKIaNPw3i7VlK BBfcbUX+pTdEvd6OdJyESOKIPPLbsoWDnu+bjV22wKb1NNG7olwIzCtaj4K+275P7u coPbvR+yHWfAx2Td1iQfu/JhJ3GN7TEWtgcfhyLw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200417115245eucas1p22071537b2dc6f8602809736522b55675~GmTOZUAsS2693326933eucas1p2J; Fri, 17 Apr 2020 11:52:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id B2.CD.60679.D88999E5; Fri, 17 Apr 2020 12:52:45 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200417115244eucas1p14f550457b9836bc88691054a83da30e5~GmTN0GX300547005470eucas1p14; Fri, 17 Apr 2020 11:52:44 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200417115244eusmtrp202a8e555111e12cfdb9b57cd9e214dc1~GmTNzdm8I1215312153eusmtrp28; Fri, 17 Apr 2020 11:52:44 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-e5-5e99988dc5d3 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B9.EE.07950.C88999E5; Fri, 17 Apr 2020 12:52:44 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200417115244eusmtip108769254658d2e807567b01981e0a131~GmTNIF3_Z1909019090eusmtip1J; Fri, 17 Apr 2020 11:52:44 +0000 (GMT) To: Aaron Conole , dev@dpdk.org Cc: Konstantin Ananyev , Pavan Nikhilesh , Bruce Richardson , David Marchand , Ferruh Yigit , Anatoly Burakov From: Lukasz Wojciechowski Message-ID: Date: Fri, 17 Apr 2020 13:52:42 +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: <20200415172547.1421587-2-aconole@redhat.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFKsWRmVeSWpSXmKPExsWy7djPc7q9M2bGGWxYr2Tx680DdotH9xYz W9xYZW+xfUUXm8W7T9uZLO7sPc1u8f7PIhaL4z0fWRw4PH4tWMrqsXjPSyaPyQsvMnu833eV LYAlissmJ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3MA4l7OLkZNDQsBEYs37GUxdjFwcQgJLGSUO9V1g62LkAErISHy4JABR Iyzx51oXG0TNa0aJMxsvM4MkhAUiJE6uW80KYosIGEvs+HAebBCzwCwmiY0vfzJDdLxllHh5 5TFYFZuArcSRmV/BbF4BN4nW54/ZQWwWAVWJRScmg20WFYiVaLmoCVEiKHFy5hMWkDCngJXE uuV1IGFmATOJeZsfMkPY8hLNW2dD2SISNx61ME5gFJqFpHsWkpZZSFpmIWlZwMiyilEktbQ4 Nz232EivODG3uDQvXS85P3cTIzDmth37uWUHY9e74EOMAhyMSjy8Bj0z44RYE8uKK3MPMUpw MCuJ8B50AwrxpiRWVqUW5ccXleakFh9iNAV6bSKzlGhyPjAd5JXEG5oamltYGpobmxubWSiJ 83YIHIwREkhPLEnNTk0tSC2C6WPi4JRqYAw63pi89tq8B+mbhHtSrecF8kgnOay+Nsmocu77 w6rLFtV0HkrP3NbDJHfCqyC90Nlb0iwyJ7XhwIb1yretNj45/bwl7HfjCrcff/9OWjNFo+/J GzZJqUd/1vN6lC5LVYqI161KTr0aK2m45nFtdt3Mr8vqfe+XTmIStZ2qsGxNpMX+zZMmRiux FGckGmoxFxUnAgBUhs/ezwIAAA== X-CMS-MailID: 20200417115244eucas1p14f550457b9836bc88691054a83da30e5 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415172616eucas1p20a7e514a4f0d483f4cf36d87024bf287 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415172616eucas1p20a7e514a4f0d483f4cf36d87024bf287 References: <20200401183917.3620845-1-aconole@redhat.com> <20200415172547.1421587-1-aconole@redhat.com> <20200415172547.1421587-2-aconole@redhat.com> Subject: Re: [dpdk-dev] [PATCH v4 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 15.04.2020 o 19: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. > > Signed-off-by: Aaron Conole > --- > lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c > index 9e9f986cc5..c36678a6d2 100644 > --- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c > +++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c > @@ -76,6 +76,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 < 68)) > + 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