Skip to content

Commit e3146a5

Browse files
kcudniklguohan
authored andcommitted
Add pedantic rules on keywords in comments (#496)
All marked keywords should be written in capital letters
1 parent b832fa1 commit e3146a5

22 files changed

+176
-168
lines changed

inc/saiacl.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ typedef enum _sai_acl_ip_type_t
7979
/** IPv4 and IPv6 packets */
8080
SAI_ACL_IP_TYPE_IP,
8181

82-
/** Non-Ip packet */
82+
/** Non-IP packet */
8383
SAI_ACL_IP_TYPE_NON_IP,
8484

8585
/** Any IPv4 packet */
@@ -268,7 +268,7 @@ typedef enum _sai_acl_table_group_attr_t
268268
* groups to let the user specify his intention to allow further error
269269
* checks and optimizations based on a specific ASIC's SAI implementation.
270270
* ACL members being added to this group SHOULD be a subset of the bind
271-
* point list that acl group was created with.
271+
* point list that ACL group was created with.
272272
*
273273
* @type sai_s32_list_t sai_acl_bind_point_type_t
274274
* @flags CREATE_ONLY
@@ -282,8 +282,8 @@ typedef enum _sai_acl_table_group_attr_t
282282
* ACL table group type represents the way various ACL tables within this
283283
* ACL table group perform their lookups. There are two optional values :
284284
* Sequential - All the ACL tables are looked up in a sequential order ,
285-
* which is based on the ACL table priorities and only one acl entry is matched
286-
* with its corresponding acl entry action applied. In case two ACL tables
285+
* which is based on the ACL table priorities and only one ACL entry is matched
286+
* with its corresponding ACL entry action applied. In case two ACL tables
287287
* have the same priority they are looked up on a first come basis.
288288
* Parallel - All the ACL tables within the ACL table groups are looked up
289289
* in parallel and non-conflicting actions are resolved and applied from
@@ -326,7 +326,7 @@ typedef enum _sai_acl_table_group_member_attr_t
326326
* @brief ACL table group id
327327
*
328328
* This attribute is required to associate or attach a member object (acl_table_id)
329-
* to a acl table group id allocated by the create acl group api.
329+
* to a ACL table group id allocated by the create ACL group api.
330330
*
331331
* User should always use the group id returned by SAI create_acl_group api,
332332
* to group the tables else Invalid attribute value error code will be returned.
@@ -703,7 +703,7 @@ typedef enum _sai_acl_table_attr_t
703703
SAI_ACL_TABLE_ATTR_FIELD_IP_IDENTIFICATION,
704704

705705
/**
706-
* @brief Ip Dscp
706+
* @brief IP DSCP
707707
*
708708
* @type bool
709709
* @flags CREATE_ONLY
@@ -712,7 +712,7 @@ typedef enum _sai_acl_table_attr_t
712712
SAI_ACL_TABLE_ATTR_FIELD_DSCP,
713713

714714
/**
715-
* @brief Ip Ecn
715+
* @brief IP ECN
716716
*
717717
* @type bool
718718
* @flags CREATE_ONLY
@@ -721,7 +721,7 @@ typedef enum _sai_acl_table_attr_t
721721
SAI_ACL_TABLE_ATTR_FIELD_ECN,
722722

723723
/**
724-
* @brief Ip Ttl
724+
* @brief IP TTL
725725
*
726726
* @type bool
727727
* @flags CREATE_ONLY
@@ -730,7 +730,7 @@ typedef enum _sai_acl_table_attr_t
730730
SAI_ACL_TABLE_ATTR_FIELD_TTL,
731731

732732
/**
733-
* @brief Ip Tos
733+
* @brief IP TOS
734734
*
735735
* @type bool
736736
* @flags CREATE_ONLY
@@ -739,7 +739,7 @@ typedef enum _sai_acl_table_attr_t
739739
SAI_ACL_TABLE_ATTR_FIELD_TOS,
740740

741741
/**
742-
* @brief Ip Flags
742+
* @brief IP Flags
743743
*
744744
* @type bool
745745
* @flags CREATE_ONLY
@@ -748,7 +748,7 @@ typedef enum _sai_acl_table_attr_t
748748
SAI_ACL_TABLE_ATTR_FIELD_IP_FLAGS,
749749

750750
/**
751-
* @brief Tcp Flags
751+
* @brief TCP Flags
752752
*
753753
* @type bool
754754
* @flags CREATE_ONLY
@@ -757,7 +757,7 @@ typedef enum _sai_acl_table_attr_t
757757
SAI_ACL_TABLE_ATTR_FIELD_TCP_FLAGS,
758758

759759
/**
760-
* @brief Ip Type
760+
* @brief IP Type
761761
*
762762
* @type bool
763763
* @flags CREATE_ONLY
@@ -766,7 +766,7 @@ typedef enum _sai_acl_table_attr_t
766766
SAI_ACL_TABLE_ATTR_FIELD_ACL_IP_TYPE,
767767

768768
/**
769-
* @brief Ip Frag
769+
* @brief IP Frag
770770
*
771771
* @type bool
772772
* @flags CREATE_ONLY
@@ -1130,7 +1130,7 @@ typedef enum _sai_acl_entry_attr_t
11301130
SAI_ACL_ENTRY_ATTR_FIELD_OUT_PORT,
11311131

11321132
/**
1133-
* @brief Source port which could be a physical or lag port
1133+
* @brief Source port which could be a physical or LAG port
11341134
* (mask is not needed)
11351135
*
11361136
* @type sai_acl_field_data_t sai_object_id_t
@@ -1234,63 +1234,63 @@ typedef enum _sai_acl_entry_attr_t
12341234
SAI_ACL_ENTRY_ATTR_FIELD_IP_IDENTIFICATION,
12351235

12361236
/**
1237-
* @brief Ip Dscp (6 bits)
1237+
* @brief IP DSCP (6 bits)
12381238
*
12391239
* @type sai_acl_field_data_t sai_uint8_t
12401240
* @flags CREATE_AND_SET
12411241
*/
12421242
SAI_ACL_ENTRY_ATTR_FIELD_DSCP,
12431243

12441244
/**
1245-
* @brief Ip Ecn (2 bits)
1245+
* @brief IP ECN (2 bits)
12461246
*
12471247
* @type sai_acl_field_data_t sai_uint8_t
12481248
* @flags CREATE_AND_SET
12491249
*/
12501250
SAI_ACL_ENTRY_ATTR_FIELD_ECN,
12511251

12521252
/**
1253-
* @brief Ip Ttl
1253+
* @brief IP TTL
12541254
*
12551255
* @type sai_acl_field_data_t sai_uint8_t
12561256
* @flags CREATE_AND_SET
12571257
*/
12581258
SAI_ACL_ENTRY_ATTR_FIELD_TTL,
12591259

12601260
/**
1261-
* @brief Ip Tos
1261+
* @brief IP TOS
12621262
*
12631263
* @type sai_acl_field_data_t sai_uint8_t
12641264
* @flags CREATE_AND_SET
12651265
*/
12661266
SAI_ACL_ENTRY_ATTR_FIELD_TOS,
12671267

12681268
/**
1269-
* @brief Ip Flags (3 bits)
1269+
* @brief IP Flags (3 bits)
12701270
*
12711271
* @type sai_acl_field_data_t sai_uint8_t
12721272
* @flags CREATE_AND_SET
12731273
*/
12741274
SAI_ACL_ENTRY_ATTR_FIELD_IP_FLAGS,
12751275

12761276
/**
1277-
* @brief Tcp Flags (6 bits)
1277+
* @brief TCP Flags (6 bits)
12781278
*
12791279
* @type sai_acl_field_data_t sai_uint8_t
12801280
* @flags CREATE_AND_SET
12811281
*/
12821282
SAI_ACL_ENTRY_ATTR_FIELD_TCP_FLAGS,
12831283

12841284
/**
1285-
* @brief Ip Type (field mask is not needed)
1285+
* @brief IP Type (field mask is not needed)
12861286
*
12871287
* @type sai_acl_field_data_t sai_acl_ip_type_t
12881288
* @flags CREATE_AND_SET
12891289
*/
12901290
SAI_ACL_ENTRY_ATTR_FIELD_ACL_IP_TYPE,
12911291

12921292
/**
1293-
* @brief Ip Frag (field mask is not needed)
1293+
* @brief IP Frag (field mask is not needed)
12941294
*
12951295
* @type sai_acl_field_data_t sai_acl_ip_frag_t
12961296
* @flags CREATE_AND_SET
@@ -1485,7 +1485,7 @@ typedef enum _sai_acl_entry_attr_t
14851485

14861486
/**
14871487
* @brief Redirect Packet to a destination which can be a port,
1488-
* lag, nexthop, nexthopgroup
1488+
* LAG, nexthop, nexthopgroup
14891489
*
14901490
* @type sai_acl_action_data_t sai_object_id_t
14911491
* @flags CREATE_AND_SET

inc/saibridge.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ typedef enum _sai_bridge_port_fdb_learning_mode_t
7070
*/
7171
typedef enum _sai_bridge_port_type_t
7272
{
73-
/** Port or Lag */
73+
/** Port or LAG */
7474
SAI_BRIDGE_PORT_TYPE_PORT,
7575

76-
/** {Port or Lag.vlan} */
76+
/** {Port or LAG.vlan} */
7777
SAI_BRIDGE_PORT_TYPE_SUB_PORT,
7878

7979
/** bridge router port */
@@ -106,7 +106,7 @@ typedef enum _sai_bridge_port_attr_t
106106
SAI_BRIDGE_PORT_ATTR_TYPE = SAI_BRIDGE_PORT_ATTR_START,
107107

108108
/**
109-
* @brief Associated Port or Lag object id
109+
* @brief Associated Port or LAG object id
110110
*
111111
* @type sai_object_id_t
112112
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
@@ -177,7 +177,7 @@ typedef enum _sai_bridge_port_attr_t
177177
SAI_BRIDGE_PORT_ATTR_MAX_LEARNED_ADDRESSES,
178178

179179
/**
180-
* @brief Action for packets with unknown source mac address
180+
* @brief Action for packets with unknown source MAC address
181181
* when FDB learning limit is reached.
182182
*
183183
* @type sai_packet_action_t

inc/saifdb.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef struct _sai_fdb_entry_t
5858
*/
5959
sai_object_id_t switch_id;
6060

61-
/** Mac address */
61+
/** MAC address */
6262
sai_mac_t mac_address;
6363

6464
/** Bridge type */
@@ -96,7 +96,7 @@ typedef enum _sai_fdb_event_t
9696
} sai_fdb_event_t;
9797

9898
/**
99-
* @brief Attribute Id for fdb entry
99+
* @brief Attribute Id for FDB entry
100100
*/
101101
typedef enum _sai_fdb_entry_attr_t
102102
{
@@ -192,7 +192,7 @@ typedef enum _sai_fdb_flush_entry_type_t
192192
* then there is no need to specify the #SAI_FDB_FLUSH_ATTR_ENTRY_TYPE attribute.
193193
* The API uses AND operation when multiple attributes are specified. For
194194
* exmaple,
195-
* 1) Flush all entries in fdb table - Do not specify any attribute
195+
* 1) Flush all entries in FDB table - Do not specify any attribute
196196
* 2) Flush all entries by bridge port - Set #SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID
197197
* 3) Flush all entries by VLAN - Set #SAI_FDB_FLUSH_ATTR_VLAN_ID
198198
* 4) Flush all entries by bridge port and VLAN - Set #SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID
@@ -294,7 +294,7 @@ typedef sai_status_t (*sai_remove_fdb_entry_fn)(
294294
_In_ const sai_fdb_entry_t *fdb_entry);
295295

296296
/**
297-
* @brief Set fdb entry attribute value
297+
* @brief Set FDB entry attribute value
298298
*
299299
* @param[in] fdb_entry FDB entry
300300
* @param[in] attr Attribute
@@ -306,7 +306,7 @@ typedef sai_status_t (*sai_set_fdb_entry_attribute_fn)(
306306
_In_ const sai_attribute_t *attr);
307307

308308
/**
309-
* @brief Get fdb entry attribute value
309+
* @brief Get FDB entry attribute value
310310
*
311311
* @param[in] fdb_entry FDB entry
312312
* @param[in] attr_count Number of attributes
@@ -337,7 +337,7 @@ typedef sai_status_t (*sai_flush_fdb_entries_fn)(
337337
* @brief FDB notifications
338338
*
339339
* @param[in] count Number of notifications
340-
* @param[in] data Pointer to fdb event notification data array
340+
* @param[in] data Pointer to FDB event notification data array
341341
*/
342342
typedef void (*sai_fdb_event_notification_fn)(
343343
_In_ uint32_t count,

inc/saihostif.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ typedef enum _sai_hostif_trap_group_attr_t
6666
SAI_HOSTIF_TRAP_GROUP_ATTR_ADMIN_STATE = SAI_HOSTIF_TRAP_GROUP_ATTR_START,
6767

6868
/**
69-
* @brief Cpu egress queue
69+
* @brief CPU egress queue
7070
*
7171
* @type sai_uint32_t
7272
* @flags CREATE_AND_SET
@@ -75,7 +75,7 @@ typedef enum _sai_hostif_trap_group_attr_t
7575
SAI_HOSTIF_TRAP_GROUP_ATTR_QUEUE,
7676

7777
/**
78-
* @brief Sai policer object id
78+
* @brief SAI policer object id
7979
*
8080
* @type sai_object_id_t
8181
* @flags CREATE_AND_SET
@@ -263,25 +263,25 @@ typedef enum _sai_hostif_trap_type_t
263263
SAI_HOSTIF_TRAP_TYPE_IP2ME = 0x00004000,
264264

265265
/**
266-
* @brief SSH traffic (tcp dst port == 22) to local router IP address
266+
* @brief SSH traffic (TCP dst port == 22) to local router IP address
267267
* (default packet action is drop)
268268
*/
269269
SAI_HOSTIF_TRAP_TYPE_SSH = 0x00004001,
270270

271271
/**
272-
* @brief SNMP traffic (udp dst port == 161) to local router IP address
272+
* @brief SNMP traffic (UDP dst port == 161) to local router IP address
273273
* (default packet action is drop)
274274
*/
275275
SAI_HOSTIF_TRAP_TYPE_SNMP = 0x00004002,
276276

277277
/**
278-
* @brief BGP traffic (tcp src port == 179 or tcp dst port == 179) to local
278+
* @brief BGP traffic (TCP src port == 179 or TCP dst port == 179) to local
279279
* router IP address (default packet action is drop)
280280
*/
281281
SAI_HOSTIF_TRAP_TYPE_BGP = 0x00004003,
282282

283283
/**
284-
* @brief BGPv6 traffic (tcp src port == 179 or tcp dst port == 179) to
284+
* @brief BGPv6 traffic (TCP src port == 179 or TCP dst port == 179) to
285285
* local router IP address (default packet action is drop)
286286
*/
287287
SAI_HOSTIF_TRAP_TYPE_BGPV6 = 0x00004004,
@@ -456,7 +456,7 @@ typedef enum _sai_hostif_user_defined_trap_type_t
456456
/** ACL traps (default packet action is drop) */
457457
SAI_HOSTIF_USER_DEFINED_TRAP_TYPE_ACL,
458458

459-
/** fdb traps (default packet action is drop) */
459+
/** FDB traps (default packet action is drop) */
460460
SAI_HOSTIF_USER_DEFINED_TRAP_TYPE_FDB,
461461

462462
/** Custom range base */
@@ -785,7 +785,7 @@ typedef enum _sai_hostif_table_entry_attr_t
785785
* Valid only when #SAI_HOSTIF_TABLE_ENTRY_ATTR_TYPE == #SAI_HOSTIF_TABLE_ENTRY_TYPE_PORT
786786
* || #SAI_HOSTIF_TABLE_ENTRY_TYPE_LAG || #SAI_HOSTIF_TABLE_ENTRY_TYPE_VLAN
787787
* should be port object when type is SAI_HOSTIF_TABLE_ENTRY_TYPE_PORT
788-
* should be lag object when type is SAI_HOSTIF_TABLE_ENTRY_TYPE_LAG
788+
* should be LAG object when type is SAI_HOSTIF_TABLE_ENTRY_TYPE_LAG
789789
* should be VLAN ID object when type is SAI_HOSTIF_TABLE_ENTRY_TYPE_VLAN
790790
*
791791
* @type sai_object_id_t

inc/sail2mc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ typedef struct _sai_l2mc_entry_t
8282
} sai_l2mc_entry_t;
8383

8484
/**
85-
* @brief Attribute Id for l2mc entry
85+
* @brief Attribute Id for L2MC entry
8686
*/
8787
typedef enum _sai_l2mc_entry_attr_t
8888
{
@@ -152,7 +152,7 @@ typedef sai_status_t (*sai_remove_l2mc_entry_fn)(
152152
_In_ const sai_l2mc_entry_t *l2mc_entry);
153153

154154
/**
155-
* @brief Set l2mc entry attribute value
155+
* @brief Set L2MC entry attribute value
156156
*
157157
* @param[in] l2mc_entry L2MC entry
158158
* @param[in] attr Attribute
@@ -164,7 +164,7 @@ typedef sai_status_t (*sai_set_l2mc_entry_attribute_fn)(
164164
_In_ const sai_attribute_t *attr);
165165

166166
/**
167-
* @brief Get l2mc entry attribute value
167+
* @brief Get L2MC entry attribute value
168168
*
169169
* @param[in] l2mc_entry L2MC entry
170170
* @param[in] attr_count Number of attributes

0 commit comments

Comments
 (0)