On 10/01/2019 09:41, David Marchand wrote:
> 
> On Thu, Jan 10, 2019 at 10:32 AM Lam, Tiago <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     On 10/01/2019 09:12, David Marchand wrote:
>     > On Thu, Jan 10, 2019 at 10:11 AM David Marchand
>     > <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>> wrote:
>     >
>     >     This part triggers build (non fatal o_O) warnings on fedora 28.
>     >
>     >
>     > Oops, important.
>     > This is when building without dpdk support.
> 
>     I don't seem to be able to trigger this locally, can you point out what
>     gcc version you're using (or clang)? The Travis [1] and the ML bot
>     didn't complain either, so this might be specific to certain versions.
>     But I'll gladly take a look if I'm to replicate - although it warning
>     seems fairly straightforward to fix.
> 
> 
> Sure:
> # gcc --version
> gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)

Thanks, I'll include the below snippet in the next revision which,
I believe, should fix it.

Tiago.

diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 970aaf2..3f3b7e0 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -402,13 +402,11 @@ dp_packet_read_data(const struct dp_packet *b, size_t 
offset, size_t size,
         /* Non-DPDK dp_packets should always hit the above condition */
         ovs_assert(1);
 #endif
+    } else {    /* Copy all data. */
+        *ptr = buf;
+        dp_packet_copy_from_offset(b, offset, size, buf);
     }

-    /* Copy all data */
-
-    *ptr = buf;
-    dp_packet_copy_from_offset(b, offset, size, buf);
-
     return 0;
 }
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to