102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 6e7cd9c0abffea55e39a4160949bc6fba972d161 Mon Sep 17 00:00:00 2001
  2. From: Christian Marangi <[email protected]>
  3. Date: Thu, 19 Jan 2023 13:37:46 +0100
  4. Subject: [PATCH] net/flow_offload: use NL_SET_ERR_MSG instead of
  5. NL_SET_ERR_MSG_MOD
  6. Use NL_SET_ERR_MSG instead of NL_SET_ERR_MSG_MOD for bpf modules as
  7. kernel modules are not supported.
  8. Signed-off-by: Christian Marangi <[email protected]>
  9. ---
  10. include/net/flow_offload.h | 6 +++---
  11. 1 file changed, 3 insertions(+), 3 deletions(-)
  12. diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
  13. index 7a2b022..f17c485 100644
  14. --- a/include/net/flow_offload.h
  15. +++ b/include/net/flow_offload.h
  16. @@ -321,7 +321,7 @@ flow_action_mixed_hw_stats_check(const struct flow_action *action,
  17. flow_action_for_each(i, action_entry, action) {
  18. if (i && action_entry->hw_stats != last_hw_stats) {
  19. - NL_SET_ERR_MSG_MOD(extack, "Mixing HW stats types for actions is not supported");
  20. + NL_SET_ERR_MSG(extack, "Mixing HW stats types for actions is not supported");
  21. return false;
  22. }
  23. last_hw_stats = action_entry->hw_stats;
  24. @@ -356,11 +356,11 @@ __flow_action_hw_stats_check(const struct flow_action *action,
  25. if (!check_allow_bit &&
  26. ~action_entry->hw_stats & FLOW_ACTION_HW_STATS_ANY) {
  27. - NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
  28. + NL_SET_ERR_MSG(extack, "Driver supports only default HW stats type \"any\"");
  29. return false;
  30. } else if (check_allow_bit &&
  31. !(action_entry->hw_stats & BIT(allow_bit))) {
  32. - NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
  33. + NL_SET_ERR_MSG(extack, "Driver does not support selected HW stats type");
  34. return false;
  35. }
  36. return true;
  37. --
  38. 2.38.1