0001-Revert-net-reduce-skb_warn_bad_offload-noise.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From b776ff7db868804129b9f364825fd4e949a493ee Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <[email protected]>
  3. Date: Tue, 19 Sep 2017 09:36:43 +0200
  4. Subject: [PATCH] Revert "net: reduce skb_warn_bad_offload() noise"
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This reverts commit b2504a5dbef3305ef41988ad270b0e8ec289331c.
  9. Signed-off-by: Fabian Grünbichler <[email protected]>
  10. ---
  11. net/core/dev.c | 12 +++---------
  12. 1 file changed, 3 insertions(+), 9 deletions(-)
  13. diff --git a/net/core/dev.c b/net/core/dev.c
  14. index 73d5644fa834..7c8959936169 100644
  15. --- a/net/core/dev.c
  16. +++ b/net/core/dev.c
  17. @@ -2702,12 +2702,11 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
  18. struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
  19. netdev_features_t features, bool tx_path)
  20. {
  21. - struct sk_buff *segs;
  22. -
  23. if (unlikely(skb_needs_check(skb, tx_path))) {
  24. int err;
  25. - /* We're going to init ->check field in TCP or UDP header */
  26. + skb_warn_bad_offload(skb);
  27. +
  28. err = skb_cow_head(skb, 0);
  29. if (err < 0)
  30. return ERR_PTR(err);
  31. @@ -2735,12 +2734,7 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
  32. skb_reset_mac_header(skb);
  33. skb_reset_mac_len(skb);
  34. - segs = skb_mac_gso_segment(skb, features);
  35. -
  36. - if (unlikely(skb_needs_check(skb, tx_path)))
  37. - skb_warn_bad_offload(skb);
  38. -
  39. - return segs;
  40. + return skb_mac_gso_segment(skb, features);
  41. }
  42. EXPORT_SYMBOL(__skb_gso_segment);
  43. --
  44. 2.11.0