From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 60DB1C7BC for ; Wed, 29 Apr 2015 10:38:29 +0200 (CEST) Received: by widdi4 with SMTP id di4so57189668wid.0 for ; Wed, 29 Apr 2015 01:38:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3kUIDN7dNEj6f3u4eA2mE3pp94nS2baAnZNvzIBJunA=; b=BcySGBZp+posmuP8JMtyMKaZqq2f+fNr6KR3YE8xqZ5YLL0VJ6DbUJ2fpEB2DH28QG 9tzRhlhJBIiqIWyeB8cRRNJM9vxmZo5aJwRHr/MdXcQzlQI6LsWHEuM66NzNkFp0SDrm 4SYTI28gWTrpVgZ6yvoFXSTbYodmFiTo0XQ8QWLf8jkq5NkvFAsoGnV14W51TGuobMUY rEW3vokY7A33mB3+LrgUNzeAWCKkBMeUOZXMbpqC3kBogtSuBgy9pNpfdm6eSviCX01r gGi4W+/5bBkveSx9NtDwVKH6PpdLwm/ejrlD1MKDh0PumMfBBIq9UiQjzKUK9veL1PlZ ds9A== X-Gm-Message-State: ALoCoQnLiR8F2kkCWMso7ulVjTNiSLZ/fK4jtjePcIhpeka0MRtrpQmTgmPK30fDfRfy6TlWDxFh X-Received: by 10.180.14.135 with SMTP id p7mr3685358wic.8.1430296709140; Wed, 29 Apr 2015 01:38:29 -0700 (PDT) Received: from vladz-laptop.localdomain (bzq-79-182-192-238.red.bezeqint.net. [79.182.192.238]) by mx.google.com with ESMTPSA id yr1sm37946370wjc.37.2015.04.29.01.38.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 01:38:28 -0700 (PDT) From: Vlad Zolotarov To: dev@dpdk.org Date: Wed, 29 Apr 2015 11:38:17 +0300 Message-Id: <1430296697-32650-6-git-send-email-vladz@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430296697-32650-1-git-send-email-vladz@cloudius-systems.com> References: <1430296697-32650-1-git-send-email-vladz@cloudius-systems.com> Subject: [dpdk-dev] [PATCH v2 5/5] ixgbe: Add support for scattered Rx with bulk allocation. 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: Wed, 29 Apr 2015 08:38:29 -0000 Simply initialze rx_pkt_burst callback to ixgbe_recv_pkts_lro_bulk_alloc() if the conditions are right. This is possible because work against HW in LRO and scattered cases is exactly the same and LRO callback already supports the bulk allocation. Signed-off-by: Vlad Zolotarov --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 1766c1a..63284c9 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -3780,6 +3780,11 @@ void ixgbe_set_rx_function(struct rte_eth_dev *dev) dev->data->port_id); dev->rx_pkt_burst = ixgbe_recv_scattered_pkts_vec; + } else if (adapter->rx_bulk_alloc_allowed) { + PMD_INIT_LOG(INFO, "Using a Scattered with bulk " + "allocation callback (port=%d).", + dev->data->port_id); + dev->rx_pkt_burst = ixgbe_recv_pkts_lro_bulk_alloc; } else { PMD_INIT_LOG(DEBUG, "Using Regualr (non-vector, " "single allocation) " -- 2.1.0