mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
nvethernet: schedule TX timestamp workqueue
Issue: With TSN + PTP test cases, PTP packets shaped based on TSN GCL which may lead to not having time stamp when asked. Fix: in case of failure to get timestamp, schedule workqueue again to try to get timestamp. Bug 200777069 Change-Id: Ic557f6ba7df5147ce85b21278f053e07a984f410 Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2599845 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
44b74a383b
commit
260d005cc1
@@ -36,6 +36,7 @@ static void ether_get_tx_ts(struct work_struct *work)
|
||||
struct list_head *head_node, *temp_head_node;
|
||||
struct skb_shared_hwtstamps shhwtstamp;
|
||||
struct osi_ioctl ioctl_data = {};
|
||||
static unsigned int miss_count;
|
||||
unsigned long long nsec = 0x0;
|
||||
struct ether_tx_ts_skb_list *pnode;
|
||||
int ret = -1;
|
||||
@@ -56,6 +57,7 @@ static void ether_get_tx_ts(struct work_struct *work)
|
||||
ioctl_data.tx_ts.pkt_id = pnode->pktid;
|
||||
ret = osi_handle_ioctl(pdata->osi_core, &ioctl_data);
|
||||
if (ret == 0) {
|
||||
miss_count = 0U;
|
||||
/* get time stamp form ethernet server */
|
||||
dev_dbg(pdata->dev, "%s() pktid = %x, skb = %p\n",
|
||||
__func__, pnode->pktid, pnode->skb);
|
||||
@@ -86,6 +88,9 @@ update_skb:
|
||||
|
||||
} else {
|
||||
dev_dbg(pdata->dev, "Unable to retrieve TS from OSI\n");
|
||||
miss_count++;
|
||||
if (miss_count < TS_MISS_THRESHOLD)
|
||||
schedule_work(&pdata->tx_ts_work);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user