603-sdk_dpaa-update-the-xmit-timestamp-to-avoid-watchdog.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 3d33284eb087deb7f62639a2d2c03b9d0a3eeb34 Mon Sep 17 00:00:00 2001
  2. From: Camelia Groza <[email protected]>
  3. Date: Mon, 11 Sep 2017 17:20:41 +0800
  4. Subject: [PATCH] sdk_dpaa: update the xmit timestamp to avoid watchdog
  5. timeouts
  6. [core-linux part]
  7. Update txq0's trans_start in order to prevent the netdev watchdog from
  8. triggering too quickly. Since we set the LLTX flag, the stack won't update
  9. the jiffies for other tx queues. Prevent the watchdog from checking the
  10. other tx queues by adding the NETIF_HW_ACCEL_MQ flag.
  11. Signed-off-by: Camelia Groza <[email protected]>
  12. ---
  13. include/linux/netdev_features.h | 2 ++
  14. net/sched/sch_generic.c | 7 +++++++
  15. 2 files changed, 9 insertions(+)
  16. diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
  17. index 9c6c8ef2e9e7..90b4107ebeff 100644
  18. --- a/include/linux/netdev_features.h
  19. +++ b/include/linux/netdev_features.h
  20. @@ -74,6 +74,7 @@ enum {
  21. NETIF_F_BUSY_POLL_BIT, /* Busy poll */
  22. NETIF_F_HW_TC_BIT, /* Offload TC infrastructure */
  23. + NETIF_F_HW_ACCEL_MQ_BIT, /* Hardware-accelerated multiqueue */
  24. /*
  25. * Add your fresh new feature above and remember to update
  26. @@ -136,6 +137,7 @@ enum {
  27. #define NETIF_F_HW_L2FW_DOFFLOAD __NETIF_F(HW_L2FW_DOFFLOAD)
  28. #define NETIF_F_BUSY_POLL __NETIF_F(BUSY_POLL)
  29. #define NETIF_F_HW_TC __NETIF_F(HW_TC)
  30. +#define NETIF_F_HW_ACCEL_MQ __NETIF_F(HW_ACCEL_MQ)
  31. #define for_each_netdev_feature(mask_addr, bit) \
  32. for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT)
  33. diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
  34. index 6cfb6e9038c2..3fab16cb7c58 100644
  35. --- a/net/sched/sch_generic.c
  36. +++ b/net/sched/sch_generic.c
  37. @@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long arg)
  38. txq->trans_timeout++;
  39. break;
  40. }
  41. +
  42. + /* Devices with HW_ACCEL_MQ have multiple txqs
  43. + * but update only the first one's transmission
  44. + * timestamp so avoid checking the rest.
  45. + */
  46. + if (dev->features & NETIF_F_HW_ACCEL_MQ)
  47. + break;
  48. }
  49. if (some_queue_timedout) {
  50. --
  51. 2.11.1