* [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
@ 2021-09-14 23:25 Michal Swiatkowski
2021-10-01 15:02 ` G, GurucharanX
0 siblings, 1 reply; 5+ messages in thread
From: Michal Swiatkowski @ 2021-09-14 23:25 UTC (permalink / raw)
To: intel-wired-lan
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
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>
---
drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
index df8ed0b40f00..7bcb41cda0a0 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -1989,7 +1989,7 @@ static u16 ice_tunnel_idx_to_entry(struct ice_hw *hw, enum ice_tunnel_type type,
for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
if (hw->tnl.tbl[i].valid &&
hw->tnl.tbl[i].type == type &&
- idx--)
+ idx-- == 0)
return i;
WARN_ON_ONCE(1);
@@ -2149,7 +2149,7 @@ int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
u16 index;
tnl_type = ti->type == UDP_TUNNEL_TYPE_VXLAN ? TNL_VXLAN : TNL_GENEVE;
- index = ice_tunnel_idx_to_entry(&pf->hw, idx, tnl_type);
+ index = ice_tunnel_idx_to_entry(&pf->hw, tnl_type, idx);
status = ice_create_tunnel(&pf->hw, index, tnl_type, ntohs(ti->port));
if (status) {
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
2021-09-14 23:25 [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry Michal Swiatkowski
@ 2021-10-01 15:02 ` G, GurucharanX
2021-10-01 15:08 ` G, GurucharanX
0 siblings, 1 reply; 5+ messages in thread
From: G, GurucharanX @ 2021-10-01 15:02 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Michal Swiatkowski
> Sent: Wednesday, September 15, 2021 4:55 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
>
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> 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>
> ---
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
2021-10-01 15:02 ` G, GurucharanX
@ 2021-10-01 15:08 ` G, GurucharanX
2021-10-01 15:10 ` G, GurucharanX
0 siblings, 1 reply; 5+ messages in thread
From: G, GurucharanX @ 2021-10-01 15:08 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Michal Swiatkowski
> Sent: Wednesday, September 15, 2021 4:55 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP
> tunnel entry
>
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> 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>
> ---
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
2021-10-01 15:08 ` G, GurucharanX
@ 2021-10-01 15:10 ` G, GurucharanX
2021-10-01 15:12 ` G, GurucharanX
0 siblings, 1 reply; 5+ messages in thread
From: G, GurucharanX @ 2021-10-01 15:10 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Michal Swiatkowski
> Sent: Wednesday, September 15, 2021 4:55 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP
> tunnel entry
>
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> 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>
> ---
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry
2021-10-01 15:10 ` G, GurucharanX
@ 2021-10-01 15:12 ` G, GurucharanX
0 siblings, 0 replies; 5+ messages in thread
From: G, GurucharanX @ 2021-10-01 15:12 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Michal Swiatkowski
> Sent: Wednesday, September 15, 2021 4:55 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP
> tunnel entry
>
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> 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>
> ---
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-01 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 23:25 [Intel-wired-lan] [PATCH net-next] ice: fix getting UDP tunnel entry Michal Swiatkowski
2021-10-01 15:02 ` G, GurucharanX
2021-10-01 15:08 ` G, GurucharanX
2021-10-01 15:10 ` G, GurucharanX
2021-10-01 15:12 ` G, GurucharanX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.