* [PATCH 0/2] fix VNI of NVGRE encap action
@ 2023-06-13 3:20 Chaoyong He
2023-06-13 3:20 ` [PATCH 1/2] net/nfp: fix VNI of IPv4 " Chaoyong He
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chaoyong He @ 2023-06-13 3:20 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He
This patch series fix the problem of IPv4/6 NVGRE encap action.
Chaoyong He (2):
net/nfp: fix VNI of IPv4 NVGRE encap action
net/nfp: fix VNI of IPv6 NVGRE encap action
drivers/net/nfp/nfp_flow.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] net/nfp: fix VNI of IPv4 NVGRE encap action
2023-06-13 3:20 [PATCH 0/2] fix VNI of NVGRE encap action Chaoyong He
@ 2023-06-13 3:20 ` Chaoyong He
2023-06-13 3:20 ` [PATCH 2/2] net/nfp: fix VNI of IPv6 " Chaoyong He
2023-06-19 17:52 ` [PATCH 0/2] fix VNI of " Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2023-06-13 3:20 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He, stable
Complete the missing logic of parse the tunnel id of IPv4 NVGRE tunnel
and send it to the firmware by control message.
Fixes: 88cce0538073 ("net/nfp: support IPv4 NVGRE encap flow action")
Cc: stable@dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 5acb7f6ff3..6aea2b1559 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3171,6 +3171,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_rule_metadata *nfp_flow_meta,
struct nfp_fl_tun *tun)
{
+ uint64_t tun_id;
const struct rte_ether_hdr *eth;
const struct rte_flow_item_ipv4 *ipv4;
const struct rte_flow_item_gre *gre;
@@ -3182,6 +3183,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
eth = (const struct rte_ether_hdr *)raw_encap->data;
ipv4 = (const struct rte_flow_item_ipv4 *)(eth + 1);
gre = (const struct rte_flow_item_gre *)(ipv4 + 1);
+ tun_id = rte_be_to_cpu_32(*(const rte_be32_t *)(gre + 1));
pre_tun = (struct nfp_fl_act_pre_tun *)actions;
memset(pre_tun, 0, act_pre_size);
@@ -3189,7 +3191,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
memset(set_tun, 0, act_set_size);
- nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, 0,
+ nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, tun_id,
ipv4->hdr.time_to_live, ipv4->hdr.type_of_service);
set_tun->tun_proto = gre->protocol;
--
2.39.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] net/nfp: fix VNI of IPv6 NVGRE encap action
2023-06-13 3:20 [PATCH 0/2] fix VNI of NVGRE encap action Chaoyong He
2023-06-13 3:20 ` [PATCH 1/2] net/nfp: fix VNI of IPv4 " Chaoyong He
@ 2023-06-13 3:20 ` Chaoyong He
2023-06-19 17:52 ` [PATCH 0/2] fix VNI of " Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2023-06-13 3:20 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He, stable
Complete the missing logic of parse the tunnel id of IPv6 NVGRE tunnel
and send it to the firmware by control message.
Fixes: fff680eef7f9 ("net/nfp: support IPv6 NVGRE encap flow action")
Cc: stable@dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 6aea2b1559..31a21adf15 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3209,6 +3209,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_tun *tun)
{
uint8_t tos;
+ uint64_t tun_id;
const struct rte_ether_hdr *eth;
const struct rte_flow_item_ipv6 *ipv6;
const struct rte_flow_item_gre *gre;
@@ -3220,6 +3221,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
eth = (const struct rte_ether_hdr *)raw_encap->data;
ipv6 = (const struct rte_flow_item_ipv6 *)(eth + 1);
gre = (const struct rte_flow_item_gre *)(ipv6 + 1);
+ tun_id = rte_be_to_cpu_32(*(const rte_be32_t *)(gre + 1));
pre_tun = (struct nfp_fl_act_pre_tun *)actions;
memset(pre_tun, 0, act_pre_size);
@@ -3228,7 +3230,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
memset(set_tun, 0, act_set_size);
tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
- nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, 0,
+ nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, tun_id,
ipv6->hdr.hop_limits, tos);
set_tun->tun_proto = gre->protocol;
--
2.39.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] fix VNI of NVGRE encap action
2023-06-13 3:20 [PATCH 0/2] fix VNI of NVGRE encap action Chaoyong He
2023-06-13 3:20 ` [PATCH 1/2] net/nfp: fix VNI of IPv4 " Chaoyong He
2023-06-13 3:20 ` [PATCH 2/2] net/nfp: fix VNI of IPv6 " Chaoyong He
@ 2023-06-19 17:52 ` Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2023-06-19 17:52 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund
On 6/13/2023 4:20 AM, Chaoyong He wrote:
> This patch series fix the problem of IPv4/6 NVGRE encap action.
>
> Chaoyong He (2):
> net/nfp: fix VNI of IPv4 NVGRE encap action
> net/nfp: fix VNI of IPv6 NVGRE encap action
>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-19 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 3:20 [PATCH 0/2] fix VNI of NVGRE encap action Chaoyong He
2023-06-13 3:20 ` [PATCH 1/2] net/nfp: fix VNI of IPv4 " Chaoyong He
2023-06-13 3:20 ` [PATCH 2/2] net/nfp: fix VNI of IPv6 " Chaoyong He
2023-06-19 17:52 ` [PATCH 0/2] fix VNI of " Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).