Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: openvswitch: clean up some kernel-doc warnings

Fix some kernel-doc warnings in openvswitch.h:

Mark enum placeholders that are not used as "private" so that kernel-doc
comments are not needed for them.

Correct names for 2 enum values:
Warning: include/uapi/linux/openvswitch.h:300 Excess enum value
'@OVS_VPORT_UPCALL_SUCCESS' description in 'ovs_vport_upcall_attr'
Warning: include/uapi/linux/openvswitch.h:300 Excess enum value
'@OVS_VPORT_UPCALL_FAIL' description in 'ovs_vport_upcall_attr'

Convert one comment from "/**" kernel-doc to a plain C "/*" comment:
Warning: include/uapi/linux/openvswitch.h:638 This comment starts with
'/**', but isn't a kernel-doc comment.
* Omit attributes for notifications.

Add more kernel-doc:
- add kernel-doc for kernel-only enums;
- add missing kernel-doc for enum ovs_datapath_attr;
- add missing kernel-doc for enum ovs_flow_attr;
- add missing kernel-doc for enum ovs_sample_attr;
- add kernel-doc for enum ovs_check_pkt_len_attr;
- add kernel-doc for enum ovs_action_attr;
- add kernel-doc for enum ovs_action_push_eth;
- add kernel-doc for enum ovs_vport_attr;

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Link: https://patch.msgid.link/20260304012437.469151-1-rdunlap@infradead.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Randy Dunlap and committed by
Jakub Kicinski
39ae83b0 1d88db16

+68 -8
+68 -8
include/uapi/linux/openvswitch.h
··· 70 70 * set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on 71 71 * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should 72 72 * not be sent. 73 + * @OVS_DP_ATTR_MASKS_CACHE_SIZE: Number of the entries in the flow table 74 + * masks cache. 73 75 * @OVS_DP_ATTR_PER_CPU_PIDS: Per-cpu array of PIDs for upcalls when 74 76 * OVS_DP_F_DISPATCH_UPCALL_PER_CPU feature is set. 75 77 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the 76 78 * datapath. Always present in notifications. 77 79 * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the 78 80 * datapath. Always present in notifications. 81 + * @OVS_DP_ATTR_USER_FEATURES: OVS_DP_F_* flags. 79 82 * @OVS_DP_ATTR_IFINDEX: Interface index for a new datapath netdev. Only 80 83 * valid for %OVS_DP_CMD_NEW requests. 81 84 * ··· 86 83 * payload for %OVS_DP_* commands. 87 84 */ 88 85 enum ovs_datapath_attr { 86 + /* private: */ 89 87 OVS_DP_ATTR_UNSPEC, 88 + /* public: */ 90 89 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ 91 90 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ 92 91 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ 93 92 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ 94 93 OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */ 94 + /* private: */ 95 95 OVS_DP_ATTR_PAD, 96 + /* public: */ 96 97 OVS_DP_ATTR_MASKS_CACHE_SIZE, 97 98 OVS_DP_ATTR_PER_CPU_PIDS, /* Netlink PIDS to receive upcalls in 98 99 * per-cpu dispatch mode 99 100 */ 100 101 OVS_DP_ATTR_IFINDEX, 102 + /* private: */ 101 103 __OVS_DP_ATTR_MAX 102 104 }; 103 105 ··· 189 181 * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the 190 182 * output port is actually a tunnel port. Contains the output tunnel key 191 183 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes. 184 + * @OVS_PACKET_ATTR_PROBE: Packet operation is a feature probe. 192 185 * @OVS_PACKET_ATTR_MRU: Present for an %OVS_PACKET_CMD_ACTION and 193 186 * @OVS_PACKET_ATTR_LEN: Packet size before truncation. 194 187 * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment ··· 205 196 * payload for %OVS_PACKET_* commands. 206 197 */ 207 198 enum ovs_packet_attr { 199 + /* private: */ 208 200 OVS_PACKET_ATTR_UNSPEC, 201 + /* public: */ 209 202 OVS_PACKET_ATTR_PACKET, /* Packet data. */ 210 203 OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ 211 204 OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ 212 205 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ 213 206 OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* 214 207 attributes. */ 208 + /* private: */ 215 209 OVS_PACKET_ATTR_UNUSED1, 216 210 OVS_PACKET_ATTR_UNUSED2, 211 + /* public: */ 217 212 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe, 218 213 error logging should be suppressed. */ 219 214 OVS_PACKET_ATTR_MRU, /* Maximum received IP fragment size. */ 220 215 OVS_PACKET_ATTR_LEN, /* Packet size before truncation. */ 221 216 OVS_PACKET_ATTR_HASH, /* Packet hash. */ 222 217 OVS_PACKET_ATTR_UPCALL_PID, /* u32 Netlink PID. */ 218 + /* private: */ 223 219 __OVS_PACKET_ATTR_MAX 224 220 }; 225 221 ··· 271 257 * upcalls should not be sent. 272 258 * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for 273 259 * packets sent or received through the vport. 260 + * @OVS_VPORT_ATTR_IFINDEX: Provides the ifindex of a vport, or sets the desired 261 + * ifindex while creating a new vport with type %OVS_VPORT_TYPE_INTERNAL. 262 + * @OVS_VPORT_ATTR_NETNSID: Provides the netns id of the vport if it's not local. 263 + * @OVS_VPORT_ATTR_UPCALL_STATS: Provides upcall statistics for a vport. 264 + * Contains nested %OVS_VPORT_UPCALL_ATTR_* attributes. 274 265 * 275 266 * These attributes follow the &struct ovs_header within the Generic Netlink 276 267 * payload for %OVS_VPORT_* commands. ··· 291 272 * ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport. 292 273 */ 293 274 enum ovs_vport_attr { 275 + /* private: */ 294 276 OVS_VPORT_ATTR_UNSPEC, 277 + /* public: */ 295 278 OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */ 296 279 OVS_VPORT_ATTR_TYPE, /* u32 OVS_VPORT_TYPE_* constant. */ 297 280 OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */ ··· 301 280 OVS_VPORT_ATTR_UPCALL_PID, /* array of u32 Netlink socket PIDs for */ 302 281 /* receiving upcalls */ 303 282 OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ 283 + /* private: */ 304 284 OVS_VPORT_ATTR_PAD, 285 + /* public: */ 305 286 OVS_VPORT_ATTR_IFINDEX, 306 287 OVS_VPORT_ATTR_NETNSID, 307 288 OVS_VPORT_ATTR_UPCALL_STATS, 289 + /* private: */ 308 290 __OVS_VPORT_ATTR_MAX 309 291 }; 310 292 311 293 #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) 312 294 313 295 /** 314 - * enum ovs_vport_upcall_attr - attributes for %OVS_VPORT_UPCALL* commands 315 - * @OVS_VPORT_UPCALL_SUCCESS: 64-bit upcall success packets. 316 - * @OVS_VPORT_UPCALL_FAIL: 64-bit upcall fail packets. 296 + * enum ovs_vport_upcall_attr - attributes for %OVS_VPORT_ATTR_UPCALL_STATS 297 + * @OVS_VPORT_UPCALL_ATTR_SUCCESS: 64-bit upcall success packets. 298 + * @OVS_VPORT_UPCALL_ATTR_FAIL: 64-bit upcall fail packets. 317 299 */ 318 300 enum ovs_vport_upcall_attr { 319 301 OVS_VPORT_UPCALL_ATTR_SUCCESS, 320 302 OVS_VPORT_UPCALL_ATTR_FAIL, 303 + /* private: */ 321 304 __OVS_VPORT_UPCALL_ATTR_MAX 322 305 }; 323 306 ··· 456 431 OVS_FRAG_TYPE_NONE, 457 432 OVS_FRAG_TYPE_FIRST, 458 433 OVS_FRAG_TYPE_LATER, 434 + /* private: */ 459 435 __OVS_FRAG_TYPE_MAX 460 436 }; 461 437 ··· 630 604 * a wildcarded match. Omitting attribute is treated as wildcarding all 631 605 * corresponding fields. Optional for all requests. If not present, 632 606 * all flow key bits are exact match bits. 607 + * @OVS_FLOW_ATTR_PROBE: Flow operation is a feature probe, error logging 608 + * should be suppressed. 633 609 * @OVS_FLOW_ATTR_UFID: A value between 1-16 octets specifying a unique 634 610 * identifier for the flow. Causes the flow to be indexed by this value rather 635 611 * than the value of the %OVS_FLOW_ATTR_KEY attribute. Optional for all ··· 645 617 * payload for %OVS_FLOW_* commands. 646 618 */ 647 619 enum ovs_flow_attr { 620 + /* private: */ 648 621 OVS_FLOW_ATTR_UNSPEC, 622 + /* public: */ 649 623 OVS_FLOW_ATTR_KEY, /* Sequence of OVS_KEY_ATTR_* attributes. */ 650 624 OVS_FLOW_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ 651 625 OVS_FLOW_ATTR_STATS, /* struct ovs_flow_stats. */ ··· 659 629 * logging should be suppressed. */ 660 630 OVS_FLOW_ATTR_UFID, /* Variable length unique flow identifier. */ 661 631 OVS_FLOW_ATTR_UFID_FLAGS,/* u32 of OVS_UFID_F_*. */ 632 + /* private: */ 662 633 OVS_FLOW_ATTR_PAD, 663 634 __OVS_FLOW_ATTR_MAX 664 635 }; 665 636 666 637 #define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) 667 638 668 - /** 639 + /* 669 640 * Omit attributes for notifications. 670 641 * 671 642 * If a datapath request contains an %OVS_UFID_F_OMIT_* flag, then the datapath ··· 684 653 * fractions of packets. 685 654 * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event. 686 655 * Actions are passed as nested attributes. 656 + * @OVS_SAMPLE_ATTR_ARG: For in-kernel use, passing &struct sample_arg 657 + * derived from other attributes. 687 658 * 688 659 * Executes the specified actions with the given probability on a per-packet 689 660 * basis. Nested actions will be able to access the probability value of the 690 661 * parent @OVS_ACTION_ATTR_SAMPLE. 691 662 */ 692 663 enum ovs_sample_attr { 664 + /* private: */ 693 665 OVS_SAMPLE_ATTR_UNSPEC, 666 + /* public: */ 694 667 OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */ 695 668 OVS_SAMPLE_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ 669 + /* private: */ 696 670 __OVS_SAMPLE_ATTR_MAX, 697 671 672 + /* public: */ 698 673 #ifdef __KERNEL__ 699 674 OVS_SAMPLE_ATTR_ARG /* struct sample_arg */ 700 675 #endif ··· 730 693 * @OVS_USERSPACE_ATTR_ACTIONS: If present, send actions with upcall. 731 694 */ 732 695 enum ovs_userspace_attr { 696 + /* private: */ 733 697 OVS_USERSPACE_ATTR_UNSPEC, 698 + /* public: */ 734 699 OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ 735 700 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ 736 701 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port 737 702 * to get tunnel info. */ 738 703 OVS_USERSPACE_ATTR_ACTIONS, /* Optional flag to get actions. */ 704 + /* private: */ 739 705 __OVS_USERSPACE_ATTR_MAX 740 706 }; 741 707 ··· 859 819 * @OVS_CT_ATTR_TIMEOUT: Variable length string defining conntrack timeout. 860 820 */ 861 821 enum ovs_ct_attr { 822 + /* private: */ 862 823 OVS_CT_ATTR_UNSPEC, 824 + /* public: */ 863 825 OVS_CT_ATTR_COMMIT, /* No argument, commits connection. */ 864 826 OVS_CT_ATTR_ZONE, /* u16 zone id. */ 865 827 OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ ··· 873 831 OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ 874 832 OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for 875 833 * fine-grain timeout tuning. */ 834 + /* private: */ 876 835 __OVS_CT_ATTR_MAX 877 836 }; 878 837 ··· 902 859 * @OVS_NAT_ATTR_PROTO_RANDOM: Flag for fully randomized L4 port mapping 903 860 */ 904 861 enum ovs_nat_attr { 862 + /* private: */ 905 863 OVS_NAT_ATTR_UNSPEC, 864 + /* public: */ 906 865 OVS_NAT_ATTR_SRC, 907 866 OVS_NAT_ATTR_DST, 908 867 OVS_NAT_ATTR_IP_MIN, ··· 914 869 OVS_NAT_ATTR_PERSISTENT, 915 870 OVS_NAT_ATTR_PROTO_HASH, 916 871 OVS_NAT_ATTR_PROTO_RANDOM, 872 + /* private: */ 917 873 __OVS_NAT_ATTR_MAX, 918 874 }; 919 875 920 876 #define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1) 921 877 922 - /* 878 + /** 923 879 * struct ovs_action_push_eth - %OVS_ACTION_ATTR_PUSH_ETH action argument. 924 880 * @addresses: Source and destination MAC addresses. 925 - * @eth_type: Ethernet type 926 881 */ 927 882 struct ovs_action_push_eth { 928 883 struct ovs_key_ethernet addresses; 929 884 }; 930 885 931 - /* 886 + /** 932 887 * enum ovs_check_pkt_len_attr - Attributes for %OVS_ACTION_ATTR_CHECK_PKT_LEN. 933 888 * 934 889 * @OVS_CHECK_PKT_LEN_ATTR_PKT_LEN: u16 Packet length to check for. 935 890 * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER: Nested OVS_ACTION_ATTR_* 936 891 * actions to apply if the packer length is greater than the specified 937 892 * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN. 938 - * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested OVS_ACTION_ATTR_* 893 + * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL: Nested OVS_ACTION_ATTR_* 939 894 * actions to apply if the packer length is lesser or equal to the specified 940 895 * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN. 896 + * @OVS_CHECK_PKT_LEN_ATTR_ARG: For in-kernel use, passing &struct 897 + * check_pkt_len_arg derived from other attributes. 941 898 */ 942 899 enum ovs_check_pkt_len_attr { 900 + /* private: */ 943 901 OVS_CHECK_PKT_LEN_ATTR_UNSPEC, 902 + /* public: */ 944 903 OVS_CHECK_PKT_LEN_ATTR_PKT_LEN, 945 904 OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER, 946 905 OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL, 906 + /* private: */ 947 907 __OVS_CHECK_PKT_LEN_ATTR_MAX, 948 908 909 + /* public: */ 949 910 #ifdef __KERNEL__ 950 911 OVS_CHECK_PKT_LEN_ATTR_ARG /* struct check_pkt_len_arg */ 951 912 #endif ··· 1019 968 * from the packet. 1020 969 * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in 1021 970 * the nested %OVS_SAMPLE_ATTR_* attributes. 971 + * @OVS_ACTION_ATTR_RECIRC: Recirculate the clone of the packet through the 972 + * datapath with the new id (u32 recirc_id). 973 + * @OVS_ACTION_ATTR_HASH: Compute the packet hash, using &struct ovs_action_hash. 1022 974 * @OVS_ACTION_ATTR_PUSH_MPLS: Push a new MPLS label stack entry onto the 1023 975 * top of the packets MPLS label stack. Set the ethertype of the 1024 976 * encapsulating frame to either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC to ··· 1051 997 * start of the packet or at the start of the l3 header depending on the value 1052 998 * of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS 1053 999 * argument. 1000 + * @OVS_ACTION_ATTR_DEC_TTL: Decrement TTL or hop limit of the packet. Execute 1001 + * nested %OVS_DEC_TTL_ATTR_* actions if the value is less or equal to 1. 1054 1002 * @OVS_ACTION_ATTR_DROP: Explicit drop action. 1055 1003 * @OVS_ACTION_ATTR_PSAMPLE: Send a sample of the packet to external observers 1056 1004 * via psample. ··· 1066 1010 */ 1067 1011 1068 1012 enum ovs_action_attr { 1013 + /* private: */ 1069 1014 OVS_ACTION_ATTR_UNSPEC, 1015 + /* public: */ 1070 1016 OVS_ACTION_ATTR_OUTPUT, /* u32 port number. */ 1071 1017 OVS_ACTION_ATTR_USERSPACE, /* Nested OVS_USERSPACE_ATTR_*. */ 1072 1018 OVS_ACTION_ATTR_SET, /* One nested OVS_KEY_ATTR_*. */ ··· 1098 1040 OVS_ACTION_ATTR_DROP, /* u32 error code. */ 1099 1041 OVS_ACTION_ATTR_PSAMPLE, /* Nested OVS_PSAMPLE_ATTR_*. */ 1100 1042 1043 + /* private: */ 1101 1044 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted 1102 1045 * from userspace. */ 1103 1046 1047 + /* public: */ 1104 1048 #ifdef __KERNEL__ 1105 1049 OVS_ACTION_ATTR_SET_TO_MASKED, /* Kernel module internal masked 1106 1050 * set action converted from