Re: [ovs-discuss] How to use group bucket actions with specific controller id? Is it possible?

2019-06-07 Thread Ben Pfaff
On Thu, May 16, 2019 at 04:18:32PM +0900, Yoonhee Choi wrote:
> I am implementing network control logic with an open source ryu controller.
> When I search the internet, I can use the controller id in the *T**h**e* *c*
> *o**n**t**r**o**l**l**e**r* *a**c**t**i**o**n *part of ovs-ofctl manual.
> 
> > http://www.openvswitch.org/support/dist-docs/ovs-actions.7.html
> 
> 
> I want to use it with the *group entry*. like below.
> 
> 
> $ ovs-ofctl -O OpenFlow13 add-flow br0
> table=1,priority=100(...etc..),actions=group:1
> $ ovs-ofctl -O OpenFlow13 add-group br0 "group_id=1, type=select,
> bucket=controller(reason=no_match,max_len=65530,id=2)"
> 
> In other words, I want to send packets to the ryu controller with a
> specific controller id through the action buckets in the group entry.

Thanks for the bug report/feature request.  You are right that this does
not currently work.

If you are still interested in this feature, you can try out the
following commit.  If it works for you, then I will apply it to the OVS
repository.

--8<--cut here-->8--

From: Ben Pfaff 
Date: Fri, 7 Jun 2019 12:35:12 -0700
Subject: [PATCH] ofp-actions: Allow "controller" action in action sets.

Requested-by: Yoonhee Choi 
Requested-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2019-May/048676.html
Signed-off-by: Ben Pfaff 
---
 lib/ofp-actions.c   |  4 ++--
 lib/ovs-actions.xml | 14 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 1a24063d087c..615ec23f26e2 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2017 Nicira, Inc.
+ * Copyright (c) 2008-2017, 2019 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -7752,6 +7752,7 @@ ofpact_copy(struct ofpbuf *out, const struct ofpact *a)
 FINAL(OFPACT_CT_CLEAR)  \
 FINAL(OFPACT_RESUBMIT)  \
 FINAL(OFPACT_OUTPUT)\
+FINAL(OFPACT_CONTROLLER)\
 FINAL(OFPACT_GROUP)
 
 enum action_set_class {
@@ -7816,7 +7817,6 @@ action_set_classify(const struct ofpact *a)
 case OFPACT_CLEAR_ACTIONS:
 case OFPACT_CLONE:
 case OFPACT_NAT:
-case OFPACT_CONTROLLER:
 case OFPACT_ENQUEUE:
 case OFPACT_EXIT:
 case OFPACT_UNROLL_XLATE:
diff --git a/lib/ovs-actions.xml b/lib/ovs-actions.xml
index ab6c0030aa50..77481694e2c2 100644
--- a/lib/ovs-actions.xml
+++ b/lib/ovs-actions.xml
@@ -108,13 +108,13 @@
 
 set_queue
 
-  group, output, resubmit,
-  ct_clear, or ct.  If more than one of these
-  actions is present, then the one listed earliest above is executed and
-  the others are ignored, regardless of the order in which they were added
-  to the action set.  (If none of these actions is present, the action set
-  has no real effect, because the modified packet is not sent anywhere and
-  thus the modifications are not visible.)
+  group, controller, output,
+  resubmit, ct_clear, or ct.  If
+  more than one of these actions is present, then the one listed earliest
+  above is executed and the others are ignored, regardless of the order in
+  which they were added to the action set.  (If none of these actions is
+  present, the action set has no real effect, because the modified packet
+  is not sent anywhere and thus the modifications are not visible.)
 
   
 
-- 
2.20.1

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


[ovs-discuss] How to use group bucket actions with specific controller id? Is it possible?

2019-05-16 Thread Yoonhee Choi
Hi.

I am implementing network control logic with an open source ryu controller.
When I search the internet, I can use the controller id in the *T**h**e* *c*
*o**n**t**r**o**l**l**e**r* *a**c**t**i**o**n *part of ovs-ofctl manual.

> http://www.openvswitch.org/support/dist-docs/ovs-actions.7.html


I want to use it with the *group entry*. like below.


$ ovs-ofctl -O OpenFlow13 add-flow br0
table=1,priority=100(...etc..),actions=group:1
$ ovs-ofctl -O OpenFlow13 add-group br0 "group_id=1, type=select,
bucket=controller(reason=no_match,max_len=65530,id=2)"

In other words, I want to send packets to the ryu controller with a
specific controller id through the action buckets in the group entry.

I knew how to specify the ryu controller id in the source via the mail
archive link below.
> https://www.mail-archive.com/ryu-devel@lists.sourceforge.net/msg13807.html

It works when the controller id is added to the actions of the actual table
flow instead of group.

but It doesn't work with group bucket function.. :(
ovs can not pass to a controller with a specific id.

only the default controller option without parameters works like below.

> group_id=1,type=select,bucket=actions=CONTROLLER:65535



Does ovs group bucket action can send to specific controller with id?
I want to insert serveral controller id (actions) with one bucket

I would like you to introduce me if there is a method.


p.s
* Verison info
ubuntu 16.04

ovs-ofctl (Open vSwitch) 2.5.5

OpenFlow versions 0x1:0x4


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