From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by dpdk.org (Postfix) with ESMTP id 6D58C156 for ; Fri, 8 Nov 2013 20:46:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1383940064; x=1415476064; h=from:to:cc:subject:date:message-id; bh=iO6d4mDE4clgR1/3wsRanbJIl5m6NEcsbJnCcgGxymc=; b=ml+fAFO+SoamkH6/4OO8ViqrfMGFtxpXRL7DxGjCkO0Rc8nwnx6TRbOz m81e5Jw7aRwvP1fdVnqrY54SB05/QEkQmbD2Apu/Z0YMnf0VITxiivBPE vkODgO5UJ2pA0EdZJA8QHGgnoyviXVQg+wv3umqrk5uvEkENI532dr52l w=; X-IronPort-AV: E=Sophos;i="4.93,661,1378857600"; d="scan'208";a="31869075" Received: from smtp-in-31001.sea31.amazon.com ([10.184.168.27]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Nov 2013 19:47:42 +0000 Received: from u8c89a593018951487ec8.ant.amazon.com (u8c89a593018951487ec8.ant.amazon.com [10.61.57.35]) by smtp-in-31001.sea31.amazon.com (8.14.7/8.14.7) with ESMTP id rA8Jlggo021277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Nov 2013 19:47:42 GMT Received: from u8c89a593018951487ec8.ant.amazon.com (localhost [127.0.0.1]) by u8c89a593018951487ec8.ant.amazon.com (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id rA8JlblI031813; Fri, 8 Nov 2013 19:47:37 GMT Received: (from bmbenson@localhost) by u8c89a593018951487ec8.ant.amazon.com (8.14.4/8.14.4/Submit) id rA8JlbLf031810; Fri, 8 Nov 2013 19:47:37 GMT From: Bryan Benson To: dev@dpdk.org Date: Fri, 8 Nov 2013 19:47:22 +0000 Message-Id: <1383940042-31770-1-git-send-email-bmbenson@amazon.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [PATCH] ixgbe: Fix offloading bits when RX bulk alloc is used. 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: Fri, 08 Nov 2013 19:46:51 -0000 This is a fix for the ixgbe hardware offload flags not being set when bulk alloc RX is used. The issue was caused by masking off the bits that store the hardware offload values in the status_error field to retrieve the done bit for the descriptor. Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0 introduced bulk dequeue, which included the bug. --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 07830b7..a183c11 100755 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1035,7 +1035,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq) struct igb_rx_entry *rxep; struct rte_mbuf *mb; uint16_t pkt_len; - int s[LOOK_AHEAD], nb_dd; + uint32_t s[LOOK_AHEAD]; + int nb_dd; int i, j, nb_rx = 0; @@ -1058,12 +1059,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq) for (j = LOOK_AHEAD-1; j >= 0; --j) s[j] = rxdp[j].wb.upper.status_error; - /* Clear everything but the status bits (LSB) */ - for (j = 0; j < LOOK_AHEAD; ++j) - s[j] &= IXGBE_RXDADV_STAT_DD; + nb_dd = 0; + /* add to nd_dd when the status bit is set (LSB) */ + for (j = 0; j < LOOK_AHEAD; ++j) { + nb_dd += s[j] & IXGBE_RXDADV_STAT_DD; + } - /* Compute how many status bits were set */ - nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7]; nb_rx += nb_dd; /* Translate descriptor info to mbuf format */ -- 1.7.9.5