[ovs-discuss] Negative match a field?

Xiao Liang (xiaolia) xiaolia at cisco.com
Mon Sep 28 04:52:01 UTC 2015


Thanks, Ben. The exception flow match should be:
in_port=1, dl_src=A
in_port=2, dl_src=B

It will still result in many flows when combined with more match fields. Is it possible to add negative match support in OpenFlow or as an extension?

Thanks,
Xiao

> -----Original Message-----
> From: Ben Pfaff [mailto:blp at nicira.com]
> Sent: Friday, September 25, 2015 13:23
> To: Xiao Liang (xiaolia)
> Cc: discuss at openvswitch.org
> Subject: Re: [ovs-discuss] Negative match a field?
> 
> On Fri, Sep 25, 2015 at 02:39:20AM +0000, Xiao Liang (xiaolia) wrote:
> > I want to apply actions on all packets except those with a certain
> > source MAC address. For example in_port=1, dl_src!=MAC_A,
> > actions=output:2 in_port=2, dl_src!=MAC_B, actions=output:1
> > priority=0, action=drop
> >
> > Is there easy way to do this?
> 
> Ideally, you use high-priority flows to match the exceptions, and then put the
> common case into a lower-priority flow, like this:
> 
>         dl_src=A, priority=100, actions=...
>         dl_src=B, priority=100, actions=...
>         priority=0, actions=...
> 
> If you really can't do that, then you can use 48 flows to match all the possible
> source MAC addresses that do not equal a given MAC, one for each possible
> bit that could differ.  It's a pretty bad solution because it uses a lot of flows
> and has a high cost at runtime.


More information about the discuss mailing list