patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, xiaolong.ye@intel.com,
	Qi Zhang <qi.z.zhang@intel.com>,
	stable@dpdk.org,
	Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-stable] [PATCH 10/52] net/ice/base: fix variable type for ACL
Date: Wed,  3 Jun 2020 10:39:34 +0800	[thread overview]
Message-ID: <20200603024016.30636-11-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20200603024016.30636-1-qi.z.zhang@intel.com>

The commit ef92cee94cdb ("ice-shared: Fix remaining minor casting
issues") changed the idx variable within ice_acl_add_entry() from
a u16 to a u8. This causes the code to truncate the values greater
than 255 to 255 or less when calling ice_aq_program_acl_entry()
resulting in the wrong TCAM index being programmed for the specified
rule. The result is that the rule action doesn't work correctly
(packets don't get routed to the correct queue or dropped if that
is the action). Fix the issue by changing the variable to be a u16
again.

Fixes: f3202a097f12 ("net/ice/base: add ACL module")
Cc: stable@dpdk.org

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_acl_ctrl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c
index e67605141..39b399dd4 100644
--- a/drivers/net/ice/base/ice_acl_ctrl.c
+++ b/drivers/net/ice/base/ice_acl_ctrl.c
@@ -934,9 +934,10 @@ ice_acl_add_entry(struct ice_hw *hw, struct ice_acl_scen *scen,
 		  enum ice_acl_entry_prior prior, u8 *keys, u8 *inverts,
 		  struct ice_acl_act_entry *acts, u8 acts_cnt, u16 *entry_idx)
 {
-	u8 i, entry_tcam, num_cscd, idx, offset;
+	u8 i, entry_tcam, num_cscd, offset;
 	struct ice_aqc_acl_data buf;
 	enum ice_status status = ICE_SUCCESS;
+	u16 idx;
 
 	if (!scen)
 		return ICE_ERR_DOES_NOT_EXIST;
-- 
2.13.6


       reply	other threads:[~2020-06-03  2:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200603024016.30636-1-qi.z.zhang@intel.com>
2020-06-03  2:39 ` Qi Zhang [this message]
2020-06-03  2:40 ` [dpdk-stable] [PATCH 37/52] net/ice/base: fix for memory leak Qi Zhang
2020-06-03  2:40 ` [dpdk-stable] [PATCH 47/52] net/ice/base: fix reference count when update VSI list Qi Zhang
2020-06-03  2:40 ` [dpdk-stable] [PATCH 49/52] net/ice/base: fix uninitialized flag Qi Zhang
2020-06-08  2:51   ` Yang, Qiming
     [not found] ` <20200609120001.35110-1-qi.z.zhang@intel.com>
2020-06-09 11:59   ` [dpdk-stable] [PATCH v2 10/52] net/ice/base: fix variable type for ACL Qi Zhang
2020-06-11 18:35     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2020-06-09 11:59   ` [dpdk-stable] [PATCH v2 37/52] net/ice/base: fix for memory leak Qi Zhang
2020-06-09 11:59   ` [dpdk-stable] [PATCH v2 47/52] net/ice/base: fix reference count when update VSI list Qi Zhang
2020-06-09 11:59   ` [dpdk-stable] [PATCH v2 49/52] net/ice/base: fix uninitialized flag Qi Zhang
2020-06-11 18:45     ` Ferruh Yigit
     [not found] ` <20200615015342.1191-1-qi.z.zhang@intel.com>
2020-06-15  1:52   ` [dpdk-stable] [PATCH v3 10/53] net/ice/base: fix variable type for ACL Qi Zhang
2020-06-15  1:53   ` [dpdk-stable] [PATCH v3 35/53] net/ice/base: fix return value Qi Zhang
2020-06-15  1:53   ` [dpdk-stable] [PATCH v3 37/53] net/ice/base: fix for memory leak Qi Zhang
2020-06-15  1:53   ` [dpdk-stable] [PATCH v3 47/53] net/ice/base: fix reference count when update VSI list Qi Zhang
2020-06-15  1:53   ` [dpdk-stable] [PATCH v3 49/53] net/ice/base: fix uninitialized flag for result index bitmap Qi Zhang
     [not found] ` <20200615020515.1359-1-qi.z.zhang@intel.com>
2020-06-15  2:04   ` [dpdk-stable] [PATCH v3 10/53] net/ice/base: fix variable type for ACL Qi Zhang
2020-06-15  2:04   ` [dpdk-stable] [PATCH v3 35/53] net/ice/base: fix return value Qi Zhang
2020-06-15  2:04   ` [dpdk-stable] [PATCH v3 37/53] net/ice/base: fix for memory leak Qi Zhang
2020-06-15  2:05   ` [dpdk-stable] [PATCH v3 47/53] net/ice/base: fix reference count when update VSI list Qi Zhang
2020-06-15  2:05   ` [dpdk-stable] [PATCH v3 49/53] net/ice/base: fix uninitialized flag for result index bitmap Qi Zhang

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=20200603024016.30636-11-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@intel.com \
    /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).