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 88810A09E4; Fri, 29 Jan 2021 23:45:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FFA52400F8; Fri, 29 Jan 2021 23:45:15 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id C4CA640699 for ; Fri, 29 Jan 2021 23:45:14 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id e19so7131587pfh.6 for ; Fri, 29 Jan 2021 14:45:14 -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=RM/vNljZgZ/++4KUDvhxCRqVjQytvvOkjdxVyZHSr74=; b=ribDY3JA3FcwYZ/F6pxTRa+OUkopXopPUB5/aKU3UH2DS5c00o0zivpYS07KW82qDQ eTVDh6f4f3SikH+184+9uRL4kGubdWsS8C9amkCSzpW7qgIBmWFWuz8V2t8ivRvRWuKF D2W1NnH4tT32qfCepPB4ne1qPxITzFXdeNb2z1dHQ5PAIj+IFeAeqaigb2Pb/95tfkpa BuLmuR/iJtjULKcUYJTrBguz29+WLJfxFKOcRXUlXmot5d2yf9p3t/Bt3+IUQY4AvX5p sE+Pzr2hoWgGoTD9eCsG7HXbna9ZlF0Rpl4KnuCUwOqX9BV8hXtttOWzKstdo544zebE cZ2Q== 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=RM/vNljZgZ/++4KUDvhxCRqVjQytvvOkjdxVyZHSr74=; b=Dcf0zBDHtV3cLPtFd52kdsDNO0IkG+wpi0Ip8NlrhY2XPuI7wzMKy6KrqR91TCUKW/ wHIX4G1ORiPnyxthg/ee2SqnnLJhBPUEPqPXhT88R5mU+1QA2iRt/NBGag3AgsR0HfsH BMaxTzloQmXxGm3gL2QTUVFp6Q4e/va/+QPqJyDaPiVZTytuMZi9HmT/kPSNJ2xXAdMf +xsQUH1a6WZeEez4jmpxZSsxzx6fqLCUf4X6azK3cxXZf4O78JHnPmVnu0qGlwvQqap6 rLzNbiq7rVs/3cmQRBRORwjlC6ldD6gZekfrLvfSLwaTqRAdimleMtNIkDL6GC4fz5+i 13+g== X-Gm-Message-State: AOAM531YE8zXtiLgCsal8up3GvR5Pj3nUUcbJz/4huKZA4t9uhuKZBpM VCYPpVXpIyUkiESVJwjGYrQFAfXSn+491A== X-Google-Smtp-Source: ABdhPJxI6I8QAtAYtmiJaGKBBlOG9Iq45APHgjxv/I/5rtlnNe+neyBjQoDg6nUCYMeW+7bNwkSdyQ== X-Received: by 2002:a63:f953:: with SMTP id q19mr6739158pgk.120.1611960313779; Fri, 29 Jan 2021 14:45:13 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id i36sm10561557pgi.81.2021.01.29.14.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 14:45:13 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Fri, 29 Jan 2021 14:44:34 -0800 Message-Id: <20210129224434.71536-3-aboyer@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210129224434.71536-1-aboyer@pensando.io> References: <20210129224434.71536-1-aboyer@pensando.io> In-Reply-To: <20210118203508.1332-7-aboyer@pensando.io> References: <20210118203508.1332-7-aboyer@pensando.io> Subject: [dpdk-dev] [PATCH v2 6/13] net/ionic: clean up Tx queue version support 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" The ionic PMD only supports Tx queue version 1 or greater. Version 1 introduced a new SGL format with support for more fragments per descriptor. Add release notes and an explanation to the docs. Signed-off-by: Andrew Boyer --- doc/guides/nics/ionic.rst | 4 ++++ doc/guides/rel_notes/release_21_02.rst | 11 +++++++++++ drivers/net/ionic/ionic_dev.h | 2 +- drivers/net/ionic/ionic_ethdev.c | 8 ++++---- drivers/net/ionic/ionic_lif.c | 7 ++++++- drivers/net/ionic/ionic_rxtx.c | 8 ++++---- 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst index 3b93592c39..0c6147983f 100644 --- a/doc/guides/nics/ionic.rst +++ b/doc/guides/nics/ionic.rst @@ -25,6 +25,10 @@ on the host, check for the PCI devices: b5:00.0 Ethernet controller: Device 1dd8:1002 b6:00.0 Ethernet controller: Device 1dd8:1002 +Firmware Support +---------------- + +The ionic PMD requires firmware which supports 16 segment transmit SGLs. This support was added prior to version 1.0. For help upgrading older versions, please contact Pensando support. Building DPDK ------------- diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 23dcb370be..76aaf8cbf9 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -138,6 +138,17 @@ New Features * Added support for aes-cbc sha256-128-hmac cipher combination in OCTEON TX2 crypto PMD lookaside protocol offload for IPsec. +* **Updated the Pensando ionic driver.** + + Updated the Pensando ionic driver with new features and improvements, including: + + * Fixed bugs related to link autonegotiation. + * Fixed bugs related to port start/stop and queue start/stop. + * Added support for probing the supported queue versions. Note that + extremely old (pre-1.0) firmware will no longer be usable with the PMD. + * Removed unused code. + * Reduced device startup time. + Removed Items ------------- diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index e13b6c82cc..bacbe3f053 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -107,7 +107,7 @@ static inline void ionic_struct_size_checks(void) /* I/O */ RTE_BUILD_BUG_ON(sizeof(struct ionic_txq_desc) != 16); - RTE_BUILD_BUG_ON(sizeof(struct ionic_txq_sg_desc) != 128); + RTE_BUILD_BUG_ON(sizeof(struct ionic_txq_sg_desc_v1) != 256); RTE_BUILD_BUG_ON(sizeof(struct ionic_txq_comp) != 16); RTE_BUILD_BUG_ON(sizeof(struct ionic_rxq_desc) != 16); diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 747082a263..83c9dd690a 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -70,12 +70,12 @@ static const struct rte_eth_desc_lim rx_desc_lim = { .nb_align = 1, }; -static const struct rte_eth_desc_lim tx_desc_lim = { +static const struct rte_eth_desc_lim tx_desc_lim_v1 = { .nb_max = IONIC_MAX_RING_DESC, .nb_min = IONIC_MIN_RING_DESC, .nb_align = 1, - .nb_seg_max = IONIC_TX_MAX_SG_ELEMS, - .nb_mtu_seg_max = IONIC_TX_MAX_SG_ELEMS, + .nb_seg_max = IONIC_TX_MAX_SG_ELEMS_V1, + .nb_mtu_seg_max = IONIC_TX_MAX_SG_ELEMS_V1, }; static const struct eth_dev_ops ionic_eth_dev_ops = { @@ -440,7 +440,7 @@ ionic_dev_info_get(struct rte_eth_dev *eth_dev, 0; dev_info->rx_desc_lim = rx_desc_lim; - dev_info->tx_desc_lim = tx_desc_lim; + dev_info->tx_desc_lim = tx_desc_lim_v1; /* Driver-preferred Rx/Tx parameters */ dev_info->default_rxportconf.burst_size = 32; diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 8dd49b6628..2a6c494c9d 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -761,7 +761,7 @@ ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t index, uint16_t ntxq_descs, ntxq_descs, sizeof(struct ionic_txq_desc), sizeof(struct ionic_txq_comp), - sizeof(struct ionic_txq_sg_desc), + sizeof(struct ionic_txq_sg_desc_v1), &lif->txqcqs[index]); if (err) return err; @@ -925,6 +925,11 @@ ionic_lif_alloc(struct ionic_lif *lif) ionic_lif_queue_identify(lif); + if (lif->qtype_info[IONIC_QTYPE_TXQ].version < 1) { + IONIC_PRINT(ERR, "FW too old, please upgrade"); + return -ENXIO; + } + IONIC_PRINT(DEBUG, "Allocating Lif Info"); rte_spinlock_init(&lif->adminq_lock); diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index c8191e6c01..b8b3364d11 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -317,9 +317,9 @@ static struct ionic_txq_desc * ionic_tx_tso_next(struct ionic_queue *q, struct ionic_txq_sg_elem **elem) { struct ionic_txq_desc *desc_base = q->base; - struct ionic_txq_sg_desc *sg_desc_base = q->sg_base; + struct ionic_txq_sg_desc_v1 *sg_desc_base = q->sg_base; struct ionic_txq_desc *desc = &desc_base[q->head_idx]; - struct ionic_txq_sg_desc *sg_desc = &sg_desc_base[q->head_idx]; + struct ionic_txq_sg_desc_v1 *sg_desc = &sg_desc_base[q->head_idx]; *elem = sg_desc->elems; return desc; @@ -456,9 +456,9 @@ ionic_tx(struct ionic_qcq *txq, struct rte_mbuf *txm, { struct ionic_queue *q = &txq->q; struct ionic_txq_desc *desc_base = q->base; - struct ionic_txq_sg_desc *sg_desc_base = q->sg_base; + struct ionic_txq_sg_desc_v1 *sg_desc_base = q->sg_base; struct ionic_txq_desc *desc = &desc_base[q->head_idx]; - struct ionic_txq_sg_desc *sg_desc = &sg_desc_base[q->head_idx]; + struct ionic_txq_sg_desc_v1 *sg_desc = &sg_desc_base[q->head_idx]; struct ionic_txq_sg_elem *elem = sg_desc->elems; struct ionic_tx_stats *stats = IONIC_Q_TO_TX_STATS(q); struct rte_mbuf *txm_seg; -- 2.17.1