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 65FA9A058A; Fri, 17 Apr 2020 13:53:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4989D1DC5D; Fri, 17 Apr 2020 13:53:03 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 390211DC58 for ; Fri, 17 Apr 2020 13:53:02 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200417115301euoutp0269815a701277b4b9790b1cffb6af7de9~GmTdV-QlG2874828748euoutp02E for ; Fri, 17 Apr 2020 11:53:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200417115301euoutp0269815a701277b4b9790b1cffb6af7de9~GmTdV-QlG2874828748euoutp02E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587124381; bh=imCLkNn/40ygFXUS4pwodmrc2y5IyiPnH1RN6WLhR00=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=O5X6ZCB2cCr9qHEYmUott1VZlC963GogVqt1V6KKTTe7HkKhwwlVDKprxlfP3XKkD 8yFI9mR8Zky3teNrenYy3KUYNyPQ6WRuLujHaMX+d1Sp7xSykZpGzKOpqKuRPHYckF A/MaHteRYj1lBlox9ZU6jaLhpYYv9E2pZ85voNoQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200417115301eucas1p1bd14b81ca2371808701403f7e33afc5a~GmTdCAhU11406814068eucas1p1m; Fri, 17 Apr 2020 11:53:01 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 52.F9.61286.D98999E5; Fri, 17 Apr 2020 12:53:01 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200417115300eucas1p1ff5d55af122a3ad8a8370154b81d81c3~GmTct13201714617146eucas1p1k; Fri, 17 Apr 2020 11:53:00 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200417115300eusmtrp25114ea303241a91d10ea943c67aeb189~GmTctNhp81215312153eusmtrp2g; Fri, 17 Apr 2020 11:53:00 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-94-5e99989d0264 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C2.FE.07950.C98999E5; Fri, 17 Apr 2020 12:53:00 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200417115300eusmtip19ef351691a7982945a297038d47e4979~GmTcEAp3A1523815238eusmtip1o; Fri, 17 Apr 2020 11:53:00 +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:59 +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-3-aconole@redhat.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0hTYRjHec85247DyetUfLAgWCQktCkmHPNSUYnVB/3Qhyi8rDyp5KZs XjIQNEXTLCLLuVlesca8kejU0EITRymZlrpCQ8QsdV4yNadiOc8kvz3P7/n/ef9/eGlSbOB5 0PHKZFallCdI+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Ri4OIYGljBJNv48wdTFyACVkJD5cEoCo EZb4c62LDaLmNaPE/dmdLCAJYYEIifPdnewgtoiAscSOD+eZQIqYBWYxSWx8+ZMZouMtUMfC F8wgVWwCthJHZn5lBdnAK+AmsazFEyTMIqAqse3ZTTaQsKhArETLRU2QMK+AoMTJmU9YQMKc AlYSbz7kgoSZBcwk5m1+yAxhy0s0b50NZYtI3HjUwjiBUWgWku5ZSFpmIWmZhaRlASPLKkaR 1NLi3PTcYiO94sTc4tK8dL3k/NxNjMCI23bs55YdjF3vgg8xCnAwKvHwGvTMjBNiTSwrrsw9 xCjBwawkwnvQDSjEm5JYWZValB9fVJqTWnyI0RTotYnMUqLJ+cBkkFcSb2hqaG5haWhubG5s ZqEkztshcDBGSCA9sSQ1OzW1ILUIpo+Jg1OqgZGxNi2QsfhBQ5Buc+yBX+nn7P+mV8zsWVyR xHpi9Rtmc9uptvau1vyTr61fwL6XP0PLpVkhzu3043k/Io8Y+0seiRF64+Zk1Sulf8V83VZR lVBOx/fi06xrbzOoWs1ztDxeZSpXfC+aaUesHHeMaNJxPsZArxAp1faZYVdmtcmbHk81sH6v xFKckWioxVxUnAgAGT4loc4CAAA= X-CMS-MailID: 20200417115300eucas1p1ff5d55af122a3ad8a8370154b81d81c3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415172624eucas1p1d9c75a6936da29f4dddf08f913e10a08 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415172624eucas1p1d9c75a6936da29f4dddf08f913e10a08 References: <20200401183917.3620845-1-aconole@redhat.com> <20200415172547.1421587-1-aconole@redhat.com> <20200415172547.1421587-3-aconole@redhat.com> Subject: Re: [dpdk-dev] [PATCH v4 2/3] ip_frag: ensure minimum v6 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: > In addition, do a formal parameter check. > > Signed-off-by: Aaron Conole > --- > lib/librte_ip_frag/rte_ipv6_fragmentation.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c b/lib/librte_ip_frag/rte_ipv6_fragmentation.c > index 43449970e5..ee984aed82 100644 > --- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c > +++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c > @@ -79,6 +79,15 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in, > uint16_t fragment_offset, frag_size; > uint64_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 < 1280)) > + return -EINVAL; > + > /* > * Ensure the IP payload length of all fragments (except the > * the last fragment) are a multiple of 8 bytes per RFC2460. 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