[ovs-dev] [RFC 1/3] OVN: add icmp4{} action support

Ben Pfaff blp at ovn.org
Tue Jan 23 20:40:26 UTC 2018


On Wed, Jan 10, 2018 at 06:58:59PM +0100, Lorenzo Bianconi wrote:
> icmp4 action is used to replace the IPv4 packet been processed with
> an ICMPv4 packet initialized based on incoming IPv4 one.
> Ethernet and IPv4 fields not listed are not changed:
> - ip.proto = 1
> - ip.frag = 0
> - icmp4.type = 3
> - icmp4.code = 1
> Prerequisite: ip4
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>

Thanks a lot for working on this!  I'd really like to have more complete
support for this, for the OVN router.

This patch should update ovn-sb.xml to reflect the new details and that
the action is actually implemented.

"sparse" reports the following:

    ../ovn/controller/pinctrl.c:251:21: error: incorrect type in assignment (different base types)
    ../ovn/controller/pinctrl.c:251:21:    expected restricted ovs_be16 [usertype] ip_frag_off
    ../ovn/controller/pinctrl.c:251:21:    got int

and I think it's right, htons() should be used in this assignment:

    nh->ip_frag_off = 0x40;

There's also this new warning:

    ../ovn/utilities/ovn-trace.c: In function ‘trace_actions’:
    ../ovn/utilities/ovn-trace.c:1762:9: error: enumeration value
    ‘OVNACT_ICMP’ not handled in switch [-Werror=switch]

That's fixed in patch 2/3, but probably it's better to squash patch 2
into 1.

Thanks,

Ben.


More information about the dev mailing list