]> git.proxmox.com Git - mirror_ovs.git/commit - lib/tc.c
lib/tc: add ICMP type and code match offload
authorMaor Dickman <maord@nvidia.com>
Thu, 28 Jan 2021 13:51:08 +0000 (15:51 +0200)
committerSimon Horman <simon.horman@netronome.com>
Mon, 1 Feb 2021 15:54:15 +0000 (16:54 +0100)
commit75e1e6fd2d6beee90e7eff5ce8059c44aa67c0ec
tree95e40e9747aac0433b54fcd16bc3cf5089998bc7
parentd5c429a303341c2bf07090193e640434b3c51080
lib/tc: add ICMP type and code match offload

Add TC offload support for classifying ICMPv4/6 type and code.

$ ovs-appctl dpctl/add-flow 'recirc_id(0),in_port(3),eth(),\
  eth_type(0x0800),ipv4(proto=1),icmp(type=9,code=0)' 2

$ ovs-appctl dpctl/dump-flows
  ... icmp(type=9,code=0) ...

$ tc filter show dev <ethx> ingress
  ...
  eth_type ipv4
  ip_proto icmp
  icmp_type 9
  icmp_code 0
  not_in_hw
  action order 1: mirred (Egress Redirect to device <ethy>) stolen
  ...

Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
lib/netdev-offload-tc.c
lib/tc.c
lib/tc.h