I finally figured it out.

FAUCET sets ofp_switch_config.miss_send_len = 0 when the switch connects.
We do this because we don't want any packets coming to the controller, if
there is no matching flow in a table. We program a priority 0, actions=drop
flow in all tables as well, to really hammer the point home (I guess :-).

Experimentally, I tried explicitly adding a priority 0 flow in one table
(instead of the explicit drop) that looks like this:

 cookie=0x5adc15c0, duration=21.851s, table=3, n_packets=65, n_bytes=4794,
priority=0 actions=CONTROLLER:96,goto_table:7


The counters increment, but OVS (2.9.0) doesn't send a PacketIn - I'm
guessing because the the code that checks miss_send_len doesn't know the
difference between the implicit packet in (where you don't program any
priority=0 flow) and the explicit one.

Now. Is it a bug? Perhaps not. The OF standard 1.3.5/sec 5.4 does explain
as you did, that priority=0 is a special case, and further more a priority
0 flow just might not have the same capabilities as a regular flow, and
that you should probably avoid using it for backward compatibility reasons.

So, we won't use explicit actions at priority 0. :) That's fine. Perhaps
it's a documentation/check thing? miss_send_len = 0 applying to these
explicit output to controller was a surprise, but maybe I just shouldn't be
surprised. :-)

Thanks,





On Fri, May 18, 2018 at 5:14 AM Ben Pfaff <b...@ovn.org> wrote:

> If you can try to narrow it down further, that's helpful.  If you don't
> have any luck with that, let me know and I'll see if I can figure
> anything out.
>
> On Thu, May 17, 2018 at 05:26:54PM +1200, Josh Bailey wrote:
> > I apologize, I dropped the ball. I'll go take another look at this. I
> had a
> > go at reproducing it (with just a single table) and failed - the packet
> in
> > is sent.
> >
> > It's only not sent, when FAUCET has put other flows in other tables and
> the
> > problem priority 0 rule is in table 2. I have some work to do clearly to
> > try and narrow that down.
> >
> > I also tried setting miss length to various values and that made no
> > difference.
> >
> >
> >
> > On Sat, Apr 7, 2018 at 4:42 AM Ben Pfaff <b...@ovn.org> wrote:
> >
> > > On Tue, Mar 06, 2018 at 11:20:40AM -0800, Ben Pfaff wrote:
> > > > On Tue, Mar 06, 2018 at 06:54:30AM +0000, Josh Bailey via discuss
> wrote:
> > > > > Hoping I'm missing something obvious!
> > > > >
> > > > > I have a flow like this:
> > > > >
> > > > > $ grep CONTROLLER sab-dump-flows.log
> > > > >  cookie=0x5adc15c0, duration=63.446s, table=3, n_packets=60,
> > > n_bytes=3436,
> > > > > priority=0 actions=CONTROLLER:96
> > > > >
> > > > > I can cause packets to match it, but no packets are output ot the
> > > > > controller.
> > > > >
> > > > > faucet@faucet
> > >
> :/var/tmp/faucet-tests-1KL3eg/FaucetUntaggedTestZeroPriorityFlowsTest-test_untagged$
> > > > > tshark -l -n -Q -d tcp.port==40649,openflow -O openflow_v4 -Y
> > > > > "openflow_v4.packet_in.total_len>0" -r fa*cap|wc -l
> > > > > 0
> > > > >
> > > > > If I specify any priority other than 0, it works (packets are
> output to
> > > > > controller via packet in messages).
> > > > >
> > > > > Is there something special about priority=0 flows and the
> CONTROLLER
> > > action?
> > > >
> > > > Yes, in fact OpenFlow specifies special cases for priority=0 flows
> that
> > > > match no fields.  It calls these "table-miss" flows, see e.g. section
> > > > 5.4 in OpenFlow 1.5.1.  Open vSwitch has some explicit special-case
> code
> > > > for dealing with them.
> > > >
> > > > I can't think of a particular reason why this special case would
> make a
> > > > difference for you.  Maybe there is a bug.  Do you have a way for us
> to
> > > > reproduce it?
> > > >
> > > > Did you try "ofproto/trace"?  Maybe it will show a reason why the
> packet
> > > > is not sent to the controller.
> > > >
> > > > (I'm at a conference this week, so my schedule is weird.)
> > >
> > > I wonder whether you figured out anything here and whether you have any
> > > more of a bug report for us.  Happy to help, if so.
> > >
>
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to