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 4E47CA04F0; Mon, 13 Jan 2020 08:41:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2657F1D606; Mon, 13 Jan 2020 08:41:17 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 638C81D5EF for ; Mon, 13 Jan 2020 08:41:15 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id b10so8730391iof.11 for ; Sun, 12 Jan 2020 23:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HEO3FLEwLeJ1yIJM8+yKUX8U3KL266+Ve0fNEYgSQ5I=; b=FFQ3NoTswYoHLUhCArN9d/hJrP9Z2Eu3jBeqlhO8XMhPdXOdnjNYMBqA6Q1cP4f/vn MALmYSRVExuvE6vco0AiUw8hAt/7mBT/LBal5YL7RjGXpDopmCb76jTvZQkoDqEx5KTk 6RXSsnP33G9jWjnDCV4bKBc1Ea8BMU6fD9YfDTM39bRZzL15kXGMif4W1vQ6pvaFjbn+ Mxg3MizPgXntxjl2BQCcmJr2vqR6n5krX0dtU96IaAPeLceLAYf5RRi+MAUA1kLB5osc mtifk55NrvyVE5deIA3tAZ2+X25pkZk9XVC+1dKkfiMij1S0YalQd79gTwclEQYohV80 GmwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HEO3FLEwLeJ1yIJM8+yKUX8U3KL266+Ve0fNEYgSQ5I=; b=oNw4+QdCKJbMsBndCGa+w5xqKSF1+rBkaw4kOjTFbkxF6CCDY7Qw/dLyOW1fxZSEcm i1HO5Wnf2KUZz8xC9Yu32JxC3XwI/DRcRWXPv72h9KeUPMSfhl1VR0Ex4W5W4FruKbj5 IvZFOw5/VN1rDo8/NZon+rAZ8OCC/01sGyPVYrTAo0wl0JJeLYOTQ6ADFWbmzJZWY9MJ zt3ibylBfKs1kiTAy1LTElTTfTba6vrHNH2I4uufEFrKnYnPSqHMaumuZ/IWpKmu7gaZ nR4rlV6KqUi4OCTXyiOn64Rh82t7ZdBRun5Kdzmg4Yk0Sa9yvWHL7+JACgOtNlBDSwWz jN+g== X-Gm-Message-State: APjAAAV+1s+Y2S1CBi+gaXNiw0OgncOZ0ekt21rdX7B6P0srzC2otYtd SHLmCts2AN5gixIi98kFgW3FBqRfUyvOdtd8Qks= X-Google-Smtp-Source: APXvYqz/NSlwXDwD1FSYB3B0RNtT5eSDGtgnWZ8jB79vcRL1alVulTnaTvMTW499dFDxjn3wmbK9rNyS966CrLTJZTk= X-Received: by 2002:a5e:8b44:: with SMTP id z4mr11618079iom.271.1578901274694; Sun, 12 Jan 2020 23:41:14 -0800 (PST) MIME-Version: 1.0 References: <20191210120844.50017-1-ndabilpuram@marvell.com> In-Reply-To: <20191210120844.50017-1-ndabilpuram@marvell.com> From: Jerin Jacob Date: Mon, 13 Jan 2020 13:10:58 +0530 Message-ID: To: Nithin Dabilpuram , Ferruh Yigit Cc: Jerin Jacob , Kiran Kumar K , dpdk-dev , Andrew Pinski Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: perf improvement to rx vector func 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" On Tue, Dec 10, 2019 at 5:39 PM Nithin Dabilpuram wrote: > > From: Jerin Jacob > > Use scalar loads instead of vector loads for fields > that don't need any vector operations. > > Signed-off-by: Andrew Pinski > Signed-off-by: Jerin Jacob > Signed-off-by: Nithin Dabilpuram Applied to dpdk-next-net-mrvl/master. Thanks > --- > drivers/net/octeontx2/otx2_rx.c | 48 ++++++++++++++++++++--------------------- > 1 file changed, 24 insertions(+), 24 deletions(-) > > diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c > index 48565db..db4a221 100644 > --- a/drivers/net/octeontx2/otx2_rx.c > +++ b/drivers/net/octeontx2/otx2_rx.c > @@ -184,17 +184,21 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts, > f3 = vqtbl1q_u8(cq3_w8, shuf_msk); > > /* Load CQE word0 and word 1 */ > - uint64x2_t cq0_w0 = vld1q_u64((uint64_t *)(cq0 + CQE_SZ(0))); > - uint64x2_t cq1_w0 = vld1q_u64((uint64_t *)(cq0 + CQE_SZ(1))); > - uint64x2_t cq2_w0 = vld1q_u64((uint64_t *)(cq0 + CQE_SZ(2))); > - uint64x2_t cq3_w0 = vld1q_u64((uint64_t *)(cq0 + CQE_SZ(3))); > + uint64_t cq0_w0 = ((uint64_t *)(cq0 + CQE_SZ(0)))[0]; > + uint64_t cq0_w1 = ((uint64_t *)(cq0 + CQE_SZ(0)))[1]; > + uint64_t cq1_w0 = ((uint64_t *)(cq0 + CQE_SZ(1)))[0]; > + uint64_t cq1_w1 = ((uint64_t *)(cq0 + CQE_SZ(1)))[1]; > + uint64_t cq2_w0 = ((uint64_t *)(cq0 + CQE_SZ(2)))[0]; > + uint64_t cq2_w1 = ((uint64_t *)(cq0 + CQE_SZ(2)))[1]; > + uint64_t cq3_w0 = ((uint64_t *)(cq0 + CQE_SZ(3)))[0]; > + uint64_t cq3_w1 = ((uint64_t *)(cq0 + CQE_SZ(3)))[1]; > > if (flags & NIX_RX_OFFLOAD_RSS_F) { > /* Fill rss in the rx_descriptor_fields1 */ > - f0 = vsetq_lane_u32(vgetq_lane_u32(cq0_w0, 0), f0, 3); > - f1 = vsetq_lane_u32(vgetq_lane_u32(cq1_w0, 0), f1, 3); > - f2 = vsetq_lane_u32(vgetq_lane_u32(cq2_w0, 0), f2, 3); > - f3 = vsetq_lane_u32(vgetq_lane_u32(cq3_w0, 0), f3, 3); > + f0 = vsetq_lane_u32(cq0_w0, f0, 3); > + f1 = vsetq_lane_u32(cq1_w0, f1, 3); > + f2 = vsetq_lane_u32(cq2_w0, f2, 3); > + f3 = vsetq_lane_u32(cq3_w0, f3, 3); > ol_flags0 = PKT_RX_RSS_HASH; > ol_flags1 = PKT_RX_RSS_HASH; > ol_flags2 = PKT_RX_RSS_HASH; > @@ -206,25 +210,21 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts, > > if (flags & NIX_RX_OFFLOAD_PTYPE_F) { > /* Fill packet_type in the rx_descriptor_fields1 */ > - f0 = vsetq_lane_u32(nix_ptype_get(lookup_mem, > - vgetq_lane_u64(cq0_w0, 1)), f0, 0); > - f1 = vsetq_lane_u32(nix_ptype_get(lookup_mem, > - vgetq_lane_u64(cq1_w0, 1)), f1, 0); > - f2 = vsetq_lane_u32(nix_ptype_get(lookup_mem, > - vgetq_lane_u64(cq2_w0, 1)), f2, 0); > - f3 = vsetq_lane_u32(nix_ptype_get(lookup_mem, > - vgetq_lane_u64(cq3_w0, 1)), f3, 0); > + f0 = vsetq_lane_u32(nix_ptype_get(lookup_mem, cq0_w1), > + f0, 0); > + f1 = vsetq_lane_u32(nix_ptype_get(lookup_mem, cq1_w1), > + f1, 0); > + f2 = vsetq_lane_u32(nix_ptype_get(lookup_mem, cq2_w1), > + f2, 0); > + f3 = vsetq_lane_u32(nix_ptype_get(lookup_mem, cq3_w1), > + f3, 0); > } > > if (flags & NIX_RX_OFFLOAD_CHECKSUM_F) { > - ol_flags0 |= nix_rx_olflags_get(lookup_mem, > - vgetq_lane_u64(cq0_w0, 1)); > - ol_flags1 |= nix_rx_olflags_get(lookup_mem, > - vgetq_lane_u64(cq1_w0, 1)); > - ol_flags2 |= nix_rx_olflags_get(lookup_mem, > - vgetq_lane_u64(cq2_w0, 1)); > - ol_flags3 |= nix_rx_olflags_get(lookup_mem, > - vgetq_lane_u64(cq3_w0, 1)); > + ol_flags0 |= nix_rx_olflags_get(lookup_mem, cq0_w1); > + ol_flags1 |= nix_rx_olflags_get(lookup_mem, cq1_w1); > + ol_flags2 |= nix_rx_olflags_get(lookup_mem, cq2_w1); > + ol_flags3 |= nix_rx_olflags_get(lookup_mem, cq3_w1); > } > > if (flags & NIX_RX_OFFLOAD_VLAN_STRIP_F) { > -- > 2.8.4 >