bpftool-struct_ops.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. ==================
  3. bpftool-struct_ops
  4. ==================
  5. -------------------------------------------------------------------------------
  6. tool to register/unregister/introspect BPF struct_ops
  7. -------------------------------------------------------------------------------
  8. :Manual section: 8
  9. .. include:: substitutions.rst
  10. SYNOPSIS
  11. ========
  12. **bpftool** [*OPTIONS*] **struct_ops** *COMMAND*
  13. *OPTIONS* := { |COMMON_OPTIONS| }
  14. *COMMANDS* :=
  15. { **show** | **list** | **dump** | **register** | **unregister** | **help** }
  16. STRUCT_OPS COMMANDS
  17. ===================
  18. | **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
  19. | **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
  20. | **bpftool** **struct_ops register** *OBJ*
  21. | **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
  22. | **bpftool** **struct_ops help**
  23. |
  24. | *STRUCT_OPS_MAP* := { **id** *STRUCT_OPS_MAP_ID* | **name** *STRUCT_OPS_MAP_NAME* }
  25. | *OBJ* := /a/file/of/bpf_struct_ops.o
  26. DESCRIPTION
  27. ===========
  28. **bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*]
  29. Show brief information about the struct_ops in the system.
  30. If *STRUCT_OPS_MAP* is specified, it shows information only
  31. for the given struct_ops. Otherwise, it lists all struct_ops
  32. currently existing in the system.
  33. Output will start with struct_ops map ID, followed by its map
  34. name and its struct_ops's kernel type.
  35. **bpftool struct_ops dump** [*STRUCT_OPS_MAP*]
  36. Dump details information about the struct_ops in the system.
  37. If *STRUCT_OPS_MAP* is specified, it dumps information only
  38. for the given struct_ops. Otherwise, it dumps all struct_ops
  39. currently existing in the system.
  40. **bpftool struct_ops register** *OBJ*
  41. Register bpf struct_ops from *OBJ*. All struct_ops under
  42. the ELF section ".struct_ops" will be registered to
  43. its kernel subsystem.
  44. **bpftool struct_ops unregister** *STRUCT_OPS_MAP*
  45. Unregister the *STRUCT_OPS_MAP* from the kernel subsystem.
  46. **bpftool struct_ops help**
  47. Print short help message.
  48. OPTIONS
  49. =======
  50. .. include:: common_options.rst
  51. EXAMPLES
  52. ========
  53. **# bpftool struct_ops show**
  54. ::
  55. 100: dctcp tcp_congestion_ops
  56. 105: cubic tcp_congestion_ops
  57. **# bpftool struct_ops unregister id 105**
  58. ::
  59. Unregistered tcp_congestion_ops cubic id 105
  60. **# bpftool struct_ops register bpf_cubic.o**
  61. ::
  62. Registered tcp_congestion_ops cubic id 110