All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Ramachandra K <ramachandra.kuchimanchi@qlogic.com>
Cc: general@lists.openfabrics.org, netdev@vger.kernel.org,
	amar.mudrankit@qlogic.com, poornima.kamath@qlogic.com
Subject: Re: [PATCH 01/13] QLogic VNIC: Driver - netdev implementation
Date: Fri, 02 May 2008 11:15:10 -0700	[thread overview]
Message-ID: <adaiqxw4lox.fsf@cisco.com> (raw)
In-Reply-To: <20080430171624.31725.98475.stgit@localhost.localdomain> (Ramachandra K.'s message of "Wed, 30 Apr 2008 22:46:24 +0530")

 > From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com>
 > 
 > QLogic Virtual NIC Driver. This patch implements netdev registration,
 > netdev functions and state maintenance of the QLogic Virtual NIC
 > corresponding to the various events associated with the QLogic Ethernet 
 > Virtual I/O Controller (EVIC/VEx) connection.
 > 
 > Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com>
 > Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com>

For the next submission please clean up the From and Signed-off-by
lines.  As it stands now you are saying that you (Ramachandra K) are the
author of the patch, and that Poornima and Amar signed off on it (ie
forwarded it), but you as the person sending the email did not sign off
on it.

 > +#include <rdma/ib_cache.h>

I would like to kill off the caching support in the IB core, so adding
new users of the API is not desirable.  However your code doesn't seem
to call any functions from this header anyway, so I guess you can just
delete the include.

 > +void vnic_stop_xmit(struct vnic *vnic, struct netpath *netpath)
 > +{
 > +	VNIC_FUNCTION("vnic_stop_xmit()\n");
 > +	if (netpath == vnic->current_path) {
 > +		if (vnic->xmit_started) {
 > +			netif_stop_queue(vnic->netdevice);
 > +			vnic->xmit_started = 0;
 > +		}
 > +
 > +		vnic_stop_xmit_stats(vnic);
 > +	}
 > +}

Do you have sufficient locking here?  Could vnic->current_path or
vnic->xmit_started change after they are tested, leading to bad results?
Also do you get anything from having a xmit_started flag that you
couldn't get just by testing with netif_queue_stopped()?

 > +	vnic = (struct vnic *)device->priv;

All this device->priv should probably be using netdev_priv() instead,
and without a cast (since a cast from void * is not needed).

 > +	if (jiffies > netpath->connect_time +
 > +		      vnic->config->no_path_timeout) {

want to use time_after() for jiffies comparison to avoid problems with
jiffies wrap.

 > +	vnic->netdevice = alloc_netdev((int) 0, config->name, vnic_setup);
 > +	vnic->netdevice->priv = (void *)vnic;

Not sure this is even kosher to do any more.  Anyway I think it's much
cleaner if you just allocate everything with alloc_netdev instead of
trying to stick your own structure in the priv pointer.

 > +extern cycles_t recv_ref;

seems like too generic a name to make global.  What the heck are you
using cycle_t to keep track of anyway?

 > +/* This array should be kept next to enum above since a change to npevent_type
 > +   enum affects this array. */
 > +static const char *const vnic_npevent_str[] = {
 > +    "PRIMARY CONNECTED",
 > +    "PRIMARY DISCONNECTED",
 > +    "PRIMARY CARRIER",

putting this in a header means every file that uses it gets a private copy/

  reply	other threads:[~2008-05-02 18:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 17:15 [ofa-general] [PATCH 00/13] QLogic Virtual NIC (VNIC) Driver Ramachandra K
2008-04-30 17:16 ` [ofa-general] [PATCH 01/13] QLogic VNIC: Driver - netdev implementation Ramachandra K
2008-05-02 18:15   ` Roland Dreier [this message]
2008-05-05 15:36     ` [ofa-general] " Ramachandra K
2008-05-05 20:42       ` Roland Dreier
2008-04-30 17:16 ` [ofa-general] [PATCH 02/13] QLogic VNIC: Netpath - abstraction of connection to EVIC/VEx Ramachandra K
2008-04-30 17:17 ` [ofa-general] [PATCH 03/13] QLogic VNIC: Implementation of communication protocol with EVIC/VEx Ramachandra K
2008-04-30 17:17 ` [ofa-general] [PATCH 04/13] QLogic VNIC: Implementation of Control path of communication protocol Ramachandra K
2008-04-30 17:18 ` [ofa-general] [PATCH 05/13] QLogic VNIC: Implementation of Data " Ramachandra K
2008-04-30 17:18 ` [ofa-general] [PATCH 06/13] QLogic VNIC: IB core stack interaction Ramachandra K
2008-05-13 20:40   ` [ofa-general] " Roland Dreier
2008-04-30 17:19 ` [ofa-general] [PATCH 07/13] QLogic VNIC: Handling configurable parameters of the driver Ramachandra K
2008-05-13 20:41   ` Roland Dreier
2008-04-30 17:19 ` [ofa-general] [PATCH 08/13] QLogic VNIC: sysfs interface implementation for " Ramachandra K
2008-05-01 14:56   ` Stephen Hemminger
2008-05-01 16:02     ` [ofa-general] " Kuchimanchi, Ramachandra (Contractor - )
2008-05-01 16:43       ` [ofa-general] [RESEND] " Ramachandra K
2008-05-01 18:22         ` [ofa-general] " Stephen Hemminger
2008-04-30 17:20 ` [ofa-general] [PATCH 09/13] QLogic VNIC: IB Multicast for Ethernet broadcast/multicast Ramachandra K
2008-05-15 22:38   ` Roland Dreier
2008-04-30 17:20 ` [ofa-general] [PATCH 10/13] QLogic VNIC: Driver Statistics collection Ramachandra K
2008-05-15 22:33   ` Roland Dreier
2008-05-20 16:52     ` [ofa-general] " Ramachandra K
2008-04-30 17:21 ` [PATCH 11/13] QLogic VNIC: Driver utility file - implements various utility macros Ramachandra K
2008-05-01 14:58   ` [ofa-general] " Stephen Hemminger
2008-05-01 16:18     ` [ofa-general] " Kuchimanchi, Ramachandra (Contractor - )
2008-05-01 17:01       ` Ramachandra K
2008-05-01 18:26         ` Stephen Hemminger
2008-04-30 17:21 ` [ofa-general] [PATCH 12/13] QLogic VNIC: Driver Kconfig and Makefile Ramachandra K
2008-05-15 22:31   ` Roland Dreier
2008-04-30 17:22 ` [ofa-general] [PATCH 13/13] QLogic VNIC: Modifications to IB " Ramachandra K
2008-04-30 22:25 ` [ofa-general] Re: [PATCH 00/13] QLogic Virtual NIC (VNIC) Driver Roland Dreier

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=adaiqxw4lox.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=amar.mudrankit@qlogic.com \
    --cc=general@lists.openfabrics.org \
    --cc=netdev@vger.kernel.org \
    --cc=poornima.kamath@qlogic.com \
    --cc=ramachandra.kuchimanchi@qlogic.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 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.