From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 6BE34E72 for ; Tue, 1 Sep 2015 21:17:33 +0200 (CEST) Received: by wicge5 with SMTP id ge5so17733703wic.0 for ; Tue, 01 Sep 2015 12:17:33 -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; bh=l/I8Cu16PTbX9N7w/IvzTrhuegRhoI8Kp6Vb7w0lC7g=; b=dVewAP+v8ffRjjR95mcGx2LzCjN8QHja9/VkHxbxQ5nqQOPk4nK0a6XH/9eDrCZxgV G5jFSFs39cFk2T7VQCKHb/abMXSN7y4i8hSEI5QbjkJ0JlcRnlrP/l0uXQ6ZRX3GmA2R BHMp++jxD5w06y8YrkS4Kt3A/yrO7fXdUHEChpvI1fxLJn4F+5j1BO52xOR6OfpuYFB7 Zt0pZOLjrPx7+bngNZhsg8uGPmwdJvPtAy5Rf5gvPGVmw2eQcQ7uXd00YievRmHztKAF TbYsqi5vD9WZCT4c2xafHq5Ywov9nj5b0pG/DeylE9M18lk9cm4coogrmRKjXDH3Z2/P qxmQ== X-Gm-Message-State: ALoCoQl0qn9goGFUyKyp+3O77kNbuQT6Ojz97tmVQ63v+VtrCW1OUnFERrtdFbQrcv4K6C0+9P2Y X-Received: by 10.194.88.102 with SMTP id bf6mr33353383wjb.99.1441135053143; Tue, 01 Sep 2015 12:17:33 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id ja8sm28603285wjb.13.2015.09.01.12.17.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Sep 2015 12:17:32 -0700 (PDT) From: Zoltan Kiss To: dev@dpdk.org Date: Tue, 1 Sep 2015 20:17:16 +0100 Message-Id: <1441135036-7491-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] ixgbe: prefetch packet headers in vector PMD receive function 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, 01 Sep 2015 19:17:33 -0000 The lack of this prefetch causes a significant performance drop in OVS-DPDK: 13.3 Mpps instead of 14 when forwarding 64 byte packets. Even though OVS prefetches the next packet's header before it starts processing the current one, it doesn't get there fast enough. This aligns with the behaviour of other receive functions. Signed-off-by: Zoltan Kiss --- diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index cf25a53..51299fa 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -502,6 +502,15 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, _mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1, pkt_mb1); + rte_packet_prefetch((char*)(rx_pkts[pos]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 1]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 2]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 3]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + /* C.4 calc avaialbe number of desc */ var = __builtin_popcountll(_mm_cvtsi128_si64(staterr)); nb_pkts_recd += var;