[ovs-dev] [RFC v5 0/5] Address MTU issue for larger packets in OVN

nusiddiq at redhat.com nusiddiq at redhat.com
Fri Mar 29 17:53:27 UTC 2019


From: Numan Siddique <nusiddiq at redhat.com>

This is an RFC series to address the MTU issues for OVN reported
here [1].

To address this issue, a new OVS action - check_pkt_larger is added.
A new datapath action is also added - check_pkt_len.


v4 -> v5
------
  * Addressed the review comments for patch 2 - " ovn: Add a new OVN field icmp4.frag_mtu"
  * Added a new patch - patch 3 to add a new action - "icmp4_error"
    which is same as icmp4 but it also includes the original IP datagram
    when it injects the ICMPv4 packet.

v3 -> v4
--------
  * In v4, I have separated the datapath patch and it is submitted
    separately here addressing the review comments
        - https://patchwork.ozlabs.org/patch/1046370/

  * This patch series has now 4 patches.

  * Addressed the review comments.

  * Added tests and documentation

  * I have also pushed these patches to my github repo - https://github.com/numansiddique/ovs/tree/ovn_mtu_fix/rfc_v4_p5_with_ovs_dp
    This also has patch to support 'check_pkt_len' in the ovs in-kernel datapath code
    If some one is interested to try this out without compiling net-next
    tree can use this.


v2 --> v3
---------
In v2, the check_pkt_len implementation in odp-execute.c (in p2) was missing,
which is added in v3.

----------------------------------------

v1 of RFC included patches for datapath and OVS. This v2 series also
includes the corresponding OVN changes.

In v1, check_pkt_len datapath action was implemented as 
  - check_pkt_len(pkt_len, condition, userspace action if condition matches)
   Eg.
    check_pkt_len( > 1500 ? userspace(pid=<PID>,slow_path(check_pkt_len))
    If the packet length is greater than 1500 bytes, send it to userspace.

In v2 a different approach is taken
  - check_pkt_len(> pkt_len ? (set of action to apply) : (another set of
    actions to apply))
    Eg. check_pkt_len(> 1500 ? (2): (3))
    If the packet length is greater than 1500, output to port 2, else
output to port 3.

ovs-vswitchd is modified accordingly.

The ovs action - check_pkt_larger is unchanged. It looks like
  - check_pkt_larger(pkt_len)->REGISTER_BIT.
    Eg.  check_pkt_larger(1500)->NXM_NX_REG0[0]
    If the packet is larger than 1500 bytes, REG0[0] will be set to 1.

More details in the patches.

If the approach seems reasonable, I will submit the datapath patch first
to net-dev ML first.

[1] - https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047039.html

Numan Siddique (5):
  Add a new OVS action check_pkt_larger
  ovn: Add a new OVN field icmp4.frag_mtu
  ovn: Add a new OVN action 'icmp4_error'
  ovn: Support OVS action 'check_pkt_larger' in OVN
  ovn: Generate ICMPv4 packet in router pipeline for larger packets

 NEWS                                          |   2 +
 .../linux/compat/include/linux/openvswitch.h  |  22 ++
 include/openvswitch/ofp-actions.h             |  19 ++
 include/ovn/actions.h                         |  42 +++-
 include/ovn/automake.mk                       |   3 +-
 include/ovn/expr.h                            |   5 +
 {ovn/lib => include/ovn}/logical-fields.h     |  39 ++++
 lib/dpif-netdev.c                             |   1 +
 lib/dpif.c                                    |   1 +
 lib/odp-execute.c                             |  72 +++++++
 lib/odp-util.c                                |  86 ++++++++
 lib/ofp-actions.c                             | 121 ++++++++++-
 lib/ofp-parse.c                               |  10 +
 lib/ovs-actions.xml                           |  31 +++
 ofproto/ofproto-dpif-ipfix.c                  |   1 +
 ofproto/ofproto-dpif-sflow.c                  |   1 +
 ofproto/ofproto-dpif-xlate.c                  | 131 ++++++++++++
 ofproto/ofproto-dpif.c                        |  43 ++++
 ofproto/ofproto-dpif.h                        |   5 +-
 ovn/controller/lflow.c                        |   1 +
 ovn/controller/lflow.h                        |   2 +-
 ovn/controller/pinctrl.c                      | 109 +++++++++-
 ovn/lib/actions.c                             | 121 ++++++++++-
 ovn/lib/automake.mk                           |   1 -
 ovn/lib/expr.c                                |  17 +-
 ovn/lib/logical-fields.c                      |  36 +++-
 ovn/northd/ovn-northd.8.xml                   |  83 +++++++-
 ovn/northd/ovn-northd.c                       |  94 +++++++-
 ovn/ovn-sb.xml                                |  41 +++-
 ovn/utilities/ovn-trace.c                     |  34 ++-
 tests/odp.at                                  |   5 +
 tests/ofp-actions.at                          |   6 +
 tests/ofproto-dpif.at                         | 162 ++++++++++++++
 tests/ovn.at                                  | 200 ++++++++++++++++++
 tests/test-ovn.c                              |   2 +-
 35 files changed, 1520 insertions(+), 29 deletions(-)
 rename {ovn/lib => include/ovn}/logical-fields.h (73%)

-- 
2.20.1



More information about the dev mailing list