summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2020-06-05 21:17:29 +0800
committerSimon Horman <simon.horman@netronome.com>2020-06-08 11:08:05 +0200
commita3db6e473d9fb6558d0dc065bc4b3e4e1c2f9455 (patch)
treee3f84e59ee4e9a8204aa13e9bbe9b3a1807a06ec /include
parent5db012c4ac3630ec99fa6c64bbae38cbbcd0544e (diff)
downloadopenvswitch-a3db6e473d9fb6558d0dc065bc4b3e4e1c2f9455.tar.gz
netdev-offload-tc: Allow installing arp rules to TC dp.
This patch allows to install arp rules to tc dp. In the future, arp will be offloaded to hardware to be processed. So OvS enable this now. $ ovs-appctl dpctl/add-flow 'recirc_id(0),in_port(3),eth(),\ eth_type(0x0806),arp(op=2,tha=00:50:56:e1:4b:ab,tip=10.255.1.116)' 2 $ ovs-appctl dpctl/dump-flows ... arp(tip=10.255.1.116,op=2,tha=00:50:56:e1:4b:ab) ... $ tc filter show dev <ethx> ingress ... eth_type arp arp_tip 10.255.1.116 arp_op reply arp_tha 00:50:56:e1:4b:ab not_in_hw action order 1: mirred (Egress Redirect to device <ethy>) stolen ... Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'include')
-rw-r--r--include/openvswitch/match.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/openvswitch/match.h b/include/openvswitch/match.h
index 3b196c7fa..9e480318e 100644
--- a/include/openvswitch/match.h
+++ b/include/openvswitch/match.h
@@ -197,6 +197,8 @@ void match_set_tp_dst_masked(struct match *, ovs_be16 port, ovs_be16 mask);
void match_set_tcp_flags(struct match *, ovs_be16);
void match_set_tcp_flags_masked(struct match *, ovs_be16 flags, ovs_be16 mask);
void match_set_nw_proto(struct match *, uint8_t);
+void match_set_nw_proto_masked(struct match *match,
+ const uint8_t nw_proto, const uint8_t mask);
void match_set_nw_src(struct match *, ovs_be32);
void match_set_nw_src_masked(struct match *, ovs_be32 ip, ovs_be32 mask);
void match_set_nw_dst(struct match *, ovs_be32);
@@ -210,6 +212,9 @@ void match_set_nw_frag(struct match *, uint8_t nw_frag);
void match_set_nw_frag_masked(struct match *, uint8_t nw_frag, uint8_t mask);
void match_set_icmp_type(struct match *, uint8_t);
void match_set_icmp_code(struct match *, uint8_t);
+void match_set_arp_opcode_masked(struct match *match,
+ const uint8_t opcode,
+ const uint8_t mask);
void match_set_arp_sha(struct match *, const struct eth_addr);
void match_set_arp_sha_masked(struct match *,
const struct eth_addr arp_sha,
@@ -218,6 +223,12 @@ void match_set_arp_tha(struct match *, const struct eth_addr);
void match_set_arp_tha_masked(struct match *,
const struct eth_addr arp_tha,
const struct eth_addr mask);
+void match_set_arp_spa_masked(struct match *match,
+ const ovs_be32 arp_spa,
+ const ovs_be32 mask);
+void match_set_arp_tpa_masked(struct match *match,
+ const ovs_be32 arp_tpa,
+ const ovs_be32 mask);
void match_set_ipv6_src(struct match *, const struct in6_addr *);
void match_set_ipv6_src_masked(struct match *, const struct in6_addr *,
const struct in6_addr *);