Re: [ovs-dev] [PATCH v2 25/26] ofproto: Add 'command' to ofproto_flow_mod.

2016-07-29 Thread Jarno Rajahalme
Thanks for the reviews Ben! I pushed the series up to this patch to master.

  Jarno

> On Jul 29, 2016, at 4:23 PM, Ben Pfaff  wrote:
> 
> On Thu, Jul 28, 2016 at 05:56:17PM -0700, Jarno Rajahalme wrote:
>> This helps releasing ofputil_flow_mod earlier in a later patch.
>> 
>> Signed-off-by: Jarno Rajahalme 
> 
> Acked-by: Ben Pfaff 

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH v2 25/26] ofproto: Add 'command' to ofproto_flow_mod.

2016-07-29 Thread Ben Pfaff
On Thu, Jul 28, 2016 at 05:56:17PM -0700, Jarno Rajahalme wrote:
> This helps releasing ofputil_flow_mod earlier in a later patch.
> 
> Signed-off-by: Jarno Rajahalme 

Acked-by: Ben Pfaff 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH v2 25/26] ofproto: Add 'command' to ofproto_flow_mod.

2016-07-28 Thread Jarno Rajahalme
This helps releasing ofputil_flow_mod earlier in a later patch.

Signed-off-by: Jarno Rajahalme 
---
 ofproto/ofproto-provider.h | 1 +
 ofproto/ofproto.c  | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h
index f328b4a..35ce4f4 100644
--- a/ofproto/ofproto-provider.h
+++ b/ofproto/ofproto-provider.h
@@ -1910,6 +1910,7 @@ struct ofproto_flow_mod {
 
 /* Replicate needed fields from ofputil_flow_mod to not need it after the
  * flow has been created. */
+uint16_t command;
 uint32_t buffer_id;
 bool modify_cookie;
 
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 47020b8..b8b6bc2 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -7140,13 +7140,14 @@ ofproto_flow_mod_start(struct ofproto *ofproto, struct 
ofproto_flow_mod *ofm)
 }
 
 /* Forward flow mod fields we need later. */
+ofm->command = ofm->fm.command;
 ofm->buffer_id = ofm->fm.buffer_id;
 ofm->modify_cookie = ofm->fm.modify_cookie;
 
 ofm->modify_may_add_flow = (ofm->fm.new_cookie != OVS_BE64_MAX
 && ofm->fm.cookie_mask == htonll(0));
 
-switch (ofm->fm.command) {
+switch (ofm->command) {
 case OFPFC_ADD:
 ofm->event = NXFME_ADDED;
 return add_flow_start(ofproto, ofm);
@@ -7173,7 +7174,7 @@ static void
 ofproto_flow_mod_revert(struct ofproto *ofproto, struct ofproto_flow_mod *ofm)
 OVS_REQUIRES(ofproto_mutex)
 {
-switch (ofm->fm.command) {
+switch (ofm->command) {
 case OFPFC_ADD:
 add_flow_revert(ofproto, ofm);
 break;
@@ -7199,7 +7200,7 @@ ofproto_flow_mod_finish(struct ofproto *ofproto,
 const struct openflow_mod_requester *req)
 OVS_REQUIRES(ofproto_mutex)
 {
-switch (ofm->fm.command) {
+switch (ofm->command) {
 case OFPFC_ADD:
 add_flow_finish(ofproto, ofm, req);
 break;
@@ -7219,7 +7220,7 @@ ofproto_flow_mod_finish(struct ofproto *ofproto,
 }
 
 if (req) {
-ofconn_report_flow_mod(req->ofconn, ofm->fm.command);
+ofconn_report_flow_mod(req->ofconn, ofm->command);
 }
 }
 
-- 
2.1.4

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev