patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 01/35] net/ionic: fix up endianness for Rx and Tx handling
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
@ 2022-10-07 17:43 ` Andrew Boyer
  2022-10-07 17:43 ` [PATCH 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-07 17:43 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

These fields all need to be LE when talking to the FW.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 9f602de6a9..af2d89f9fa 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -300,18 +300,20 @@ ionic_tx_tso_post(struct ionic_queue *q, struct ionic_txq_desc *desc,
 		bool start, bool done)
 {
 	void **info;
+	uint64_t cmd;
 	uint8_t flags = 0;
 	flags |= has_vlan ? IONIC_TXQ_DESC_FLAG_VLAN : 0;
 	flags |= encap ? IONIC_TXQ_DESC_FLAG_ENCAP : 0;
 	flags |= start ? IONIC_TXQ_DESC_FLAG_TSO_SOT : 0;
 	flags |= done ? IONIC_TXQ_DESC_FLAG_TSO_EOT : 0;
 
-	desc->cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO,
+	cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO,
 		flags, nsge, addr);
-	desc->len = len;
-	desc->vlan_tci = vlan_tci;
-	desc->hdr_len = hdrlen;
-	desc->mss = mss;
+	desc->cmd = rte_cpu_to_le_64(cmd);
+	desc->len = rte_cpu_to_le_16(len);
+	desc->vlan_tci = rte_cpu_to_le_16(vlan_tci);
+	desc->hdr_len = rte_cpu_to_le_16(hdrlen);
+	desc->mss = rte_cpu_to_le_16(mss);
 
 	if (done) {
 		info = IONIC_INFO_PTR(q, q->head_idx);
@@ -423,7 +425,7 @@ ionic_tx_tso(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 				len = RTE_MIN(frag_left, left);
 				frag_left -= len;
 				elem->addr = next_addr;
-				elem->len = len;
+				elem->len = rte_cpu_to_le_16(len);
 				elem++;
 				desc_nsge++;
 			} else {
@@ -470,7 +472,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 	bool encap;
 	bool has_vlan;
 	uint64_t ol_flags = txm->ol_flags;
-	uint64_t addr;
+	uint64_t addr, cmd;
 	uint8_t opcode = IONIC_TXQ_DESC_OPCODE_CSUM_NONE;
 	uint8_t flags = 0;
 
@@ -505,9 +507,10 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 
 	addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm));
 
-	desc->cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr);
-	desc->len = txm->data_len;
-	desc->vlan_tci = txm->vlan_tci;
+	cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr);
+	desc->cmd = rte_cpu_to_le_64(cmd);
+	desc->len = rte_cpu_to_le_16(txm->data_len);
+	desc->vlan_tci = rte_cpu_to_le_16(txm->vlan_tci);
 
 	info[0] = txm;
 
@@ -515,7 +518,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 
 	txm_seg = txm->next;
 	while (txm_seg != NULL) {
-		elem->len = txm_seg->data_len;
+		elem->len = rte_cpu_to_le_16(txm_seg->data_len);
 		elem->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm_seg));
 		elem++;
 		txm_seg = txm_seg->next;
@@ -845,7 +848,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq,
 	/* Vlan Strip */
 	if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) {
 		pkt_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
-		rxm->vlan_tci = cq_desc->vlan_tci;
+		rxm->vlan_tci = rte_le_to_cpu_16(cq_desc->vlan_tci);
 	}
 
 	/* Checksum */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 02/35] net/ionic: fix up endianness for RSS
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
  2022-10-07 17:43 ` [PATCH 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
@ 2022-10-07 17:43 ` Andrew Boyer
  2022-10-07 17:43 ` [PATCH 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-07 17:43 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

This field needs to be LE when talking to the FW.

Fixes: 22e7171bc63b ("net/ionic: support RSS")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index af2d89f9fa..665d085823 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -843,7 +843,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq,
 
 	/* RSS */
 	pkt_flags |= RTE_MBUF_F_RX_RSS_HASH;
-	rxm->hash.rss = cq_desc->rss_hash;
+	rxm->hash.rss = rte_le_to_cpu_32(cq_desc->rss_hash);
 
 	/* Vlan Strip */
 	if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 03/35] net/ionic: fix to set the adapter name for logging
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
  2022-10-07 17:43 ` [PATCH 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
  2022-10-07 17:43 ` [PATCH 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
@ 2022-10-07 17:43 ` Andrew Boyer
  2022-10-07 17:43 ` [PATCH 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-07 17:43 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, stable

Otherwise the log messages will be garbled.

Fixes: 4ae96cb88fa0 ("net/ionic: do minor logging fixups")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_dev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c
index 43e9ca3de3..5439b99b2d 100644
--- a/drivers/net/ionic/ionic_dev.c
+++ b/drivers/net/ionic/ionic_dev.c
@@ -55,7 +55,10 @@ ionic_dev_setup(struct ionic_adapter *adapter)
 			ioread8(&idev->dev_info->fw_version[i]);
 	adapter->fw_version[IONIC_DEVINFO_FWVERS_BUFLEN - 1] = '\0';
 
-	IONIC_PRINT(DEBUG, "Firmware version: %s", adapter->fw_version);
+	adapter->name = adapter->pci_dev->device.name;
+
+	IONIC_PRINT(DEBUG, "%s firmware version: %s",
+		adapter->name, adapter->fw_version);
 
 	/* BAR1: doorbells */
 	bar++;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 04/35] net/ionic: fix up the Rx filter save API
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (2 preceding siblings ...)
  2022-10-07 17:43 ` [PATCH 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
@ 2022-10-07 17:43 ` Andrew Boyer
  2022-10-07 17:43 ` [PATCH 05/35] net/ionic: fix up reported error stats Andrew Boyer
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-07 17:43 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, stable

Check the match variable after copying cmd info, or else there can
be unexpected results.

Fixes: a27e0e96ab77 ("net/ionic: observe endianness in Rx filter")
Cc: andrew.boyer@amd.com
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rx_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_rx_filter.c b/drivers/net/ionic/ionic_rx_filter.c
index bf57a9fa52..4b2e907f9f 100644
--- a/drivers/net/ionic/ionic_rx_filter.c
+++ b/drivers/net/ionic/ionic_rx_filter.c
@@ -63,8 +63,8 @@ ionic_rx_filter_save(struct ionic_lif *lif, uint32_t flow_id,
 	f->flow_id = flow_id;
 	f->filter_id = rte_le_to_cpu_32(ctx->comp.rx_filter_add.filter_id);
 	f->rxq_index = rxq_index;
-	f->match = rte_le_to_cpu_16(f->cmd.match);
 	memcpy(&f->cmd, &ctx->cmd, sizeof(f->cmd));
+	f->match = rte_le_to_cpu_16(f->cmd.match);
 
 	switch (f->match) {
 	case IONIC_RX_FILTER_MATCH_VLAN:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 05/35] net/ionic: fix up reported error stats
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (3 preceding siblings ...)
  2022-10-07 17:43 ` [PATCH 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
@ 2022-10-07 17:43 ` Andrew Boyer
  2022-10-11  0:49 ` [PATCH v1 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-07 17:43 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

Report descriptor errors in ierrors instead of imissed.
Don't report rx_queue_empty or rx_queue_disabled in imissed,
since those packet errors are already included in the
rx_*_drop_packets counters.
This makes the reported stats correct.

Fixes: 3cdfd90579e7 ("net/ionic: add stats")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_lif.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 5e8fdf3893..799530f7f5 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -132,7 +132,7 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats
 
 	for (i = 0; i < lif->nrxqcqs; i++) {
 		struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats;
-		stats->imissed +=
+		stats->ierrors +=
 			rx_stats->no_cb_arg +
 			rx_stats->bad_cq_status +
 			rx_stats->no_room +
@@ -144,10 +144,8 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats
 		ls->rx_mcast_drop_packets +
 		ls->rx_bcast_drop_packets;
 
-	stats->imissed +=
-		ls->rx_queue_empty +
+	stats->ierrors +=
 		ls->rx_dma_error +
-		ls->rx_queue_disabled +
 		ls->rx_desc_fetch_error +
 		ls->rx_desc_data_error;
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 01/35] net/ionic: fix up endianness for Rx and Tx handling
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (4 preceding siblings ...)
  2022-10-07 17:43 ` [PATCH 05/35] net/ionic: fix up reported error stats Andrew Boyer
@ 2022-10-11  0:49 ` Andrew Boyer
  2022-10-11  0:49 ` [PATCH v1 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-11  0:49 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

These fields all need to be LE when talking to the FW.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 9f602de6a9..af2d89f9fa 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -300,18 +300,20 @@ ionic_tx_tso_post(struct ionic_queue *q, struct ionic_txq_desc *desc,
 		bool start, bool done)
 {
 	void **info;
+	uint64_t cmd;
 	uint8_t flags = 0;
 	flags |= has_vlan ? IONIC_TXQ_DESC_FLAG_VLAN : 0;
 	flags |= encap ? IONIC_TXQ_DESC_FLAG_ENCAP : 0;
 	flags |= start ? IONIC_TXQ_DESC_FLAG_TSO_SOT : 0;
 	flags |= done ? IONIC_TXQ_DESC_FLAG_TSO_EOT : 0;
 
-	desc->cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO,
+	cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO,
 		flags, nsge, addr);
-	desc->len = len;
-	desc->vlan_tci = vlan_tci;
-	desc->hdr_len = hdrlen;
-	desc->mss = mss;
+	desc->cmd = rte_cpu_to_le_64(cmd);
+	desc->len = rte_cpu_to_le_16(len);
+	desc->vlan_tci = rte_cpu_to_le_16(vlan_tci);
+	desc->hdr_len = rte_cpu_to_le_16(hdrlen);
+	desc->mss = rte_cpu_to_le_16(mss);
 
 	if (done) {
 		info = IONIC_INFO_PTR(q, q->head_idx);
@@ -423,7 +425,7 @@ ionic_tx_tso(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 				len = RTE_MIN(frag_left, left);
 				frag_left -= len;
 				elem->addr = next_addr;
-				elem->len = len;
+				elem->len = rte_cpu_to_le_16(len);
 				elem++;
 				desc_nsge++;
 			} else {
@@ -470,7 +472,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 	bool encap;
 	bool has_vlan;
 	uint64_t ol_flags = txm->ol_flags;
-	uint64_t addr;
+	uint64_t addr, cmd;
 	uint8_t opcode = IONIC_TXQ_DESC_OPCODE_CSUM_NONE;
 	uint8_t flags = 0;
 
@@ -505,9 +507,10 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 
 	addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm));
 
-	desc->cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr);
-	desc->len = txm->data_len;
-	desc->vlan_tci = txm->vlan_tci;
+	cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr);
+	desc->cmd = rte_cpu_to_le_64(cmd);
+	desc->len = rte_cpu_to_le_16(txm->data_len);
+	desc->vlan_tci = rte_cpu_to_le_16(txm->vlan_tci);
 
 	info[0] = txm;
 
@@ -515,7 +518,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm)
 
 	txm_seg = txm->next;
 	while (txm_seg != NULL) {
-		elem->len = txm_seg->data_len;
+		elem->len = rte_cpu_to_le_16(txm_seg->data_len);
 		elem->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm_seg));
 		elem++;
 		txm_seg = txm_seg->next;
@@ -845,7 +848,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq,
 	/* Vlan Strip */
 	if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) {
 		pkt_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
-		rxm->vlan_tci = cq_desc->vlan_tci;
+		rxm->vlan_tci = rte_le_to_cpu_16(cq_desc->vlan_tci);
 	}
 
 	/* Checksum */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 02/35] net/ionic: fix up endianness for RSS
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (5 preceding siblings ...)
  2022-10-11  0:49 ` [PATCH v1 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
@ 2022-10-11  0:49 ` Andrew Boyer
  2022-10-11  0:50 ` [PATCH v1 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-11  0:49 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

This field needs to be LE when talking to the FW.

Fixes: 22e7171bc63b ("net/ionic: support RSS")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index af2d89f9fa..665d085823 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -843,7 +843,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq,
 
 	/* RSS */
 	pkt_flags |= RTE_MBUF_F_RX_RSS_HASH;
-	rxm->hash.rss = cq_desc->rss_hash;
+	rxm->hash.rss = rte_le_to_cpu_32(cq_desc->rss_hash);
 
 	/* Vlan Strip */
 	if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 03/35] net/ionic: fix to set the adapter name for logging
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (6 preceding siblings ...)
  2022-10-11  0:49 ` [PATCH v1 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
@ 2022-10-11  0:50 ` Andrew Boyer
  2022-10-11  0:50 ` [PATCH v1 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
  2022-10-11  0:50 ` [PATCH v1 05/35] net/ionic: fix up reported error stats Andrew Boyer
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-11  0:50 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, stable

Otherwise the log messages will be garbled.

Fixes: 4ae96cb88fa0 ("net/ionic: do minor logging fixups")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_dev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c
index 43e9ca3de3..5439b99b2d 100644
--- a/drivers/net/ionic/ionic_dev.c
+++ b/drivers/net/ionic/ionic_dev.c
@@ -55,7 +55,10 @@ ionic_dev_setup(struct ionic_adapter *adapter)
 			ioread8(&idev->dev_info->fw_version[i]);
 	adapter->fw_version[IONIC_DEVINFO_FWVERS_BUFLEN - 1] = '\0';
 
-	IONIC_PRINT(DEBUG, "Firmware version: %s", adapter->fw_version);
+	adapter->name = adapter->pci_dev->device.name;
+
+	IONIC_PRINT(DEBUG, "%s firmware version: %s",
+		adapter->name, adapter->fw_version);
 
 	/* BAR1: doorbells */
 	bar++;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 04/35] net/ionic: fix up the Rx filter save API
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (7 preceding siblings ...)
  2022-10-11  0:50 ` [PATCH v1 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
@ 2022-10-11  0:50 ` Andrew Boyer
  2022-10-11  0:50 ` [PATCH v1 05/35] net/ionic: fix up reported error stats Andrew Boyer
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-11  0:50 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, stable

Check the match variable after copying cmd info, or else there can
be unexpected results.

Fixes: a27e0e96ab77 ("net/ionic: observe endianness in Rx filter")
Cc: andrew.boyer@amd.com
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rx_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ionic/ionic_rx_filter.c b/drivers/net/ionic/ionic_rx_filter.c
index bf57a9fa52..4b2e907f9f 100644
--- a/drivers/net/ionic/ionic_rx_filter.c
+++ b/drivers/net/ionic/ionic_rx_filter.c
@@ -63,8 +63,8 @@ ionic_rx_filter_save(struct ionic_lif *lif, uint32_t flow_id,
 	f->flow_id = flow_id;
 	f->filter_id = rte_le_to_cpu_32(ctx->comp.rx_filter_add.filter_id);
 	f->rxq_index = rxq_index;
-	f->match = rte_le_to_cpu_16(f->cmd.match);
 	memcpy(&f->cmd, &ctx->cmd, sizeof(f->cmd));
+	f->match = rte_le_to_cpu_16(f->cmd.match);
 
 	switch (f->match) {
 	case IONIC_RX_FILTER_MATCH_VLAN:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 05/35] net/ionic: fix up reported error stats
       [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
                   ` (8 preceding siblings ...)
  2022-10-11  0:50 ` [PATCH v1 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
@ 2022-10-11  0:50 ` Andrew Boyer
  9 siblings, 0 replies; 10+ messages in thread
From: Andrew Boyer @ 2022-10-11  0:50 UTC (permalink / raw)
  To: dev; +Cc: Andrew Boyer, cardigliano, stable

Report descriptor errors in ierrors instead of imissed.
Don't report rx_queue_empty or rx_queue_disabled in imissed,
since those packet errors are already included in the
rx_*_drop_packets counters.
This makes the reported stats correct.

Fixes: 3cdfd90579e7 ("net/ionic: add stats")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_lif.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 5e8fdf3893..799530f7f5 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -132,7 +132,7 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats
 
 	for (i = 0; i < lif->nrxqcqs; i++) {
 		struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats;
-		stats->imissed +=
+		stats->ierrors +=
 			rx_stats->no_cb_arg +
 			rx_stats->bad_cq_status +
 			rx_stats->no_room +
@@ -144,10 +144,8 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats
 		ls->rx_mcast_drop_packets +
 		ls->rx_bcast_drop_packets;
 
-	stats->imissed +=
-		ls->rx_queue_empty +
+	stats->ierrors +=
 		ls->rx_dma_error +
-		ls->rx_queue_disabled +
 		ls->rx_desc_fetch_error +
 		ls->rx_desc_data_error;
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-10-11  0:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20221007174336.54354-1-andrew.boyer@amd.com>
2022-10-07 17:43 ` [PATCH 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
2022-10-07 17:43 ` [PATCH 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
2022-10-07 17:43 ` [PATCH 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
2022-10-07 17:43 ` [PATCH 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
2022-10-07 17:43 ` [PATCH 05/35] net/ionic: fix up reported error stats Andrew Boyer
2022-10-11  0:49 ` [PATCH v1 01/35] net/ionic: fix up endianness for Rx and Tx handling Andrew Boyer
2022-10-11  0:49 ` [PATCH v1 02/35] net/ionic: fix up endianness for RSS Andrew Boyer
2022-10-11  0:50 ` [PATCH v1 03/35] net/ionic: fix to set the adapter name for logging Andrew Boyer
2022-10-11  0:50 ` [PATCH v1 04/35] net/ionic: fix up the Rx filter save API Andrew Boyer
2022-10-11  0:50 ` [PATCH v1 05/35] net/ionic: fix up reported error stats Andrew Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).