All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
	davem@davemloft.net, stephen@networkplumber.org,
	bridge@lists.linux-foundation.org
Subject: Re: [PATCH net-next 2/9] net: bridge: add bitfield for options and convert vlan opts
Date: Wed, 26 Sep 2018 17:01:02 +0200	[thread overview]
Message-ID: <20180926150102.GA1251@lunn.ch> (raw)
In-Reply-To: <e5b4f87d-c665-9476-c9d3-a7254394c13f@cumulusnetworks.com>

On Wed, Sep 26, 2018 at 05:55:47PM +0300, Nikolay Aleksandrov wrote:
> On 26/09/18 17:48, Andrew Lunn wrote:
> > Hi Nikolay
> > 
> >>  struct net_bridge {
> >>  	spinlock_t			lock;
> >>  	spinlock_t			hash_lock;
> >>  	struct list_head		port_list;
> >>  	struct net_device		*dev;
> >>  	struct pcpu_sw_netstats		__percpu *stats;
> >> +	unsigned long			options;
> > 
> > Maybe a u32 would be better, so we run out of bits at the same time on
> > 32 and 64 bit systems?
> > 
> >    Andrew
> > 
> 
> Bitops operate on an unsigned long, I actually had a BUILD_BUG_ON() for
> 32 bits initially, but checked other places and they seem to be using it
> as-is without any checks so I decided to leave it as well (e.g.
> sock_flags).

O.K.

I assume we get compiler warnings anyway, when we use bit 32 on a
32bit system. The build-bots should let us know.

      Andrew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
	bridge@lists.linux-foundation.org, davem@davemloft.net
Subject: Re: [Bridge] [PATCH net-next 2/9] net: bridge: add bitfield for options and convert vlan opts
Date: Wed, 26 Sep 2018 17:01:02 +0200	[thread overview]
Message-ID: <20180926150102.GA1251@lunn.ch> (raw)
In-Reply-To: <e5b4f87d-c665-9476-c9d3-a7254394c13f@cumulusnetworks.com>

On Wed, Sep 26, 2018 at 05:55:47PM +0300, Nikolay Aleksandrov wrote:
> On 26/09/18 17:48, Andrew Lunn wrote:
> > Hi Nikolay
> > 
> >>  struct net_bridge {
> >>  	spinlock_t			lock;
> >>  	spinlock_t			hash_lock;
> >>  	struct list_head		port_list;
> >>  	struct net_device		*dev;
> >>  	struct pcpu_sw_netstats		__percpu *stats;
> >> +	unsigned long			options;
> > 
> > Maybe a u32 would be better, so we run out of bits at the same time on
> > 32 and 64 bit systems?
> > 
> >    Andrew
> > 
> 
> Bitops operate on an unsigned long, I actually had a BUILD_BUG_ON() for
> 32 bits initially, but checked other places and they seem to be using it
> as-is without any checks so I decided to leave it as well (e.g.
> sock_flags).

O.K.

I assume we get compiler warnings anyway, when we use bit 32 on a
32bit system. The build-bots should let us know.

      Andrew

  reply	other threads:[~2018-09-26 21:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 12:17 [PATCH net-next 0/9] net: bridge: convert bool options to bits Nikolay Aleksandrov
2018-09-26 12:17 ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:17 ` [PATCH net-next 1/9] net: bridge: make struct opening bracket consistent Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:17 ` [PATCH net-next 2/9] net: bridge: add bitfield for options and convert vlan opts Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 14:48   ` Andrew Lunn
2018-09-26 14:48     ` [Bridge] " Andrew Lunn
2018-09-26 14:55     ` Nikolay Aleksandrov
2018-09-26 14:55       ` [Bridge] " Nikolay Aleksandrov
2018-09-26 15:01       ` Andrew Lunn [this message]
2018-09-26 15:01         ` Andrew Lunn
2018-09-26 12:17 ` [PATCH net-next 3/9] net: bridge: convert nf call options to bits Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:17 ` [PATCH net-next 4/9] net: bridge: convert group_addr_set option to a bit Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:17 ` [PATCH net-next 5/9] net: bridge: convert and rename mcast disabled Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:17 ` [PATCH net-next 6/9] net: bridge: convert mcast options to bits Nikolay Aleksandrov
2018-09-26 12:17   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:18 ` [PATCH net-next 7/9] net: bridge: convert neigh_suppress_enabled option to a bit Nikolay Aleksandrov
2018-09-26 12:18   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:18 ` [PATCH net-next 8/9] net: bridge: convert mtu_set_by_user " Nikolay Aleksandrov
2018-09-26 12:18   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:18 ` [PATCH net-next 9/9] net: bridge: pack net_bridge better Nikolay Aleksandrov
2018-09-26 12:18   ` [Bridge] " Nikolay Aleksandrov
2018-09-26 13:30   ` Ido Schimmel
2018-09-26 13:30     ` [Bridge] " Ido Schimmel
2018-09-26 13:35     ` Nikolay Aleksandrov
2018-09-26 13:35       ` [Bridge] " Nikolay Aleksandrov
2018-09-26 12:52 ` [PATCH net-next 0/9] net: bridge: convert bool options to bits Stephen Hemminger
2018-09-26 12:52   ` [Bridge] " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180926150102.GA1251@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.