summaryrefslogtreecommitdiff
path: root/drivers/emac-dwc-eqos
diff options
context:
space:
mode:
authorSunil Kumar Paidimarri <hisunil@codeaurora.org>2018-09-10 17:45:23 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-28 15:16:52 -0700
commit7dd319c9101da08ff542a11c72ebc1cbe8ec1a2a (patch)
tree31fba092046af769a16a47f06f94014fa3e49551 /drivers/emac-dwc-eqos
parented51f270ad606cc6746d48561cba42531607ee8d (diff)
downloaddata-kernel-7dd319c9101da08ff542a11c72ebc1cbe8ec1a2a.tar.gz
data-kernel: EMAC: Orphan IPv6 data skbs
Includes change to orphan IPv6 data as well as IPv4 data traffic to support peak embedded throughput. Also enable TSO for IPV6. Change-Id: I625259a081fa40003ecb6eaa33004b219a8c27ef CRs-Fixed: 2302108 Acked-by: Jagadeesh Babu Challagundla <jchallag@qti.qualcomm.com> Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
Diffstat (limited to 'drivers/emac-dwc-eqos')
-rw-r--r--drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c11
-rw-r--r--drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c1
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c b/drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c
index d74a8a1..58726ec 100644
--- a/drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c
+++ b/drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c
@@ -2412,11 +2412,10 @@ UINT DWC_ETH_QOS_get_total_desc_cnt(struct DWC_ETH_QOS_prv_data *pdata,
return count;
}
-UINT DWC_ETH_QOS_cal_int_mod(struct sk_buff *skb,
+inline UINT DWC_ETH_QOS_cal_int_mod(struct sk_buff *skb, UINT eth_type,
struct DWC_ETH_QOS_prv_data *pdata)
{
UINT ret = DEFAULT_INT_MOD;
- UINT eth_type = GET_ETH_TYPE(skb->data);
#ifdef DWC_ETH_QOS_CONFIG_PTP
if (eth_type == ETH_P_1588)
@@ -2472,9 +2471,8 @@ static int DWC_ETH_QOS_start_xmit(struct sk_buff *skb, struct net_device *dev)
int tso;
struct netdev_queue *devq = netdev_get_tx_queue(dev, qinx);
UINT int_mod = 1;
+ UINT eth_type = 0;
- if (ip_hdr(skb)->protocol == IPPROTO_TCP)
- skb_orphan(skb);
DBGPR("-->DWC_ETH_QOS_start_xmit: skb->len = %d, qinx = %u\n",
skb->len, qinx);
@@ -2595,10 +2593,13 @@ static int DWC_ETH_QOS_start_xmit(struct sk_buff *skb, struct net_device *dev)
if ((pdata->hw_feat.tsstssel == 0) || (pdata->hwts_tx_en == 0))
skb_tx_timestamp(skb);
+ eth_type = GET_ETH_TYPE(skb->data);
/*For TSO packets, IOC bit is to be set to 1 in order to avoid data stall*/
if (!tso)
- int_mod = DWC_ETH_QOS_cal_int_mod(skb, pdata);
+ int_mod = DWC_ETH_QOS_cal_int_mod(skb, eth_type, pdata);
+ if (eth_type == ETH_P_IP || eth_type == ETH_P_IPV6)
+ skb_orphan(skb);
/* configure required descriptor fields for transmission */
hw_if->pre_xmit(pdata, qinx, int_mod);
diff --git a/drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c b/drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c
index f4632e7..b853468 100644
--- a/drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c
+++ b/drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c
@@ -1382,6 +1382,7 @@ static int DWC_ETH_QOS_configure_netdevice(struct platform_device *pdev)
if (pdata->hw_feat.tso_en) {
dev->hw_features = NETIF_F_TSO;
+ dev->hw_features |= NETIF_F_TSO6;
#ifdef DWC_ETH_QOS_CONFIG_UFO
dev->hw_features |= NETIF_F_UFO;
#endif