Re: [RFCv2 bluetooth-next 10/16] ieee820154: 6lowpan: dispatch evaluation rework

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

 



On Thu, Aug 20, 2015 at 06:47:39PM +0200, Alexander Aring wrote:
...
>  
>  	fq->q.stamp = skb->tstamp;
>  	if (frag_type == LOWPAN_DISPATCH_FRAG1) {
> -		/* Calculate uncomp. 6lowpan header to estimate full size */
> -		fq->q.meat += lowpan_uncompress_size(skb, NULL);
> +		fq->q.meat += skb->len;
>  		fq->q.flags |= INET_FRAG_FIRST_IN;
>  	} else {
>  		fq->q.meat += skb->len;

removed the else branch and move "fq->q.meat += skb->len;" out of any
branches, we do "fq->q.meat += skb->len;" always.

> @@ -325,8 +316,59 @@ out_oom:
>  	return -1;
>  }
>  
...
>  
> -	if (frag_info->d_size > IPV6_MIN_MTU) {
> +	if (frag_type == LOWPAN_DISPATCH_FRAG1) {
> +		lowpan_rx_result res;

changed to "int res".

> +
> +		res = lowpan_invoke_frag_rx_handlers(skb);
> +		if (res == NET_RX_DROP)
> +			goto err;
> +	}
> +
> +	if (cb->d_size > IPV6_MIN_MTU) {
>  		net_warn_ratelimited("lowpan_frag_rcv: datagram size exceeds MTU\n");
>  		goto err;
>  	}
>  
> -	fq = fq_find(net, frag_info, &source, &dest);
> +	fq = fq_find(net, cb, &hdr.source, &hdr.dest);
>  	if (fq != NULL) {
>  		int ret;
>  

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux