Subject: Re: [PATCH 8/9] bnx2x: further annotations

From: Harvey Harrison <[email-masked]>
Date: Thu, 22 Jan 2009 10:17:04 -0800

On Thu, 2009-01-22 at 19:49 +0200, Eilon Greenstein wrote:
> On Tue, 2009-01-20 at 21:50 -0800, Harvey Harrison wrote:
> > No functional annotations, just documenting the status quo.
> > 
> > Signed-off-by: Harvey Harrison <[email-masked]>
> 
> [...]
> 
> > @@ -9699,11 +9699,11 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >  						 bd_prod, ++nbd);
> >  
> >  		pbd->lso_mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
> > -		pbd->tcp_send_seq = swab32(tcp_hdr(skb)->seq);
> > +		pbd->tcp_send_seq = cpu_to_le32(be32_to_cpu(tcp_hdr(skb)->seq));
> 
> Hmmm.... That looks worse to me. Do we really need to replace swab with
> cpu_to_le on top of be_to_cpu?

Agreed that it is ugly, in a future patch I was thinking of changing tcp_send_seq
to just be treated as a be-value throughout the driver, or at least a cpu-endian.

These patches are more about documenting the status quo than making functional
changes like that, so I went with the somewhat ugly annotation for now.  Once
the endian noise has been reduced, it will be a lot easier to make changes
without introducing bugs.

Harvey