net/ice/base: fix packet type size
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 23 Jul 2019 03:51:12 +0000 (11:51 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 24 Jul 2019 14:00:57 +0000 (16:00 +0200)
Change ptype variable to correctly be 16-bits in ice_prof_map
structure.

Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_flex_pipe.c
drivers/net/ice/base/ice_flex_type.h

index c1f23ec..147fa4d 100644 (file)
@@ -4376,7 +4376,8 @@ ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
                p->tcam[i].prof_id = map->prof_id;
                p->tcam[i].tcam_idx = ICE_INVALID_TCAM;
 
-               ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg);
+               if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg))
+                       return ICE_ERR_CFG;
 
                p->tcam[i].ptg = ptg;
        }
index dca5cf2..837e1e8 100644 (file)
@@ -526,7 +526,7 @@ struct ice_prof_map {
        u64 context;
        u8 prof_id;
        u8 ptype_count;
-       u8 ptype[ICE_MAX_PTYPE_PER_PROFILE];
+       u16 ptype[ICE_MAX_PTYPE_PER_PROFILE];
 };
 
 #define ICE_INVALID_TCAM       0xFFFF