[ofa-general] [PATCH v1 for-2.6.27] IPOIB: add LRO support

Eli Cohen eli at mellanox.co.il
Tue Jun 24 06:42:38 PDT 2008


On Tue, 2008-06-24 at 15:37 +0300, Or Gerlitz wrote:
> Vladimir Sokolovsky wrote:
> > +static int get_skb_hdr(struct sk_buff *skb, void **iphdr,
> > +               void **tcph, u64 *hdr_flags, void *priv)
> > +{
> >
> > ...
> >
> > +
> > +    if (unlikely(skb->ip_summed != CHECKSUM_UNNECESSARY))
> > +        return -1;
> >
> > This will return -1 if HCA is not capable of doing checksum offload.
> >
> Yes, but in that case __lro_proc_skb() would use the value of  
> lro_mgr->ip_summed which you set independently of the HCA capabilities, 
> see below the code at the "out" label.
> 
You're right about your observation. But I can't find a reason why we
have this statement at all:

out:  /* Original SKB has to be posted to stack */
	skb->ip_summed = lro_mgr->ip_summed;
	return 1;

It seems that the skb's ip_summed field is not changed in the path that
leads to this label so why changing this filed to something that was
initialized globally?

Maybe one of the authors can comment on that?





--
Eli Cohen
Mellanox Technologies LTD.
SW- Linux
Phone: +972 (4) 909 7200 (ext 276)
Mobile: +972 (54) 650 1206
E-mail: eli at mellanox.co.il

----------------------------------------------------------------------
Emails belong on computers, trees belong in forests; if you must print
this, do it on recycled paper.
http://www.greenpeace.org/international/
----------------------------------------------------------------------


Disclaimer added by CodeTwo Exchange Rules
http://www.codetwo.com



More information about the general mailing list