Re: [ovs-dev] [PATCH 1/2] Make is_switch() in lflow.c a util function

2020-01-22 Thread 0-day Robot
Bleep bloop.  Greetings Numan Siddique, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
fatal: sha1 information is lacking or useless (controller/lflow.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Make is_switch() in lflow.c a util function
The copy of the patch that failed is found in:
   
/var/lib/jenkins/jobs/upstream_build_from_pw/workspace/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/2] Make is_switch() in lflow.c a util function

2020-01-22 Thread numans
From: Numan Siddique 

This patch renames is_switch() to datapath_is_switch() and moves to
lib/ovn-util.c.

Upcoming patch will make use of it.

Signed-off-by: Numan Siddique 
---
 controller/lflow.c | 11 ++-
 lib/ovn-util.c |  6 ++
 lib/ovn-util.h |  3 ++-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/controller/lflow.c b/controller/lflow.c
index 997c59662..96f2f7491 100644
--- a/controller/lflow.c
+++ b/controller/lflow.c
@@ -130,13 +130,6 @@ is_chassis_resident_cb(const void *c_aux_, const char 
*port_name)
 }
 }
 
-static bool
-is_switch(const struct sbrec_datapath_binding *ldp)
-{
-return smap_get(>external_ids, "logical-switch") != NULL;
-
-}
-
 void
 lflow_resource_init(struct lflow_resource_ref *lfrr)
 {
@@ -774,7 +767,7 @@ consider_logical_flow(
 struct ovnact_encode_params ep = {
 .lookup_port = lookup_port_cb,
 .aux = ,
-.is_switch = is_switch(ldp),
+.is_switch = datapath_is_switch(ldp),
 .group_table = group_table,
 .meter_table = meter_table,
 .lflow_uuid = lflow->header_.uuid,
@@ -798,7 +791,7 @@ consider_logical_flow(
 if (m->match.wc.masks.conj_id) {
 m->match.flow.conj_id += *conj_id_ofs;
 }
-if (is_switch(ldp)) {
+if (datapath_is_switch(ldp)) {
 unsigned int reg_index
 = (ingress ? MFF_LOG_INPORT : MFF_LOG_OUTPORT) - MFF_REG0;
 int64_t port_id = m->match.flow.regs[reg_index];
diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index e67c3c073..6e0bba2c5 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -423,3 +423,9 @@ ovn_logical_flow_hash(const struct uuid *logical_datapath,
 hash = hash_string(match, hash);
 return hash_string(actions, hash);
 }
+
+bool
+datapath_is_switch(const struct sbrec_datapath_binding *ldp)
+{
+return smap_get(>external_ids, "logical-switch") != NULL;
+}
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index b58208e9b..422d69e5b 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -23,6 +23,7 @@ struct sbrec_logical_flow;
 struct uuid;
 struct eth_addr;
 struct sbrec_port_binding;
+struct sbrec_datapath_binding;
 
 struct ipv4_netaddr {
 ovs_be32 addr;/* 192.168.10.123 */
@@ -86,5 +87,5 @@ uint32_t ovn_logical_flow_hash(const struct uuid 
*logical_datapath,
uint8_t table_id, const char *pipeline,
uint16_t priority,
const char *match, const char *actions);
-
+bool datapath_is_switch(const struct sbrec_datapath_binding *);
 #endif
-- 
2.24.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev