On Fri, May 23, 2014 at 03:26:20PM +0300, Lori Jakab wrote:
> On 5/23/14, 12:22 AM, Ben Pfaff wrote:
> >On Tue, May 13, 2014 at 05:02:16PM +0300, Lorand Jakab wrote:
> >>Implementation of the pop_eth and push_eth actions in the kernel, and
> >>layer 3 flow support.
> >>
> >>Signed-off-by: Lorand Jakab <loja...@cisco.com>
> >"sparse" complains thus:
> >
> >     /home/blp/ovs/_build/datapath/linux/flow_netlink.c:528:17:
> >     warning: expression using sizeof bool
> >     /home/blp/ovs/_build/datapath/linux/flow_netlink.c:531:17:
> >     warning: expression using sizeof bool
> 
> The patch adds a bool member to struct sw_flow_key:
> 
> --- a/datapath/flow.h
> +++ b/datapath/flow.h
> @@ -73,6 +73,7 @@ struct sw_flow_key {
>                 u32     priority;       /* Packet QoS priority. */
>                 u32     skb_mark;       /* SKB mark. */
>                 u16     in_port;        /* Input switch port (or
> DP_MAX_PORTS). */
> +               bool    noeth;          /* Packet has no Ethernet header */
>         } __packed phy; /* Safe when right after 'tun_key'. */
>         u32 ovs_flow_hash;              /* Datapath computed hash
> value.  */
>         u32 recirc_id;                  /* Recirculation ID.  */
> 
> Should I change the type to something else to silence this warning?
> Do you know if using sizeof(bool) is actually causing problems?

On second thought, sufficiently new sparse no longer warns about this
(it was always a stupid warning IMO), so you can ignore this comment.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to