Re: [openstack-dev] [networking-sfc] OpenFlow version to use in the OVS agent

2016-09-21 Thread Bernard Cafarelli
Thanks, the comment and function name led me to think it was supposed
to only return the matching group.
So I will keep current 1.3 version in the L2 agent extension then!

On 20 September 2016 at 20:48, Cathy Zhang <cathy.h.zh...@huawei.com> wrote:
> Hi Bernard,
>
> Networking-sfc currently uses OF1.3. Although OF1.3 dumps all groups, 
> networking-sfc has follow-on filter code to select the info associated with 
> the specific group ID from the dump. So we are fine and let's keep it as 
> OF1.3.
>
> We can upgrade to OF1.5 when Neutron uses OF1.5.
>
> Thanks,
> Cathy
>
>
> -Original Message-
> From: Bernard Cafarelli [mailto:bcafa...@redhat.com]
> Sent: Tuesday, September 20, 2016 7:16 AM
> To: OpenStack Development Mailing List
> Subject: [openstack-dev] [networking-sfc] OpenFlow version to use in the OVS 
> agent
>
> In the OVSSfcAgent migration to a L2 agent extension review[1], Igor Duarte 
> Cardoso noticed a difference on the OpenFlow versions between a comment and 
> actual code.
> In current code [2], we have:
> # We need to dump-groups according to group Id, # which is a feature of 
> OpenFlow1.5 full_args = ["ovs-ofctl", "-O openflow13", cmd, self.br_name
>
> Indeed, only OpenFlow 1.5 and later support dumping a specific group [3]. 
> Earlier versions of OpenFlow always dump all groups.
> So current code will return all groups:
> $ sudo ovs-ofctl -O OpenFlow13 dump-groups br-int 1 OFPST_GROUP_DESC reply 
> (OF1.3) (xid=0x2):
>  
> group_id=1,type=select,bucket=actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)
>  
> group_id=2,type=select,bucket=actions=set_field:fa:16:3e:2d:f3:28->eth_dst,resubmit(,5)
> $ sudo ovs-ofctl -O OpenFlow15 dump-groups br-int 1 OFPST_GROUP_DESC reply 
> (OF1.5) (xid=0x2):
>  
> group_id=1,type=select,bucket=bucket_id:0,actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=bucket_id:1,actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)
>
> This code behavior will not change in my extension rewrite, so this will 
> still have to be fixed. though I am not sure on the solution:
> * We can use Openflow 1.5, but its support looks experimental? And Neutron 
> apparently only uses up to 1.4 (for OVS firewall extension)
> * Method to dump a group can "grep" the group ID in the complete dump.
> Not as efficient but works with OpenFlow 1.1+
> * Use another system to load balance across the port pairs?
>
> Thoughts?
> In gerrit, I kept it set to 1.5 (no impact for now as this is still marked as 
> WIP)
>
> [1]: https://review.openstack.org/#/c/351789
> [2]: 
> https://github.com/openstack/networking-sfc/blob/master/networking_sfc/services/sfc/common/ovs_ext_lib.py
> [3]: http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
>
> --
> Bernard Cafarelli
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



-- 
Bernard Cafarelli

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [networking-sfc] OpenFlow version to use in the OVS agent

2016-09-20 Thread Cathy Zhang
Hi Bernard,

Networking-sfc currently uses OF1.3. Although OF1.3 dumps all groups, 
networking-sfc has follow-on filter code to select the info associated with the 
specific group ID from the dump. So we are fine and let's keep it as OF1.3. 

We can upgrade to OF1.5 when Neutron uses OF1.5. 

Thanks,
Cathy


-Original Message-
From: Bernard Cafarelli [mailto:bcafa...@redhat.com] 
Sent: Tuesday, September 20, 2016 7:16 AM
To: OpenStack Development Mailing List
Subject: [openstack-dev] [networking-sfc] OpenFlow version to use in the OVS 
agent

In the OVSSfcAgent migration to a L2 agent extension review[1], Igor Duarte 
Cardoso noticed a difference on the OpenFlow versions between a comment and 
actual code.
In current code [2], we have:
# We need to dump-groups according to group Id, # which is a feature of 
OpenFlow1.5 full_args = ["ovs-ofctl", "-O openflow13", cmd, self.br_name

Indeed, only OpenFlow 1.5 and later support dumping a specific group [3]. 
Earlier versions of OpenFlow always dump all groups.
So current code will return all groups:
$ sudo ovs-ofctl -O OpenFlow13 dump-groups br-int 1 OFPST_GROUP_DESC reply 
(OF1.3) (xid=0x2):
 
group_id=1,type=select,bucket=actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)
 
group_id=2,type=select,bucket=actions=set_field:fa:16:3e:2d:f3:28->eth_dst,resubmit(,5)
$ sudo ovs-ofctl -O OpenFlow15 dump-groups br-int 1 OFPST_GROUP_DESC reply 
(OF1.5) (xid=0x2):
 
group_id=1,type=select,bucket=bucket_id:0,actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=bucket_id:1,actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)

This code behavior will not change in my extension rewrite, so this will still 
have to be fixed. though I am not sure on the solution:
* We can use Openflow 1.5, but its support looks experimental? And Neutron 
apparently only uses up to 1.4 (for OVS firewall extension)
* Method to dump a group can "grep" the group ID in the complete dump.
Not as efficient but works with OpenFlow 1.1+
* Use another system to load balance across the port pairs?

Thoughts?
In gerrit, I kept it set to 1.5 (no impact for now as this is still marked as 
WIP)

[1]: https://review.openstack.org/#/c/351789
[2]: 
https://github.com/openstack/networking-sfc/blob/master/networking_sfc/services/sfc/common/ovs_ext_lib.py
[3]: http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt

--
Bernard Cafarelli

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [networking-sfc] OpenFlow version to use in the OVS agent

2016-09-20 Thread Bernard Cafarelli
In the OVSSfcAgent migration to a L2 agent extension review[1], Igor
Duarte Cardoso noticed a difference on the OpenFlow versions between a
comment and actual code.
In current code [2], we have:
# We need to dump-groups according to group Id,
# which is a feature of OpenFlow1.5
full_args = ["ovs-ofctl", "-O openflow13", cmd, self.br_name

Indeed, only OpenFlow 1.5 and later support dumping a specific group
[3]. Earlier versions of OpenFlow always dump all groups.
So current code will return all groups:
$ sudo ovs-ofctl -O OpenFlow13 dump-groups br-int 1
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
 
group_id=1,type=select,bucket=actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)
 
group_id=2,type=select,bucket=actions=set_field:fa:16:3e:2d:f3:28->eth_dst,resubmit(,5)
$ sudo ovs-ofctl -O OpenFlow15 dump-groups br-int 1
OFPST_GROUP_DESC reply (OF1.5) (xid=0x2):
 
group_id=1,type=select,bucket=bucket_id:0,actions=set_field:fa:16:3e:05:46:69->eth_dst,resubmit(,5),bucket=bucket_id:1,actions=set_field:fa:16:3e:cd:b7:7e->eth_dst,resubmit(,5)

This code behavior will not change in my extension rewrite, so this
will still have to be fixed. though I am not sure on the solution:
* We can use Openflow 1.5, but its support looks experimental? And
Neutron apparently only uses up to 1.4 (for OVS firewall extension)
* Method to dump a group can "grep" the group ID in the complete dump.
Not as efficient but works with OpenFlow 1.1+
* Use another system to load balance across the port pairs?

Thoughts?
In gerrit, I kept it set to 1.5 (no impact for now as this is still
marked as WIP)

[1]: https://review.openstack.org/#/c/351789
[2]: 
https://github.com/openstack/networking-sfc/blob/master/networking_sfc/services/sfc/common/ovs_ext_lib.py
[3]: http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt

-- 
Bernard Cafarelli

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev