Re: [ovs-discuss] Query regarding packet_in reason sent from OvS for “Table-miss” rule.

2018-04-30 Thread Ben Pfaff
On Tue, Apr 24, 2018 at 04:48:19AM +, Rohith Basavaraja wrote:
> Hi,
> 
> Currently in OvS if we hit "Table-miss" rules (associated with Controller 
> action) then we send
> PACKET_IN message to controller with reason as OFPR_NO_MATCH.
> 
> “Table-miss” rule is one whose priority is 0 and its catch all rule.
> 
> But if we hit same "Table-miss" rule after executing group entry we will send 
> the reason as
> OFPR_ACTION (for OF1.3 and below) and OFPR_GROUP (for OF1.4 and above).
> 
> This is because once we execute group entry we set ctx->in_group and later 
> when we hit the
> "Table-miss" rule, Since ctx->in_group  is set we send reason as OFPR_ACTION 
> (for OF1.3) and
> OFPR_GROUP (for OF1.4 and above).
> 
> Since in the packet_in message we are sending the table-id of the 
> corresponding “Table-miss” rule
> Shouldn’t we send the reason for packet-in as OFPR_NO_MATCH ( the reason 
> appropriate to the
> Corresponding rule?)
> 
> For eg: for the following pipeline we will send the reason as OFPR_ACTION 
> even if we hit
> The “Table-miss” rule.
> 
> cookie=0x800, duration=761.189s, table=0, n_packets=1401, n_bytes=67954, 
> priority=4,in_port=9,vlan_tci=0x/0x1fff 
> actions=write_metadata:0x678700/0xff01,goto_table:17
> 
> cookie=0x681, duration=768.848s, table=17, n_packets=1418, n_bytes=68776, 
> priority=10,metadata=0x678700/0xff00 
> actions=write_metadata:0xe0678700/0xfffe,goto_table:60
> 
> cookie=0x680, duration=24944.312s, table=60, n_packets=58244, 
> n_bytes=2519520, priority=0 actions=resubmit(,17)
> cookie=0x804, duration=785.733s, table=17, n_packets=1450, n_bytes=69724, 
> priority=10,metadata=0xe0678700/0xff00 
> actions=write_metadata:0x67871d4d00/0xfffe,goto_table:43
> 
> cookie=0x822002d, duration=24960.795s, table=43, n_packets=53097, 
> n_bytes=2230074, priority=100,arp,arp_op=1 actions=group:6000
> group_id=6000,type=all,bucket=actions=CONTROLLER:65535,bucket=actions=resubmit(,48),bucket=actions=resubmit(,81)
> 
> cookie=0x850, duration=24977.323s, table=48, n_packets=58309, 
> n_bytes=2522634, priority=0 actions=resubmit(,49),resubmit(,50)
> 
> cookie=0x805, duration=24984.679s, table=50, n_packets=6, n_bytes=264, 
> priority=0 
> actions=CONTROLLER:65535,learn(table=49,hard_timeout=10,priority=0,cookie=0x860,NXM_OF_ETH_SRC[],load:0x1->NXM_NX_REG4[0..7]),goto_table:51
> (Note that Table50 entry is a “Table-miss” rule).
> 
> Currently we are sending table_id as 50 and packet_in reason as OFPR_ACTION.
> Shouldn’t we send packet_in reason as OFPR_NO_MATCH in this case?

This seems like a reasonable argument.  Would you mind submitting a
patch (and including a test)?

Thanks,

Ben.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Query regarding packet_in reason sent from OvS for “Table-miss” rule.

2018-04-23 Thread Rohith Basavaraja
Hi,

Currently in OvS if we hit "Table-miss" rules (associated with Controller 
action) then we send
PACKET_IN message to controller with reason as OFPR_NO_MATCH.

“Table-miss” rule is one whose priority is 0 and its catch all rule.

But if we hit same "Table-miss" rule after executing group entry we will send 
the reason as
OFPR_ACTION (for OF1.3 and below) and OFPR_GROUP (for OF1.4 and above).

This is because once we execute group entry we set ctx->in_group and later when 
we hit the
"Table-miss" rule, Since ctx->in_group  is set we send reason as OFPR_ACTION 
(for OF1.3) and
OFPR_GROUP (for OF1.4 and above).

Since in the packet_in message we are sending the table-id of the corresponding 
“Table-miss” rule
Shouldn’t we send the reason for packet-in as OFPR_NO_MATCH ( the reason 
appropriate to the
Corresponding rule?)

For eg: for the following pipeline we will send the reason as OFPR_ACTION even 
if we hit
The “Table-miss” rule.

cookie=0x800, duration=761.189s, table=0, n_packets=1401, n_bytes=67954, 
priority=4,in_port=9,vlan_tci=0x/0x1fff 
actions=write_metadata:0x678700/0xff01,goto_table:17

cookie=0x681, duration=768.848s, table=17, n_packets=1418, n_bytes=68776, 
priority=10,metadata=0x678700/0xff00 
actions=write_metadata:0xe0678700/0xfffe,goto_table:60

cookie=0x680, duration=24944.312s, table=60, n_packets=58244, 
n_bytes=2519520, priority=0 actions=resubmit(,17)
cookie=0x804, duration=785.733s, table=17, n_packets=1450, n_bytes=69724, 
priority=10,metadata=0xe0678700/0xff00 
actions=write_metadata:0x67871d4d00/0xfffe,goto_table:43

cookie=0x822002d, duration=24960.795s, table=43, n_packets=53097, 
n_bytes=2230074, priority=100,arp,arp_op=1 actions=group:6000
group_id=6000,type=all,bucket=actions=CONTROLLER:65535,bucket=actions=resubmit(,48),bucket=actions=resubmit(,81)

cookie=0x850, duration=24977.323s, table=48, n_packets=58309, 
n_bytes=2522634, priority=0 actions=resubmit(,49),resubmit(,50)

cookie=0x805, duration=24984.679s, table=50, n_packets=6, n_bytes=264, 
priority=0 
actions=CONTROLLER:65535,learn(table=49,hard_timeout=10,priority=0,cookie=0x860,NXM_OF_ETH_SRC[],load:0x1->NXM_NX_REG4[0..7]),goto_table:51
(Note that Table50 entry is a “Table-miss” rule).

Currently we are sending table_id as 50 and packet_in reason as OFPR_ACTION.
Shouldn’t we send packet_in reason as OFPR_NO_MATCH in this case?


Thanks
Rohith



___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss