net/ice/base: fix loop limit
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 6 Jan 2020 03:38:46 +0000 (11:38 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000 (19:46 +0100)
commitc2915d3f8a077d72d359464369d220d7da71e6e0
treeeb5881803023100672319bc5be884a783cf596ab
parent969890d505b1babcd7d51482d7d3dffb3ec0467c
net/ice/base: fix loop limit

In ice_prot_type_to_id routine, correct the loop limit check
to use ARRAY_SIZE instead of looking for the array element to
have a specific value.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
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_switch.c