RE: [PATCH] replace skb_clone with skb_get in fcoe_start_io()

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

 



> 
> There seems that skb_get could outlight skb_clone, if
> retransmitting skb is the major concern.
> 
> Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
> ---
> 
> --- a/drivers/scsi/fcoe/fcoe.c	2010-09-13 07:07:38.000000000 +0800
> +++ b/drivers/scsi/fcoe/fcoe.c	2010-10-17 20:03:08.000000000 +0800
> @@ -1373,15 +1373,14 @@ err2:
>   */
>  static inline int fcoe_start_io(struct sk_buff *skb)
>  {
> -	struct sk_buff *nskb;
>  	int rc;
> 
> -	nskb = skb_clone(skb, GFP_ATOMIC);
> -	rc = dev_queue_xmit(nskb);
> -	if (rc != 0)
> +	skb_get(skb); /* bump ref count for retransmitting */
> +	rc = dev_queue_xmit(skb);
> +	if (rc != NET_XMIT_SUCCESS)
>  		return rc;
>  	kfree_skb(skb);
> -	return 0;
> +	return NET_XMIT_SUCCESS;
>  }
> 
>  /**

No, this was due to dev_queue_xmit not liking shared skb since 
__skb_linearize() would bug on, so we clone the skb here to be
passed to dev_queue_xmit(), refer to the original commit id below
for more details:

18fa11efc279c20af5eefff2bbe814ca067e51ae

Yi

ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±þÇ‹ø¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux