NXM_OF_IP_SRC[] will it cover cidr with mask also. e.g 10.0.0.0/8

On Wed, Jul 8, 2015 at 10:45 PM, Ben Pfaff <[email protected]> wrote:

> Yes, you need to match on IP to use an IP field, e.g.:
>         ovs-ofctl add-flow br-int
> 'table=0,ip,in_port=5,actions=move:NXM_OF_IP_SRC[]->NXM_NX_REG0[]'
>
>
> On Wed, Jul 08, 2015 at 09:32:25PM +0530, Pritam Kharat wrote:
> > Tried with move but gives error
> >
> > root@pritam:/home/pritam/git# ovs-ofctl add-flow br-int
> > 'table=0,in_port=5,actions=move:NXM_OF_IP_SRC[]->NXM_NX_REG0[]'
> > 2015-07-08T16:01:45Z|00001|meta_flow|WARN|source field ip_src lacks
> correct
> > prerequisites
> > ovs-ofctl: actions are invalid with specified match
> > (OFPBAC_MATCH_INCONSISTENT)
> >
> >
> >
> >
> > On Wed, Jul 8, 2015 at 8:35 PM, Ben Pfaff <[email protected]> wrote:
> >
> > > On Wed, Jul 08, 2015 at 09:38:06AM +0530, Pritam Kharat wrote:
> > > > 1) In a ovs flow how do I load a nw_src with mask value  from a
> packet to
> > > > register say reg0 ? Doc says we can load only integer or hex value
> to a
> > > > register ? Is there any way to do it ?
> > > >
> > > > e.g
> > > >
> > >
> *table=0,<flow-match>,actions=load:(nw_src/mask)->NXM_NX_REG0[],load:(nw_dst/mask)->NXM_NX_REG1[],resubmit(,1)*
> > >
> > > I guess you want the "move" action.
> > >
> > > > 2) Can we create ovs flow which compares values in two registers. ?
> > > >  e.g * match -> table=1,reg0==reg1*
> > > > *       actions -> drop*
> > > >
> > > > What I am trying to do is, see if packet is destined to vm of same
> > > subnet.
> > > > If yes then drop the packet.This I want to do using registers so that
> > > way I
> > > > will have only one flow ?
> > >
> > > OVS doesn't have a general-purpose comparison operator or an easy way
> to
> > > construct one.
> > >
> > > > 3) Can I compare value from packet with value in register ?
> > > >
> > > > e.g *table=1,nw_src=reg0,actions=drop*
> > >
> > > Same as #2.
> > >
> >
> >
> >
> > --
> > Thanks and Regards,
> > Pritam Kharat.
>



-- 
Thanks and Regards,
Pritam Kharat.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to