From: David Miller <davem@davemloft.net>
To: allen.lkml@gmail.com
Cc: jes@trained-monkey.org, kuba@kernel.org, dougmill@linux.ibm.com,
cooldavid@cooldavid.org, mlindner@marvell.com,
stephen@networkplumber.org, borisp@mellanox.com,
netdev@vger.kernel.org, romain.perier@gmail.com
Subject: Re: [PATCH v2 01/20] ethernet: alteon: convert tasklets to use new tasklet_setup() API
Date: Wed, 09 Sep 2020 14:33:24 -0700 (PDT) [thread overview]
Message-ID: <20200909.143324.405366987951760976.davem@davemloft.net> (raw)
In-Reply-To: <CAOMdWSKQxbKzo6z9BBO=0HPCxSs1nt8ArAe5zi_X5cPQhtnUVA@mail.gmail.com>
From: Allen <allen.lkml@gmail.com>
Date: Thu, 10 Sep 2020 00:06:47 +0530
>>
>> > @@ -1562,10 +1562,11 @@ static void ace_watchdog(struct net_device *data, unsigned int txqueue)
>> > }
>> >
>> >
>> > -static void ace_tasklet(unsigned long arg)
>> > +static void ace_tasklet(struct tasklet_struct *t)
>> > {
>> > - struct net_device *dev = (struct net_device *) arg;
>> > - struct ace_private *ap = netdev_priv(dev);
>> > + struct ace_private *ap = from_tasklet(ap, t, ace_tasklet);
>> > + struct net_device *dev = (struct net_device *)((char *)ap -
>> > + ALIGN(sizeof(struct net_device), NETDEV_ALIGN));
>> > int cur_size;
>> >
>>
>> I don't see this is as an improvement. The 'dev' assignment looks so
>> incredibly fragile and exposes so many internal details about netdev
>> object allocation, alignment, and layout.
>>
>> Who is going to find and fix this if someone changes how netdev object
>> allocation works?
>>
>
> Thanks for pointing it out. I'll see if I can fix it to keep it simple.
Just add a backpointer to the netdev from the netdev_priv() if you
absolutely have too.
>> I don't want to apply this, it sets a very bad precedent. The existing
>> code is so much cleaner and easier to understand and audit.
>
> Will you pick the rest of the patches or would they have to wait till
> this one is
> fixed.
I never pick up a partial series, ever. So yes you will have to fix these
two patches up and resubmit the entire thing.
next prev parent reply other threads:[~2020-09-09 21:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 8:44 [PATCH v2 00/20] ethernet: convert tasklets to use new Allen Pais
2020-09-09 8:44 ` [PATCH v2 01/20] ethernet: alteon: convert tasklets to use new tasklet_setup() API Allen Pais
2020-09-09 18:09 ` David Miller
2020-09-09 18:36 ` Allen
2020-09-09 21:33 ` David Miller [this message]
2020-09-11 5:53 ` Allen
2020-09-11 10:00 ` Allen
2020-09-11 20:20 ` David Miller
2020-09-09 8:44 ` [PATCH v2 02/20] ethernet: amd: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 03/20] broadcom: cnic: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 04/20] ethernet: cadence: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 05/20] ethernet: cavium: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 06/20] ethernet: chelsio: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 07/20] ethernet: dlink: " Allen Pais
2020-09-09 18:11 ` David Miller
2020-09-09 8:44 ` [PATCH v2 08/20] ethernet: hinic: " Allen Pais
2020-09-09 8:44 ` [PATCH v2 09/20] ethernet: ehea: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 10/20] ethernet: ibmvnic: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 11/20] ethernet: jme: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 12/20] ethernet: marvell: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 13/20] ethernet: mellanox: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 14/20] ethernet: micrel: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 15/20] ethernet: natsemi: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 16/20] ethernet: netronome: " Allen Pais
2020-09-09 15:46 ` Jakub Kicinski
2020-09-09 16:28 ` Simon Horman
2020-09-09 8:45 ` [PATCH v2 17/20] ethernet: ni: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 18/20] ethernet: qlogic: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 19/20] ethernet: silan: " Allen Pais
2020-09-09 8:45 ` [PATCH v2 20/20] ethernet: smsc: " Allen Pais
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=20200909.143324.405366987951760976.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=allen.lkml@gmail.com \
--cc=borisp@mellanox.com \
--cc=cooldavid@cooldavid.org \
--cc=dougmill@linux.ibm.com \
--cc=jes@trained-monkey.org \
--cc=kuba@kernel.org \
--cc=mlindner@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=romain.perier@gmail.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 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).