[ovs-git] [openvswitch/ovs] 002682: netdev-offload-tc: Add drop action support.

William Tu noreply at github.com
Wed Jul 8 11:16:49 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 002682727e6e275b05f6cd2f32170b18564ef258
      https://github.com/openvswitch/ovs/commit/002682727e6e275b05f6cd2f32170b18564ef258
  Author: William Tu <u9012063 at gmail.com>
  Date:   2020-07-08 (Wed, 08 Jul 2020)

  Changed paths:
    M lib/netdev-offload-tc.c

  Log Message:
  -----------
  netdev-offload-tc: Add drop action support.

Currently drop action is not offloaded when using userspace datapath
with tc offload.  The patch programs tc gact (generic action) chain
ID 0 to drop the packet by setting it to TC_ACT_SHOT.

Example:
$ ovs-appctl dpctl/add-flow netdev at ovs-netdev \
  'recirc_id(0),in_port(2),eth(),eth_type(0x0806),\
  arp(op=2,tha=00:50:56:e1:4b:ab,tip=10.255.1.116)' drop

Or no action also infers drop
$ ovs-appctl dpctl/add-flow netdev at ovs-netdev \
  'recirc_id(0),in_port(2),eth(),eth_type(0x0806),\
  arp(op=2,tha=00:50:56:e1:4b:ab,tip=10.255.1.116)' ''

$ tc filter show dev ovs-p0 ingress
filter protocol arp pref 2 flower chain 0
filter protocol arp pref 2 flower chain 0 handle 0x1
  eth_type arp
  arp_tip 10.255.1.116
  arp_op reply
  arp_tha 00:50:56:e1:4b:ab
  skip_hw
  not_in_hw
	action order 1: gact action drop
    ...

Signed-off-by: William Tu <u9012063 at gmail.com>
Acked-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>




More information about the git mailing list