> 
> There seems that skb_get could outlight skb_clone, if
> retransmitting skb is the major concern.
> 
> Signed-off-by: Hillf Danton <[email protected]>
> ---
> 
> --- 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

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to