netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jay Vosburgh <j.vosburgh@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	Veaceslav Falico <vfalico@redhat.com>
Subject: Re: [PATCH net-next 0/5] bonding: simple macro cleanup
Date: Wed, 14 May 2014 15:29:22 +0200	[thread overview]
Message-ID: <20140514132922.GA24104@mikrodark.usersys.redhat.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1724466A@AcuExch.aculab.com>

On Wed, May 14, 2014 at 01:08:19PM +0000, David Laight wrote:
>From: Veaceslav Falico
>> Hi,
>>
>> That's a trivial patchset that tries to unify the macro usage of bonding
>> modes. I've split it into two approaches - either BOND_*, which takes
>> bonding struct as a param, or MODE_*, which takes the mode itself. Also,
>> introduce BOND_MODE(bond) instead of ugly bond->params.mode.
>
>I'm not sure these are improvements....
>
>I thought that netdev (in particular) preferred static inline functions
>to #defines - and especially #defines that expand their argument(s)
>more than once.

There's only one static inline function removal - which was completely
different from the usual macros (bond_is_lb()). Other macros are just
renames to quicker understand the code.

>
>IMHO Simple access functions are just a PITA when reading code since
>they cause the reader to go off somewhere and look up the definition.

I can make them either way, I've made this patchset while doing other
patchset, and the basic idea was that currently the usage of these macros
is quite illogical - some take bond as an argument, some the mode, and
there's a function that is a macro...

Anyway, I don't have a strong feeling either way, so if people think that
it's better the way it is - I'm ok with that.

>
>	David
>
>
>

  reply	other threads:[~2014-05-14 13:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 12:54 [PATCH net-next 0/5] bonding: simple macro cleanup Veaceslav Falico
2014-05-14 12:54 ` [PATCH net-next 1/5] bonding: use macro instead of bond_is_lb() Veaceslav Falico
2014-05-14 12:54 ` [PATCH net-next 2/5] bonding: rename {,BOND}_TX_QUEUE_OVERRIDE and make it accept bond struct Veaceslav Falico
2014-05-14 12:54 ` [PATCH net-next 3/5] bonding: rename {BOND_NO,MODE_NOT}_USES_ARP to better reflect its meaning Veaceslav Falico
2014-05-14 12:54 ` [PATCH net-next 4/5] bonding: rename {,MODE_}USES_PRIMARY " Veaceslav Falico
2014-05-14 12:54 ` [PATCH net-next 5/5] bonding: create a macro for bond mode and use it Veaceslav Falico
2014-05-14 13:08 ` [PATCH net-next 0/5] bonding: simple macro cleanup David Laight
2014-05-14 13:29   ` Veaceslav Falico [this message]
2014-05-14 16:10     ` Alexei Starovoitov
2014-05-14 16:29       ` Joe Perches
2014-05-14 21:52         ` Alexei Starovoitov
2014-05-14 22:03           ` Joe Perches
2014-05-14 23:37             ` Alexei Starovoitov
2014-05-15  0:04               ` [PATCH] tg3: Use static inlines not macros Joe Perches
2014-05-15  5:24                 ` Alexei Starovoitov
2014-05-15  9:04         ` [PATCH net-next 0/5] bonding: simple macro cleanup David Laight
2014-05-15  6:34       ` Veaceslav Falico

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=20140514132922.GA24104@mikrodark.usersys.redhat.com \
    --to=vfalico@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=andy@greyhouse.net \
    --cc=j.vosburgh@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).