Skip to content

Commit

Permalink
genetlink: move the private fields in struct genl_family
Browse files Browse the repository at this point in the history
Move the private fields down to form a "private section".
Use the kdoc "private:" label comment thing to hide them
from the main kdoc comment.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Nov 7, 2022
1 parent ff14adb commit 7c3eaa0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ struct genl_info;

/**
* struct genl_family - generic netlink family
* @id: protocol family identifier (private)
* @hdrsize: length of user specific header in bytes
* @name: name of family
* @version: protocol version
Expand All @@ -43,8 +42,6 @@ struct genl_info;
* @resv_start_op: first operation for which reserved fields of the header
* can be validated and policies are required (see below);
* new families should leave this field at zero
* @mcgrp_offset: starting number of multicast group IDs in this family
* (private)
* @ops: the operations supported by this family
* @n_ops: number of operations supported by this family
* @small_ops: the small-struct operations supported by this family
Expand All @@ -58,12 +55,10 @@ struct genl_info;
* if policy is not provided core will reject all TLV attributes.
*/
struct genl_family {
int id; /* private */
unsigned int hdrsize;
char name[GENL_NAMSIZ];
unsigned int version;
unsigned int maxattr;
unsigned int mcgrp_offset; /* private */
u8 netnsok:1;
u8 parallel_ops:1;
u8 n_ops;
Expand All @@ -81,6 +76,12 @@ struct genl_family {
const struct genl_small_ops *small_ops;
const struct genl_multicast_group *mcgrps;
struct module *module;

/* private: internal use only */
/* protocol family identifier */
int id;
/* starting number of multicast group IDs in this family */
unsigned int mcgrp_offset;
};

/**
Expand Down

0 comments on commit 7c3eaa0

Please sign in to comment.