From patchwork Mon Mar 2 14:32:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184067 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2170444ile; Mon, 2 Mar 2020 01:01:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vuEup6nyNEfms+4hctFwiish2QmAbxDQ3xnNYzR0TML23e6EsjYAVSXuCQQtPsvxOpztpoN X-Received: by 2002:a17:906:d97a:: with SMTP id rp26mr4218517ejb.141.1583139684410; Mon, 02 Mar 2020 01:01:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583139684; cv=none; d=google.com; s=arc-20160816; b=X8TZIFCFXsCcXv0/0TvOU5L8L2Vc7piFYXnYYmItMCXQSGnOx0pHx89v4M4azUnkZr Jup/qtDXsaC2N1SvByTpkhGExIfP+DnaMsIoG3lCKak8pLiqF1G7YCdnYj8uDwA3Lj1O FsArznAjDe33TqrqqTkKto17HVCvVpt9uoaOBN2jWSIe8GqzbudHGKr1QEVHwTc7cPs3 qbfao7STpid8TvVeQCP7aDq0qhT+WI/KEV9xxIXpGQfRLlkuzZ7LOnQQNCa7rvA/oAsV CruqVuva75E7ljNonRbufTUgB791WBCza4gd80nHWKQnfqFBfMwk8n7JucEYxpocuKW4 9iRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=5gRk83cLnKfH6+r253XNHxbR2oCCew+H3DxW1dID5PI=; b=KF+2Kj9L1HO1GAZy5BH+JMbdvwCIkof1/QQoPW9M6ruwzNpi0SkoaCCv3wqg6D0Y0/ M+9i0MzScnLp2bI3yOqiaYm63bUIQ3zPtwSox4skaKCd7dAG+OHrkCvT98l6n65iC9D2 9u3ERoQOZTZn9o4VgNrJJdZt8suImRbuDQ9SDfcKnD8pUX4eIKl3DzsvLXz5k6OPjN1b JC9hg3E0qiPqEPADa4GZqQJXKnXS2Lw0DuSkBbm3HE3Z4awa++chLcSlrTiD0IgP8dfa 83I6SML8Beod2Bd2k8JawlWvFZZMVo94Znn8KskSHyPB172b0lGfaSAyKpzsqPshv1Qy LUKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id j10si6503394edq.384.2020.03.02.01.01.24; Mon, 02 Mar 2020 01:01:24 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E633B1C07D; Mon, 2 Mar 2020 10:00:24 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 06CE51C029 for ; Mon, 2 Mar 2020 10:00:19 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DF9901A0FAA; Mon, 2 Mar 2020 10:00:18 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6A2DE1A100E; Mon, 2 Mar 2020 10:00:16 +0100 (CET) Received: from bf-netperf1.ap.com (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2DC7C40299; Mon, 2 Mar 2020 17:00:13 +0800 (SGT) From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, g.singh@nxp.com, Alex Marginean Date: Mon, 2 Mar 2020 20:02:05 +0530 Message-Id: <20200302143209.11854-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302143209.11854-1-hemant.agrawal@nxp.com> References: <20200302143209.11854-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 06/10] net/enetc: cache align enetc bdr structure 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" From: Alex Marginean Reorder the members of the structure so that the ones used on datapath fit in a single cache line, to slightly reduce pressure on cache and miss rate. Signed-off-by: Alex Marginean --- drivers/net/enetc/enetc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h index 8c830a5c0..14ef3bc18 100644 --- a/drivers/net/enetc/enetc.h +++ b/drivers/net/enetc/enetc.h @@ -53,23 +53,23 @@ struct enetc_swbd { }; struct enetc_bdr { - struct rte_eth_dev *ndev; - struct rte_mempool *mb_pool; /* mbuf pool to populate RX ring. */ void *bd_base; /* points to Rx or Tx BD ring */ + struct enetc_swbd *q_swbd; union { void *tcir; void *rcir; }; - uint16_t index; int bd_count; /* # of BDs */ int next_to_use; int next_to_clean; - struct enetc_swbd *q_swbd; + uint16_t index; + uint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */ union { void *tcisr; /* Tx */ int next_to_alloc; /* Rx */ }; - uint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */ + struct rte_mempool *mb_pool; /* mbuf pool to populate RX ring. */ + struct rte_eth_dev *ndev; }; /*