From patchwork Tue Feb 16 20:35:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Boyer X-Patchwork-Id: 87944 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82219A054D; Tue, 16 Feb 2021 21:36:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B0641607BA; Tue, 16 Feb 2021 21:36:01 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 1658F1607AB for ; Tue, 16 Feb 2021 21:35:58 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id a4so5408329pgc.11 for ; Tue, 16 Feb 2021 12:35:58 -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 :in-reply-to:references; bh=oWRmMeNVPuwHKhe9WEpsHqNmJ+4OczoIUTuQ3eLv3N4=; b=tkZ35ZEUVo0yPNjnE0YXEGoshghs1qqZ5E69iEGfs7fDyN78QXHM2J/sJMJTqx1+u3 B79r822GQTFlZ6t4PLVZrYdXzUqs7TU2fMTkAyJ91b+440i19mgbI9Axzjs0bif2pYpR BoGO5bxp0TDtIwo3N0bALBilKLPNdXcV97fXWUKbSVgWc3ta10bZUaKZYowHuEn8SBJQ Nd+R7a8kld5RgOIK04BCP6qvCALIiwbY1fE76tbtn+WheC1TbncqvOtaxaNJW0YBrEHf HorQaqqwjNYiATk4Ev5t5dYFUYyi80XfJJpyvJwwDrXofE+UQ4QTecppffdrBE3VhF2G +Mzw== 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:in-reply-to:references; bh=oWRmMeNVPuwHKhe9WEpsHqNmJ+4OczoIUTuQ3eLv3N4=; b=EpyxkrHAIxOeKROnrT1Ru5lPJ2+au8/VtGVjwwSIgfCXnkxieQ3csq8sxYrKvqCBp9 JbkL/97SIP6oBpYuQIj/Hp85ZRDuh3erpkaeRCgK6Oi355u+SHQ9y+YY/VeanSmnhbXf gWgVlsZ5/Gt8OQtNe2mJSixZRSw1eLGQXUcmx8GIvs6NJEs3AlIgkOFwOmHE6icixheF fb45MDmZnpQC+Rt6tEn+ZrbZJOtlLgV8fikSjUr5iHMoA7nZnNum8WO5/NDExBCJfxqt R4t/m03+H9eCaqBd0cLRKvjCt9G41MVm/pR4c2dxrt31UqzlrmXel+TYvldbQDDeI4io lHuQ== X-Gm-Message-State: AOAM5301By4Thw9tM1BGQ8PV7sX4KOhEZBTXCQIjpmCUwpN8ftAN5EMC uSWX8cppskDyCTXPcKHEu8aipDRsDUP5KA== X-Google-Smtp-Source: ABdhPJxpM1/c55ulqEof7IIrgQQq1lpd3JYZhQxiUx65Mvw3xPmOjfeEzE9GGPG2+z6roCu6klSdcA== X-Received: by 2002:a63:2306:: with SMTP id j6mr20764364pgj.187.1613507757140; Tue, 16 Feb 2021 12:35:57 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id u17sm11371pgh.72.2021.02.16.12.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 12:35:56 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Tue, 16 Feb 2021 12:35:30 -0800 Message-Id: <20210216203540.29290-6-aboyer@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210216203540.29290-1-aboyer@pensando.io> References: <20210216203540.29290-1-aboyer@pensando.io> In-Reply-To: <20210204195853.13411-1-aboyer@pensando.io> References: <20210204195853.13411-1-aboyer@pensando.io> Subject: [dpdk-dev] [PATCH v2 05/15] net/ionic: remove unused field from queue structure 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" This will conserve resources. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_dev.c | 6 ------ drivers/net/ionic/ionic_dev.h | 2 -- drivers/net/ionic/ionic_lif.c | 1 - drivers/net/ionic/ionic_rxtx.c | 9 +++++---- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c index 74ac2e67a5..97fb8acf9b 100644 --- a/drivers/net/ionic/ionic_dev.c +++ b/drivers/net/ionic/ionic_dev.c @@ -383,12 +383,6 @@ ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa) cq->base_pa = base_pa; } -void -ionic_cq_bind(struct ionic_cq *cq, struct ionic_queue *q) -{ - q->bound_cq = cq; -} - uint32_t ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do, ionic_cq_cb cb, void *cb_arg) diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index c51c2a9ae5..a777695d64 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -137,7 +137,6 @@ struct ionic_dev { struct ionic_queue { struct ionic_dev *idev; struct ionic_lif *lif; - struct ionic_cq *bound_cq; uint32_t index; uint32_t type; uint32_t hw_index; @@ -221,7 +220,6 @@ struct ionic_doorbell __iomem *ionic_db_map(struct ionic_lif *lif, int ionic_cq_init(struct ionic_cq *cq, uint16_t num_descs); void ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa); -void ionic_cq_bind(struct ionic_cq *cq, struct ionic_queue *q); typedef bool (*ionic_cq_cb)(struct ionic_cq *cq, uint32_t cq_desc_index, void *cb_arg); uint32_t ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do, diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 52bc0b178d..1ca6e050ad 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -695,7 +695,6 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type, ionic_q_map(&new->q, q_base, q_base_pa); ionic_cq_map(&new->cq, cq_base, cq_base_pa); - ionic_cq_bind(&new->cq, &new->q); *qcq = new; diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index d736e24b02..d615e5c4e1 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -741,14 +741,15 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, } static __rte_always_inline void -ionic_rx_clean(struct ionic_queue *q, +ionic_rx_clean(struct ionic_qcq *rxq, uint32_t q_desc_index, uint32_t cq_desc_index, void *service_cb_arg) { - struct ionic_rxq_comp *cq_desc_base = q->bound_cq->base; + struct ionic_queue *q = &rxq->q; + struct ionic_cq *cq = &rxq->cq; + struct ionic_rxq_comp *cq_desc_base = cq->base; struct ionic_rxq_comp *cq_desc = &cq_desc_base[cq_desc_index]; struct rte_mbuf *rxm, *rxm_seg; - struct ionic_qcq *rxq = IONIC_Q_TO_QCQ(q); uint32_t max_frame_size = rxq->lif->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len; uint64_t pkt_flags = 0; @@ -1061,7 +1062,7 @@ ionic_rxq_service(struct ionic_qcq *rxq, uint32_t work_to_do, /* q desc info */ rte_prefetch0(&q->info[q->tail_idx]); - ionic_rx_clean(q, curr_q_tail_idx, curr_cq_tail_idx, + ionic_rx_clean(rxq, curr_q_tail_idx, curr_cq_tail_idx, service_cb_arg); } while (more);