mirror of
https://github.com/openvswitch/ovs
synced 2025-08-29 21:38:13 +00:00
netdev-offload-dpdk: Support ICMPv6 offload.
Add support for offloading packet match on ICMPv6 header using rte_flow API. Signed-off-by: Allen Chen <allen.chen@jaguarmicro.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
This commit is contained in:
parent
b272282abb
commit
6f075ae4e5
2
NEWS
2
NEWS
@ -25,6 +25,8 @@ Post-v3.4.0
|
|||||||
formats.
|
formats.
|
||||||
- DPDK:
|
- DPDK:
|
||||||
* OVS validated with DPDK 23.11.2.
|
* OVS validated with DPDK 23.11.2.
|
||||||
|
* Add hardware offload support for matching ICMPv6 protocol
|
||||||
|
(experimental).
|
||||||
- Tunnels:
|
- Tunnels:
|
||||||
* LISP and STT tunnel port types are deprecated and will be removed in
|
* LISP and STT tunnel port types are deprecated and will be removed in
|
||||||
the next release.
|
the next release.
|
||||||
|
@ -495,6 +495,23 @@ dump_flow_pattern(struct ds *s,
|
|||||||
icmp_mask->hdr.icmp_code, 0);
|
icmp_mask->hdr.icmp_code, 0);
|
||||||
}
|
}
|
||||||
ds_put_cstr(s, "/ ");
|
ds_put_cstr(s, "/ ");
|
||||||
|
} else if (item->type == RTE_FLOW_ITEM_TYPE_ICMP6) {
|
||||||
|
const struct rte_flow_item_icmp6 *icmp6_spec = item->spec;
|
||||||
|
const struct rte_flow_item_icmp6 *icmp6_mask = item->mask;
|
||||||
|
|
||||||
|
ds_put_cstr(s, "icmpv6 ");
|
||||||
|
if (icmp6_spec) {
|
||||||
|
if (!icmp6_mask) {
|
||||||
|
icmp6_mask = &rte_flow_item_icmp6_mask;
|
||||||
|
}
|
||||||
|
DUMP_PATTERN_ITEM(icmp6_mask->type, false, "type",
|
||||||
|
"%"PRIu8, icmp6_spec->type,
|
||||||
|
icmp6_mask->type, 0);
|
||||||
|
DUMP_PATTERN_ITEM(icmp6_mask->code, false, "code",
|
||||||
|
"%"PRIu8, icmp6_spec->code,
|
||||||
|
icmp6_mask->code, 0);
|
||||||
|
}
|
||||||
|
ds_put_cstr(s, "/ ");
|
||||||
} else if (item->type == RTE_FLOW_ITEM_TYPE_TCP) {
|
} else if (item->type == RTE_FLOW_ITEM_TYPE_TCP) {
|
||||||
const struct rte_flow_item_tcp *tcp_spec = item->spec;
|
const struct rte_flow_item_tcp *tcp_spec = item->spec;
|
||||||
const struct rte_flow_item_tcp *tcp_mask = item->mask;
|
const struct rte_flow_item_tcp *tcp_mask = item->mask;
|
||||||
@ -1608,6 +1625,7 @@ parse_flow_match(struct netdev *netdev,
|
|||||||
|
|
||||||
if (proto != IPPROTO_ICMP && proto != IPPROTO_UDP &&
|
if (proto != IPPROTO_ICMP && proto != IPPROTO_UDP &&
|
||||||
proto != IPPROTO_SCTP && proto != IPPROTO_TCP &&
|
proto != IPPROTO_SCTP && proto != IPPROTO_TCP &&
|
||||||
|
proto != IPPROTO_ICMPV6 &&
|
||||||
(match->wc.masks.tp_src ||
|
(match->wc.masks.tp_src ||
|
||||||
match->wc.masks.tp_dst ||
|
match->wc.masks.tp_dst ||
|
||||||
match->wc.masks.tcp_flags)) {
|
match->wc.masks.tcp_flags)) {
|
||||||
@ -1684,6 +1702,22 @@ parse_flow_match(struct netdev *netdev,
|
|||||||
consumed_masks->tp_dst = 0;
|
consumed_masks->tp_dst = 0;
|
||||||
|
|
||||||
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ICMP, spec, mask, NULL);
|
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ICMP, spec, mask, NULL);
|
||||||
|
} else if (proto == IPPROTO_ICMPV6) {
|
||||||
|
struct rte_flow_item_icmp6 *spec, *mask;
|
||||||
|
|
||||||
|
spec = xzalloc(sizeof *spec);
|
||||||
|
mask = xzalloc(sizeof *mask);
|
||||||
|
|
||||||
|
spec->type = (uint8_t) ntohs(match->flow.tp_src);
|
||||||
|
spec->code = (uint8_t) ntohs(match->flow.tp_dst);
|
||||||
|
|
||||||
|
mask->type = (uint8_t) ntohs(match->wc.masks.tp_src);
|
||||||
|
mask->code = (uint8_t) ntohs(match->wc.masks.tp_dst);
|
||||||
|
|
||||||
|
consumed_masks->tp_src = 0;
|
||||||
|
consumed_masks->tp_dst = 0;
|
||||||
|
|
||||||
|
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ICMP6, spec, mask, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_END, NULL, NULL, NULL);
|
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_END, NULL, NULL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user