[ofa-general] Re: [ewg] [PATCH] ofed_1_2/sdp - SDP can lose receive data

Ami Perlmutter amip at dev.mellanox.co.il
Tue May 29 23:43:06 PDT 2007


this is how the code looks now:

if (likely(skb_len && (tail = skb_peek_tail(&sk->sk_receive_queue))) &&
    unlikely(skb_tailroom(tail) >= skb_len)) {
	skb_copy_bits(skb, 0, skb_put(tail, skb_len), skb_len);
	__kfree_skb(skb);
	skb = tail;
} else
	skb_queue_tail(&sk->sk_receive_queue, skb);

could you point out the problem?

On Tue, 2007-05-29 at 10:24 -0700, Ralph Campbell wrote:
> It is from git://git.openfabrics.org/~vlad/ofed_1_2
> commit 726c6827ac31c0b2f40acd804dc53362289bd21f
> 
> On Sun, 2007-05-27 at 12:07 +0300, Ami Perlmutter wrote:
> > Ralph,
> > this is how the code is now.
> > Were are you getting this code from?
> > 
> > On Fri, 2007-05-25 at 17:33 -0700, Ralph Campbell wrote:
> > > Can this fix be considered for OFED 1.2?
> > > Thanks.
> > > 
> > > 
> > > If a receive work completion is processed but there is no room
> > > in a previously queued skb, the data is dropped.
> > > This patch fixes the problem by queuing the skb.
> > > 
> > > Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
> > > 
> > > diff -r 074340d1892d drivers/infiniband/ulp/sdp/sdp_bcopy.c
> > > --- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c	Fri May 25 17:04:51 2007 -0700
> > > +++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c	Fri May 25 17:07:02 2007 -0700
> > > @@ -314,7 +314,8 @@ static inline struct sk_buff *sdp_sock_q
> > >  			skb_copy_bits(skb, 0, skb_put(tail, skb_len), skb_len);
> > >  			__kfree_skb(skb);
> > >  			skb = tail;
> > > -		}
> > > +		} else
> > > +			skb_queue_tail(&sk->sk_receive_queue, skb);
> > >  	} else
> > >  		skb_queue_tail(&sk->sk_receive_queue, skb);
> > >  
> > > 
> > > 
> > > _______________________________________________
> > > ewg mailing list
> > > ewg at lists.openfabrics.org
> > > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
> > 
> > _______________________________________________
> > general mailing list
> > general at lists.openfabrics.org
> > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> > 
> > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 




More information about the general mailing list