1 |
From 54ea8a24089a1fe6f43c3c267b72cb6d442e91b2 Mon Sep 17 00:00:00 2001 |
2 |
From: Sasha Levin <sashal@kernel.org> |
3 |
Date: Fri, 19 Aug 2022 12:45:52 +0200 |
4 |
Subject: i40e: Fix incorrect address type for IPv6 flow rules |
5 |
|
6 |
From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> |
7 |
|
8 |
[ Upstream commit bcf3a156429306070afbfda5544f2b492d25e75b ] |
9 |
|
10 |
It was not possible to create 1-tuple flow director |
11 |
rule for IPv6 flow type. It was caused by incorrectly |
12 |
checking for source IP address when validating user provided |
13 |
destination IP address. |
14 |
|
15 |
Fix this by changing ip6src to correct ip6dst address |
16 |
in destination IP address validation for IPv6 flow type. |
17 |
|
18 |
Fixes: efca91e89b67 ("i40e: Add flow director support for IPv6") |
19 |
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> |
20 |
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel) |
21 |
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> |
22 |
Signed-off-by: Sasha Levin <sashal@kernel.org> |
23 |
--- |
24 |
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- |
25 |
1 file changed, 1 insertion(+), 1 deletion(-) |
26 |
|
27 |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c |
28 |
index 19704f5c8291c..22a61802a4027 100644 |
29 |
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c |
30 |
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c |
31 |
@@ -4395,7 +4395,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi, |
32 |
(struct in6_addr *)&ipv6_full_mask)) |
33 |
new_mask |= I40E_L3_V6_DST_MASK; |
34 |
else if (ipv6_addr_any((struct in6_addr *) |
35 |
- &usr_ip6_spec->ip6src)) |
36 |
+ &usr_ip6_spec->ip6dst)) |
37 |
new_mask &= ~I40E_L3_V6_DST_MASK; |
38 |
else |
39 |
return -EOPNOTSUPP; |
40 |
-- |
41 |
2.35.1 |
42 |
|