From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by dpdk.org (Postfix) with ESMTP id 833F0374C for ; Tue, 29 Nov 2016 11:59:28 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OHE008PSH72CZ20@mailout4.w1.samsung.com> for dev@dpdk.org; Tue, 29 Nov 2016 10:59:26 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161129105925eucas1p27bdd5708eca93b221ea217d81fa91d0f~Lf5Gh287p1832218322eucas1p2a; Tue, 29 Nov 2016 10:59:25 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 14.C3.23383.E8F5D385; Tue, 29 Nov 2016 10:59:26 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161129105925eucas1p194202968606963500eebc6a0cb32d697~Lf5F3dZbe1746917469eucas1p1X; Tue, 29 Nov 2016 10:59:25 +0000 (GMT) X-AuditID: cbfec7ef-f79e76d000005b57-26-583d5f8ef06b Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 3F.5E.10494.67F5D385; Tue, 29 Nov 2016 10:59:02 +0000 (GMT) Received: from [106.109.129.180] by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OHE00HOFH708J90@eusync2.samsung.com>; Tue, 29 Nov 2016 10:59:24 +0000 (GMT) To: dev@dpdk.org, Helin Zhang , Konstantin Ananyev , Jingjing Wu Cc: Dyasly Sergey , Heetae Ahn , Bruce Richardson From: Ilya Maximets Message-id: Date: Tue, 29 Nov 2016 13:59:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-version: 1.0 In-reply-to: <1476886037-4586-3-git-send-email-i.maximets@samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduzned2+eNsIg+OTTCxurLK3ePdpO5PF tM+32S2mXNvOaHGl/Se7xcwFnxkt3v9ZxGIxebaUA4fHrwVLWT0W73nJ5NG3ZRVjAHMUl01K ak5mWWqRvl0CV8bNrdwF76Ur1l3uZGtg3CTWxcjJISFgIrG6/RwrhC0mceHeerYuRi4OIYFl jBJXz7xkhHA+M0rce7CADaZj+/MeJriqCUd+s0M4Lxgl9q57xg5SJSwQKvFnzgGwWSIC/YwS sxccZgZxmAUaGCUuLt4CVsUmoCNxavURRhCbV8BO4vyn9UwgNouAqsTXS9/AakQFIiQOblwN VSMo8WPyPRYQm1PATWLfhe9glzMLGEjMmHKYCcKWl9i85i0zxK2L2CWW7YrsYuQAsmUlNh2A CrtItG14wwhhC0u8Og5xjoSAjMTlyd0sEHa1xMStbWCfSQi0MEosnPgDGkr2EqduXoXaxScx adt0Zoj5vBIdbUIQJR4Sn+6fZoUIO0qcnCYMCaCrjBIrLu9gmcAoPwvJN7OQfDALyQcLGJlX MYqklhbnpqcWG+oVJ+YWl+al6yXn525iBCaR0/+Ov9/B+LQ55BCjAAejEg/vDiubCCHWxLLi ytxDjBIczEoivC9jbCOEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8+5dcCVcSCA9sSQ1OzW1ILUI JsvEwSnVwGi2veO8+DvjEh4Huz0HeO+a38kIest3zL/cuPV22VXtmM9VKxv1P/LOTbVkVrMt qDuRKru5XLe8Zl7I6uveRX9FErb9SzD8rKc/4UA9163a2qsbO2L1tK+8OrKQYUe/1Eo+zpSn Z7N8JhvyiS6bda325pX7F1pvVDs3LFsTM3vXZ4t5ZQzvNZVYijMSDbWYi4oTAVKTpr0eAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsVy+t/xK7pl8bYRBo9fmFjcWGVv8e7TdiaL aZ9vs1tMubad0eJK+092i5kLPjNavP+ziMVi8mwpBw6PXwuWsnos3vOSyaNvyyrGAOYoN5uM 1MSU1CKF1Lzk/JTMvHRbpdAQN10LJYW8xNxUW6UIXd+QICWFssScUiDPyAANODgHuAcr6dsl uGXc3Mpd8F66Yt3lTrYGxk1iXYycHBICJhLbn/cwQdhiEhfurWfrYuTiEBJYwihxY+FHZgjn BaNEz613YFXCAqES2/auYgRJiAhMZJSYfmM5O0TVVUaJjbOawPqZBZoYJWZu3cUK0sImoCNx avURRhCbV8BO4vyn9WCjWARUJb5e+sYOYosKREhs+jqHBaJGUOLH5HtgNqeAm8S+C9+B5nAA DdWTuH9RCyTMLCAvsXnNW+YJjAKzkHTMQqiahaRqASPzKkaR1NLi3PTcYiO94sTc4tK8dL3k /NxNjMCI2nbs55YdjF3vgg8xCnAwKvHw7rCyiRBiTSwrrsw9xCjBwawkwvsyxjZCiDclsbIq tSg/vqg0J7X4EKMp0AsTmaVEk/OB0Z5XEm9oYmhuaWhkbGFhbmSkJM479cOVcCGB9MSS1OzU 1ILUIpg+Jg5OqQZGv+NZc3hEXq1MnO++ikPF+lnPCUUvxtlX9pn8LRAU3Pjso9a0Vztjf5rs Wrph5Rxdn9cJO3e85hP1iGnZ9/He7W9ff/2WD5HbMTPokhX32kaOns95KjpFV+2vrfM1rnP8 eONXkXDVxKU359w/6V9uLeO14dMTpxfx/J2MPp6O/R66Ret6NJ7KKbEUZyQaajEXFScCAEuy v3O+AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161129105925eucas1p194202968606963500eebc6a0cb32d697 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G+yCvOyEseyghOyekBtFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1NA==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161019140735eucas1p267bb4aa03547e70e5f13d78e2ffedcc4 X-RootMTR: 20161019140735eucas1p267bb4aa03547e70e5f13d78e2ffedcc4 References: <1476886037-4586-1-git-send-email-i.maximets@samsung.com> <1476886037-4586-3-git-send-email-i.maximets@samsung.com> Subject: Re: [dpdk-dev] [PATCH RFC 2/2] net/ixgbe: allow bulk alloc for the max size desc ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 10:59:28 -0000 Ping. Best regards, Ilya Maximets. On 19.10.2016 17:07, Ilya Maximets wrote: > The only reason why bulk alloc disabled for the rings with > more than (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST) > descriptors is the possible out-of-bound access to the dma > memory. But it's the artificial limit and can be easily > avoided by allocating of RTE_PMD_IXGBE_RX_MAX_BURST more > descriptors in memory. This will not interfere the HW and, > as soon as all rings' memory zeroized, Rx functions will > work correctly. > > This change allows to use vectorized Rx functions with > 4096 descriptors in Rx ring which is important to achieve > zero packet drop rate in high-load installations. > > Signed-off-by: Ilya Maximets > --- > drivers/net/ixgbe/ixgbe_rxtx.c | 17 +---------------- > drivers/net/ixgbe/ixgbe_rxtx.h | 2 +- > 2 files changed, 2 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c > index 2ce8234..07c04c3 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -2585,7 +2585,6 @@ check_rx_burst_bulk_alloc_preconditions(struct ixgbe_rx_queue *rxq) > * rxq->rx_free_thresh >= RTE_PMD_IXGBE_RX_MAX_BURST > * rxq->rx_free_thresh < rxq->nb_rx_desc > * (rxq->nb_rx_desc % rxq->rx_free_thresh) == 0 > - * rxq->nb_rx_desc<(IXGBE_MAX_RING_DESC-RTE_PMD_IXGBE_RX_MAX_BURST) > * Scattered packets are not supported. This should be checked > * outside of this function. > */ > @@ -2607,15 +2606,6 @@ check_rx_burst_bulk_alloc_preconditions(struct ixgbe_rx_queue *rxq) > "rxq->rx_free_thresh=%d", > rxq->nb_rx_desc, rxq->rx_free_thresh); > ret = -EINVAL; > - } else if (!(rxq->nb_rx_desc < > - (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST))) { > - PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: " > - "rxq->nb_rx_desc=%d, " > - "IXGBE_MAX_RING_DESC=%d, " > - "RTE_PMD_IXGBE_RX_MAX_BURST=%d", > - rxq->nb_rx_desc, IXGBE_MAX_RING_DESC, > - RTE_PMD_IXGBE_RX_MAX_BURST); > - ret = -EINVAL; > } > > return ret; > @@ -2632,12 +2622,7 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) > /* > * By default, the Rx queue setup function allocates enough memory for > * IXGBE_MAX_RING_DESC. The Rx Burst bulk allocation function requires > - * extra memory at the end of the descriptor ring to be zero'd out. A > - * pre-condition for using the Rx burst bulk alloc function is that the > - * number of descriptors is less than or equal to > - * (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST). Check all the > - * constraints here to see if we need to zero out memory after the end > - * of the H/W descriptor ring. > + * extra memory at the end of the descriptor ring to be zero'd out. > */ > if (adapter->rx_bulk_alloc_allowed) > /* zero out extra memory */ > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h > index 2608b36..1abc6f2 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.h > +++ b/drivers/net/ixgbe/ixgbe_rxtx.h > @@ -67,7 +67,7 @@ > #define RTE_IXGBE_MAX_RX_BURST RTE_IXGBE_RXQ_REARM_THRESH > #endif > > -#define RX_RING_SZ ((IXGBE_MAX_RING_DESC + RTE_IXGBE_DESCS_PER_LOOP - 1) * \ > +#define RX_RING_SZ ((IXGBE_MAX_RING_DESC + RTE_PMD_IXGBE_RX_MAX_BURST) * \ > sizeof(union ixgbe_adv_rx_desc)) > > #ifdef RTE_PMD_PACKET_PREFETCH >