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 7D175A2F63 for ; Fri, 4 Oct 2019 05:49:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A3E761C128; Fri, 4 Oct 2019 05:49:16 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 6982D1C120 for ; Fri, 4 Oct 2019 05:49:12 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 38B9030C2C3; Thu, 3 Oct 2019 20:47:52 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 38B9030C2C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570160872; bh=mnsicfqzg600p1pZVd2hew8dkSLRT+V0lq5z+SRPeJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngz/tC+qw3d90LLChZAM74JQmfEtwPNGbN6NGARNZWMAdvQ/WyBxUthTeOHhfweAA 0Fm0w12sNBLM++ievTv5QF72FxbIwJh4Tuh5JTAtWDBtbzzDbr7GRRhRWMnAATCZPU XVTJeIJcW8hzYnNxCYNLyajWtCFAxtQOaFJbUlHc= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id B5F8514008C; Thu, 3 Oct 2019 20:49:07 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson , Ajit Kumar Khaparde Date: Thu, 3 Oct 2019 20:48:56 -0700 Message-Id: <20191004034903.85233-3-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191004034903.85233-1-ajit.khaparde@broadcom.com> References: <20191004034903.85233-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/9] net/bnxt: fix ring alignment for thor-based adapters 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: Lance Richardson When using transmit/receive queue sizes smaller than 256, alignment requirements are not being met for Thor-based adapters. Fix by forcing memory addresses used for transmit/receive/aggregation ring allocations to be on 4K boundaries. Fixes: f8168ca0e690 ("net/bnxt: support thor controller") Signed-off-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ring.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index a3e5a68714..4662e94132 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -162,18 +162,21 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, int nq_ring_len = BNXT_CHIP_THOR(bp) ? cp_ring_len : 0; int tx_ring_start = nq_ring_start + nq_ring_len; + tx_ring_start = RTE_ALIGN(tx_ring_start, 4096); int tx_ring_len = tx_ring_info ? RTE_CACHE_LINE_ROUNDUP(tx_ring_info->tx_ring_struct->ring_size * sizeof(struct tx_bd_long)) : 0; tx_ring_len = RTE_ALIGN(tx_ring_len, 4096); int rx_ring_start = tx_ring_start + tx_ring_len; + rx_ring_start = RTE_ALIGN(rx_ring_start, 4096); int rx_ring_len = rx_ring_info ? RTE_CACHE_LINE_ROUNDUP(rx_ring_info->rx_ring_struct->ring_size * sizeof(struct rx_prod_pkt_bd)) : 0; rx_ring_len = RTE_ALIGN(rx_ring_len, 4096); int ag_ring_start = rx_ring_start + rx_ring_len; + ag_ring_start = RTE_ALIGN(ag_ring_start, 4096); int ag_ring_len = rx_ring_len * AGG_RING_SIZE_FACTOR; ag_ring_len = RTE_ALIGN(ag_ring_len, 4096); -- 2.20.1 (Apple Git-117)