From patchwork Thu Feb 4 19:58:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Boyer X-Patchwork-Id: 87759 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 8BA30A0524; Thu, 4 Feb 2021 20:59:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 413072407F9; Thu, 4 Feb 2021 20:59:27 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id D22522407E9 for ; Thu, 4 Feb 2021 20:59:26 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id o20so2807422pfu.0 for ; Thu, 04 Feb 2021 11:59:26 -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=PPrbELM9FeIs9Yww8bSF4w+TNFLNEjs5fKy69X1FBfM=; b=TtSuSNVK/rxmh1ZxgmugFxKHVMpEcNMe/HkmKY707qOmKF2s7Cl0JtnsMr6L/Rq+5n 67q0GWUSyTOAHh6eW49K6vHxQ/2uGVycIlTXCwfwWpVUcmpFRi3woGEM4q3c1igHgXgd Xn2WdBgN6p6sAXhXo0svP/BRYkWwcx9BtBUnCf5OFyd5A+4+sMzNi0sPddtoHDq1dx2/ PpE4c+Thh0ZMQ+OAyTLUob5RRFDRiakYWxmIkYJOyeYh67jxQrf89ZnBGRNGYvdaJ9XZ TUc9KBQKqzGtD0YKOE+hZc5m+td/JflyrBSGsHhG2bjfF1wghfh0Do22iYRVtBNjrc9G DUuA== 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=PPrbELM9FeIs9Yww8bSF4w+TNFLNEjs5fKy69X1FBfM=; b=VizlVB8pFnQAjEqsxiCIo9GjfVf2nFo2FGZWwmXijncoRZOUv4X3gxn78xsPOCX3FQ cbIAvmsCFzCb9iBOJvC0mi4vweW0X6dwHGWon600qmu/5PflOqpxMMRIul2ryRHmEVo8 EyNGMEUOiVckTF8PAEuoy9Ygir1asQAxBcI7qIFJRCo9d3Z31kIJK6M4K1oaGl8GrJ69 eOVZQXQdIauNOVbM0Gm0tQJWbzu9Hmgg+GgM/7WNA414trvcAbn1GLCGXmyhedWhmgrn Wq/86y2Gf6dci8Yno5bWlIQ8m/3abYhym3hqRcf8zCcf5emtWGRIyyWsfoZLtJTI+aQP 8mWA== X-Gm-Message-State: AOAM5333LyC8Hemm6BDDEHyA/OY0r+kZ/1SJVYI5UZCH4URbEXHv7CNI 6by9qCU93Yd2XoilpR83lXP8+aOuT5kBXw== X-Google-Smtp-Source: ABdhPJzeEfrhV/F7Xoi3QO6B+IZJA3DGmd0i1cngtB/ZIUCi4ogvmL+j0kSag4SRtAMPquRZxcFU6w== X-Received: by 2002:a62:445:0:b029:19c:162b:bbef with SMTP id 66-20020a6204450000b029019c162bbbefmr1104827pfe.40.1612468765664; Thu, 04 Feb 2021 11:59:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:59:25 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Thu, 4 Feb 2021 11:58:43 -0800 Message-Id: <20210204195853.13411-5-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 04/14] 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 1a43ccc61f..511d0bc7aa 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -138,7 +138,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; @@ -222,7 +221,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 81c9ff8ba8..107b1cb091 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);