[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OFB45E9AD1.813A34E4-ON65257359.00150C57-65257359.001537DE@in.ibm.com>
Date: Mon, 17 Sep 2007 09:21:45 +0530
From: Krishna Kumar2 <krkumar2@...ibm.com>
To: Evgeniy Polyakov <johnpol@....mipt.ru>
Cc: davem@...emloft.net, gaagaan@...il.com,
general@...ts.openfabrics.org, hadi@...erus.ca,
herbert@...dor.apana.org.au, jagana@...ibm.com, jeff@...zik.org,
kaber@...sh.net, kumarkr@...ux.ibm.com, mcarlson@...adcom.com,
mchan@...adcom.com, netdev@...r.kernel.org,
peter.p.waskiewicz.jr@...el.com, randy.dunlap@...cle.com,
rdreier@...co.com, rick.jones2@...com, Robert.Olsson@...a.slu.se,
shemminger@...ux-foundation.org, sri@...ibm.com, tgraf@...g.ch,
xma@...ibm.com
Subject: Re: [PATCH 2/10 REV5] [core] Add skb_blist & support for batching
Hi Evgeniy,
Evgeniy Polyakov <johnpol@....mipt.ru> wrote on 09/14/2007 06:16:38 PM:
> > + if (dev->features & NETIF_F_BATCH_SKBS) {
> > + /* Driver supports batching skb */
> > + dev->skb_blist = kmalloc(sizeof *dev->skb_blist, GFP_KERNEL);
> > + if (dev->skb_blist)
> > + skb_queue_head_init(dev->skb_blist);
> > + }
> > +
>
> A nitpick is that you should use sizeof(struct ...) and I think it
> requires flag clearing in cae of failed initialization?
I thought it is better to use *var name in case the name of the structure
changes. Also, the flag is not cleared since I could try to enable batching
later, and it could succeed at that time. When skb_blist is allocated, then
batching is enabled otherwise it is disabled (while features flag just
indicates that driver supports batching).
Thanks,
- KK
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists