[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH net-next V2 2/3] xen-netback: avoid allocating variable size array on stack

On Thu, May 02, 2013 at 04:55:46PM +0100, Ian Campbell wrote:
> > > +         more_data = txp->flags & XEN_NETTXF_more_data;
> > > +
> > > +         if (!drop_err)
> > > +                 txp++;
> > 
> > And no need for the conditional here afaict.
> I think it is needed, in the case where you've assigned txp =
> &dropped_tx you don't want to increment txp.
> Or perhaps it just gets reassigned back to &dropped_tx at the top of the
> next loop, so the increment doesn't matter. Subtle! I'm happy with
> whichever way Wei prefers, but it is probably worthy of a comment

Yes that's my starting point. I know that txp will always be assigned to
&dropped_tx, I just don't feel comfortable incrementing txp in that

This is really a personal taste thing. :-)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.