net: usb: ax88179: Change to check if the packets are coming from gsb

Packets from gsb are cloned packets, which has been done
to optimize the dl data path. The check for cloned skb
calls pskb_expand_head which gives penalty in the throughput.
GSB driver data path does not consume the skb so, reallocation
of skb is not necessary here. For that reason the check for
all packets from gsb is introduced here. This check improves
the throughput to about 150 Mbps.

Change-Id: Ic1d7cc9c94605f1902ba212aac52d535d0ff84a7
Acked-by: Rishav LNU <rna@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
This commit is contained in:
Mohammed Javid 2018-07-25 15:01:38 +05:30 • committed by Gerrit - the friendly Code Review server
commit 74ab1d4b33

View file

@ -1431,12 +1431,20 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
headroom = skb_headroom(skb) - 8;
#ifdef CONFIG_ENABLE_SFE
if (((!(skb->fast_forwarded) && skb_header_cloned(skb)) ||
headroom < 0) &&
pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
dev_kfree_skb_any(skb);
return NULL;
}
#else
if ((skb_header_cloned(skb) || headroom < 0) &&
pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
dev_kfree_skb_any(skb);
return NULL;
}
#endif
ptr = skb_push(skb, 8);
put_unaligned_le32(tx_hdr1, ptr);
put_unaligned_le32(tx_hdr2, ptr + 4);