From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 835A9A0524; Thu, 4 Feb 2021 21:00:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0E80240818; Thu, 4 Feb 2021 20:59:35 +0100 (CET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id CB75D240804 for ; Thu, 4 Feb 2021 20:59:34 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id o63so2874485pgo.6 for ; Thu, 04 Feb 2021 11:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wK+zrvH68Xo1JmlCYpS0dNpT8HzExAqH76/8kNBDBdw=; b=hfqQq/wTPj9OKyxBqQdAzqFfsg1qR63znv0THaAqmSBXXNxcLJWGCfjzodfkbVu8Zo H/NMy46+s//Wl5HpWcCbrZ5UtKSc+VCywC1v15uk1MQWM7ppqJMhAJ6xlWeWqYHXtcz+ MKDluTz5E4iMd0yKT+i6d5R02iq1b/qHYWO2oQ9R5UgN3/IkVWoX7SCMcNeCrMo7o2N+ 8N6nLrwKdW59Eritlyqd3cQ9X1Vmnca931O/irA4fh7EAAbRz8hVjZ5SiQIg1EbT3EWm Y/FJuaHQYsZY4eIz788w77cMPrtvlJJ0kGC9IT/Bp6p1/V97r1e2I8qoBvAOW5GW8Rff e1cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wK+zrvH68Xo1JmlCYpS0dNpT8HzExAqH76/8kNBDBdw=; b=A50iqXOtyi2pVadYMsREJU/e6gaoCuaevrZpmIZEUAtEyrrJlOlJaLS0LTgGfVxFgV e11MM3NTRqIVwXbu9y7I+fSuTVQd5ORCgTnkUudwFpjhRrpDnGD0JYK62q+r7Z6e10+2 fTkN6NzCWLT5hcDTBa8/itK0Q55eXqSUemdm9v7Srei6eT3VL/ckUC/wNRZuYplH3U4V P/wgCJZ3xqof5QE/yVVLL3z2WNV8x74Dxel3HmEkEocN5Uy3Xz60RY3vbnU78KxiwRVm C3uR1hWKvvYYGG1jOvj8fI+/x04R1M7KXU1mMIngg5lVtQ8tl4rbe6Yljnt7iR6TTDXh AFGQ== X-Gm-Message-State: AOAM5305qoAwMwDBilGuE11L5AodBsHoGaqucVeks/w0vNAeLWZQ53MG 0LEm2i6yEMZEQBsMYuiqr1HsdY2Lg39CLQ== X-Google-Smtp-Source: ABdhPJz/leVOYimzZYZCImMGT8HokaUeajmkkExltueVmy6BqklqIuA9UNMkftdT41GqZg8GyY/sgQ== X-Received: by 2002:a63:f703:: with SMTP id x3mr657061pgh.66.1612468773881; Thu, 04 Feb 2021 11:59:33 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id r14sm7757915pgi.27.2021.02.04.11.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:59:33 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Thu, 4 Feb 2021 11:58:47 -0800 Message-Id: <20210204195853.13411-9-aboyer@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210204195853.13411-1-aboyer@pensando.io> References: <20210204195853.13411-1-aboyer@pensando.io> Subject: [dpdk-dev] [PATCH 08/14] net/ionic: use the socket id passed in for Rx and Tx queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Pipe the value from the queue setup routines through to ionic_qcq_alloc(). Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.c | 10 +++++++--- drivers/net/ionic/ionic_lif.h | 10 ++++++---- drivers/net/ionic/ionic_rxtx.c | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 87579a09e5..dd79068948 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -588,6 +588,7 @@ static int ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type, size_t struct_size, + uint32_t socket_id, uint32_t index, const char *type_name, uint16_t flags, @@ -603,7 +604,6 @@ ionic_qcq_alloc(struct ionic_lif *lif, rte_iova_t q_base_pa = 0; rte_iova_t cq_base_pa = 0; rte_iova_t sg_base_pa = 0; - uint32_t socket_id = rte_socket_id(); int err; *qcq = NULL; @@ -721,7 +721,7 @@ ionic_qcq_free(struct ionic_qcq *qcq) } int -ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t index, +ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, uint32_t index, uint16_t nrxq_descs, struct ionic_rx_qcq **rxq_out) { struct ionic_rx_qcq *rxq; @@ -732,6 +732,7 @@ ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t index, err = ionic_qcq_alloc(lif, IONIC_QTYPE_RXQ, sizeof(struct ionic_rx_qcq), + socket_id, index, "rx", flags, @@ -752,7 +753,7 @@ ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t index, } int -ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t index, +ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, uint32_t index, uint16_t ntxq_descs, struct ionic_tx_qcq **txq_out) { struct ionic_tx_qcq *txq; @@ -763,6 +764,7 @@ ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t index, err = ionic_qcq_alloc(lif, IONIC_QTYPE_TXQ, sizeof(struct ionic_tx_qcq), + socket_id, index, "tx", flags, @@ -791,6 +793,7 @@ ionic_admin_qcq_alloc(struct ionic_lif *lif) err = ionic_qcq_alloc(lif, IONIC_QTYPE_ADMINQ, sizeof(struct ionic_admin_qcq), + rte_socket_id(), 0, "admin", flags, @@ -816,6 +819,7 @@ ionic_notify_qcq_alloc(struct ionic_lif *lif) err = ionic_qcq_alloc(lif, IONIC_QTYPE_NOTIFYQ, sizeof(struct ionic_notify_qcq), + rte_socket_id(), 0, "notify", flags, diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index a8243ebf21..ba1471b6e9 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -196,10 +196,12 @@ int ionic_dev_promiscuous_disable(struct rte_eth_dev *dev); int ionic_dev_allmulticast_enable(struct rte_eth_dev *dev); int ionic_dev_allmulticast_disable(struct rte_eth_dev *dev); -int ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t index, - uint16_t nrxq_descs, struct ionic_rx_qcq **qcq_out); -int ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t index, - uint16_t ntxq_descs, struct ionic_tx_qcq **qcq_out); +int ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, + uint32_t index, uint16_t nrxq_descs, + struct ionic_rx_qcq **qcq_out); +int ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, + uint32_t index, uint16_t ntxq_descs, + struct ionic_tx_qcq **qcq_out); void ionic_qcq_free(struct ionic_qcq *qcq); int ionic_qcq_enable(struct ionic_qcq *qcq); diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 102cfa4331..0565cea603 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -191,7 +191,7 @@ ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id, eth_dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; - err = ionic_tx_qcq_alloc(lif, tx_queue_id, nb_desc, &txq); + err = ionic_tx_qcq_alloc(lif, socket_id, tx_queue_id, nb_desc, &txq); if (err) { IONIC_PRINT(DEBUG, "Queue allocation failure"); return -EINVAL; @@ -718,7 +718,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, eth_dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; - err = ionic_rx_qcq_alloc(lif, rx_queue_id, nb_desc, + err = ionic_rx_qcq_alloc(lif, socket_id, rx_queue_id, nb_desc, &rxq); if (err) { IONIC_PRINT(ERR, "Queue %d allocation failure", rx_queue_id); -- 2.17.1