[dpdk-dev] [PATCH v3 61/69] net/ice/base: use the specified size for ice zero bitmap
Leyi Rong
leyi.rong at intel.com
Wed Jun 19 17:18:38 CEST 2019
A couple of places in the code use a 'sizeof(bitmap) * BITS_PER_BYTE'
construction to calculate the size of the bitmap when calling
ice_zero_bitmap. Instead of doing this, just use the same value as in
the ice_declare_bitmap declaration.
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
Signed-off-by: Leyi Rong <leyi.rong at intel.com>
---
drivers/net/ice/base/ice_sched.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 0f4153146..2d80af731 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -5259,8 +5259,7 @@ void ice_sched_replay_agg(struct ice_hw *hw)
ICE_MAX_TRAFFIC_CLASS);
enum ice_status status;
- ice_zero_bitmap(replay_bitmap,
- sizeof(replay_bitmap) * BITS_PER_BYTE);
+ ice_zero_bitmap(replay_bitmap, ICE_MAX_TRAFFIC_CLASS);
ice_sched_get_ena_tc_bitmap(pi,
agg_info->replay_tc_bitmap,
replay_bitmap);
@@ -5396,7 +5395,7 @@ ice_sched_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle)
struct ice_sched_agg_info *agg_info;
enum ice_status status;
- ice_zero_bitmap(replay_bitmap, sizeof(replay_bitmap) * BITS_PER_BYTE);
+ ice_zero_bitmap(replay_bitmap, ICE_MAX_TRAFFIC_CLASS);
if (!ice_is_vsi_valid(hw, vsi_handle))
return ICE_ERR_PARAM;
agg_info = ice_get_vsi_agg_info(hw, vsi_handle);
--
2.17.1
More information about the dev
mailing list