nvethernet: Use delayed workqueue for tx timestamp

Issue:
- Workqueue for Tx timestamp is running without
  delay, use many CPU cycle at hard isr thread
  priority.
- Incorrect return value from ether_handle_tso()

Fix:
- Update code to use delayed workqueue
- Return correct value

Bug 200780891
Bug 3400623

Change-Id: I2095a0634e079bf870ef87cd2de1d35fe24bafd4
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2610986
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Rakesh Goyal
2021-10-13 19:38:55 +05:30
committed by Revanth Kumar Uppala
parent a54d1536bd
commit 5f3e27f093
3 changed files with 21 additions and 8 deletions

View File

@@ -290,6 +290,12 @@ static inline int ether_avail_txdesc_cnt(struct osi_tx_ring *tx_ring)
*/
#define ETHER_STATS_TIMER 3U
/**
* @brief Timer to trigger Work queue periodically which read TX timestamp
* for PTP packets. Timer is in milisecond.
*/
#define ETHER_TS_MS_TIMER 1U
#define ETHER_VM_IRQ_TX_CHAN_MASK(x) BIT((x) * 2U)
#define ETHER_VM_IRQ_RX_CHAN_MASK(x) BIT(((x) * 2U) + 1U)
@@ -543,7 +549,7 @@ struct ether_priv_data {
/** local L2 filter address list head pointer */
struct list_head mac_addr_list_head;
/** skb tx timestamp update work queue */
struct work_struct tx_ts_work;
struct delayed_work tx_ts_work;
/** local skb list head */
struct list_head tx_ts_skb_head;
/** pre allocated memory for ether_tx_ts_skb_list list */