patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Andrew Boyer <andrew.boyer@amd.com>
To: <dev@dpdk.org>
Cc: Andrew Boyer <andrew.boyer@amd.com>, <stable@dpdk.org>
Subject: [PATCH v1 04/35] net/ionic: fix up the Rx filter save API
Date: Mon, 10 Oct 2022 17:50:01 -0700	[thread overview]
Message-ID: <20221011005032.47584-5-andrew.boyer@amd.com> (raw)
In-Reply-To: <20221007174336.54354-1-andrew.boyer@amd.com>

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


  parent reply	other threads:[~2022-10-11  0:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 ` Andrew Boyer [this message]
2022-10-11  0:50 ` [PATCH v1 05/35] net/ionic: fix up reported error stats Andrew Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221011005032.47584-5-andrew.boyer@amd.com \
    --to=andrew.boyer@amd.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).