From: aaron.young@oracle.com
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, sowmini.varadhan@oracle.com,
alexandre.chartre@oracle.com, rashmi.narasimhan@oracle.com
Subject: Re: [PATCH net-next 3/4] ldmvsw: Add ldmvsw.c driver code
Date: Fri, 11 Mar 2016 12:46:00 -0800 [thread overview]
Message-ID: <56E32E88.2070301@oracle.com> (raw)
In-Reply-To: <20160311.143022.2226126311284772576.davem@davemloft.net>
Thank you very much for the review. I'll make the requested changes
and resubmit the series...
-Aaron Young
On 03/11/16 11:30, David Miller wrote:
> From: Aaron Young <Aaron.Young@oracle.com>
> Date: Tue, 8 Mar 2016 07:02:35 -0800
>
>> +static struct vnet *vsw_get_vnet(struct mdesc_handle *hp,
>> + u64 port_node,
>> + u64 *handle)
>> +{
>> + struct vnet *vp;
>> + struct vnet *iter;
>> + const u64 *local_mac = NULL;
>> + const u64 *cfghandle = NULL;
>> + u64 a;
> Please order local variable declarations from longest to shortest line (reverse
> christmas tree).
>
>> +static int vsw_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>> +{
>> + struct mdesc_handle *hp;
>> + struct vnet_port *port;
>> + unsigned long flags;
>> + struct vnet *vp;
>> + struct net_device *dev;
>> + const u64 *rmac;
>> + int len, i, err;
>> + const u64 *port_id;
>> + u64 handle;
> Likewise.
>
>> + err = register_netdev(dev);
>> + if (err) {
>> + pr_err("Cannot register net device, aborting\n");
>> + goto err_out_free_ldc;
>> + }
>> +
>> + netif_napi_add(dev, &port->napi, vnet_poll_common,
>> + NAPI_POLL_WEIGHT);
>> +
>> + INIT_LIST_HEAD(&port->list);
> You cannot register the netdevice so early. It must be registerred only after
> every single piece of software state is initialized and setup.
>
> At the very precise moment you invoke register_netdev() the device can
> be brought up and attempted to be used.
next prev parent reply other threads:[~2016-03-11 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 15:02 [PATCH net-next 0/4] ldmvsw: Add ldmvsw driver Aaron Young
2016-03-08 15:02 ` [PATCH net-next 1/4] ldmvsw: Split sunvnet driver into common code Aaron Young
2016-03-11 19:26 ` David Miller
2016-03-08 15:02 ` [PATCH net-next 2/4] ldmvsw: Make sunvnet_common compatible with ldmvsw Aaron Young
2016-03-11 19:27 ` David Miller
2016-03-08 15:02 ` [PATCH net-next 3/4] ldmvsw: Add ldmvsw.c driver code Aaron Young
2016-03-11 19:30 ` David Miller
2016-03-11 20:46 ` aaron.young [this message]
2016-03-08 15:02 ` [PATCH net-next 4/4] ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c Aaron Young
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=56E32E88.2070301@oracle.com \
--to=aaron.young@oracle.com \
--cc=alexandre.chartre@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rashmi.narasimhan@oracle.com \
--cc=sowmini.varadhan@oracle.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).