[ovs-git] [openvswitch/ovs] 4c7804: datapath:backport: openvswitch: Add packet truncat...

GitHub noreply at github.com
Fri Jun 24 16:17:15 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 4c7804f14b9b5bbcd37cf9170781e2f820992532
      https://github.com/openvswitch/ovs/commit/4c7804f14b9b5bbcd37cf9170781e2f820992532
  Author: William Tu <u9012063 at gmail.com>
  Date:   2016-06-24 (Fri, 24 Jun 2016)

  Changed paths:
    M datapath/actions.c
    M datapath/datapath.c
    M datapath/datapath.h
    M datapath/flow_netlink.c
    M datapath/linux/compat/include/linux/openvswitch.h
    M datapath/vport.c

  Log Message:
  -----------
  datapath:backport: openvswitch: Add packet truncation support.

Upstream commit:
    commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1
    Author: William Tu <u9012063 at gmail.com>
    Date:   Fri Jun 10 11:49:33 2016 -0700

    openvswitch: Add packet truncation support.

    The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to
    truncate packets. A 'max_len' is added for setting up the maximum
    packet size, and a 'cutlen' field is to record the number of bytes
    to trim the packet when the packet is outputting to a port, or when
    the packet is sent to userspace.

    Signed-off-by: William Tu <u9012063 at gmail.com>
    Cc: Pravin Shelar <pshelar at nicira.com>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Signed-off-by: William Tu <u9012063 at gmail.com>
Acked-by: Pravin B Shelar <pshelar at ovn.org>


  Commit: aaca4fe0ce9e90a41b3f4db84be7d05823c733e4
      https://github.com/openvswitch/ovs/commit/aaca4fe0ce9e90a41b3f4db84be7d05823c733e4
  Author: William Tu <u9012063 at gmail.com>
  Date:   2016-06-24 (Fri, 24 Jun 2016)

  Changed paths:
    M NEWS
    M include/openvswitch/ofp-actions.h
    M lib/dp-packet.c
    M lib/dp-packet.h
    M lib/dpif-netdev.c
    M lib/dpif.c
    M lib/dpif.h
    M lib/netdev-bsd.c
    M lib/netdev-dpdk.c
    M lib/netdev-dummy.c
    M lib/netdev-linux.c
    M lib/netdev.c
    M lib/odp-execute.c
    M lib/odp-util.c
    M lib/ofp-actions.c
    M ofproto/ofproto-dpif-sflow.c
    M ofproto/ofproto-dpif-xlate.c
    M ofproto/ofproto-dpif.c
    M ofproto/ofproto-dpif.h
    M tests/odp.at
    M tests/ofp-actions.at
    M tests/ofproto-dpif.at
    M tests/ovs-ofctl.at
    M tests/system-kmod-macros.at
    M tests/system-traffic.at
    M tests/system-userspace-macros.at
    M utilities/ovs-ofctl.8.in

  Log Message:
  -----------
  ofp-actions: Add truncate action.

The patch adds a new action to support packet truncation.  The new action
is formatted as 'output(port=n,max_len=m)', as output to port n, with
packet size being MIN(original_size, m).

One use case is to enable port mirroring to send smaller packets to the
destination port so that only useful packet information is mirrored/copied,
saving some performance overhead of copying entire packet payload.  Example
use case is below as well as shown in the testcases:

    - Output to port 1 with max_len 100 bytes.
    - The output packet size on port 1 will be MIN(original_packet_size, 100).
    # ovs-ofctl add-flow br0 'actions=output(port=1,max_len=100)'

    - The scope of max_len is limited to output action itself.  The following
      packet size of output:1 and output:2 will be intact.
    # ovs-ofctl add-flow br0 \
      'actions=output(port=1,max_len=100),output:1,output:2'
    - The Datapath actions shows:
    # Datapath actions: trunc(100),1,1,2

Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/140037134
Signed-off-by: William Tu <u9012063 at gmail.com>
Acked-by: Pravin B Shelar <pshelar at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/337bebe91c94...aaca4fe0ce9e


More information about the git mailing list