2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-offload-dpdk: Enhance the support of tunnel pop action

Populate the 'is_ipv6' field of 'struct rte_flow_tunnel', which can
be used in the implementation of tunnel pop action for DPDK PMD.

Fixes: be56e063d0 ("netdev-offload-dpdk: Support tunnel pop action.")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Acked-by: Eli Britstein <elibr@nvidia.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
This commit is contained in:
Chaoyong He
2022-07-20 16:42:00 +08:00
committed by Simon Horman
parent c230c7579c
commit bb9fedb79a

View File

@@ -1099,12 +1099,18 @@ vport_to_rte_tunnel(struct netdev *vport,
const struct netdev_tunnel_config *tnl_cfg;
memset(tunnel, 0, sizeof *tunnel);
tnl_cfg = netdev_get_tunnel_config(vport);
if (!tnl_cfg) {
return -1;
}
if (!IN6_IS_ADDR_V4MAPPED(&tnl_cfg->ipv6_dst)) {
tunnel->is_ipv6 = true;
}
if (!strcmp(netdev_get_type(vport), "vxlan")) {
tunnel->type = RTE_FLOW_ITEM_TYPE_VXLAN;
tnl_cfg = netdev_get_tunnel_config(vport);
if (!tnl_cfg) {
return -1;
}
tunnel->tp_dst = tnl_cfg->dst_port;
if (!VLOG_DROP_DBG(&rl)) {
ds_put_format(s_tnl, "flow tunnel create %d type vxlan; ",