ice: fix getting UDP tunnel entry
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tue, 14 Sep 2021 23:25:05 +0000 (19:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Oct 2021 07:56:47 +0000 (09:56 +0200)
commit69ea08c1b539657c0bea27d972f03b393caccc30
treecc92886d8a6c4b7af204f8adcbc8cd4b9f73636a
parent842fce43190cc3611584c178caec8300c7eaf236
ice: fix getting UDP tunnel entry

[ Upstream commit e4c2efa1393c6f1fbfabf91d1d83fcb4ae691ccb ]

Correct parameters order in call to ice_tunnel_idx_to_entry function.

Entry in sparse port table is correct when the idx is 0. For idx 1 one
correct entry should be skipped, for idx 2 two of them should be skipped
etc. Change if condition to be true when idx is 0, which means that
previous valid entry of this tunnel type were skipped.

Fixes: b20e6c17c468 ("ice: convert to new udp_tunnel infrastructure")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_flex_pipe.c