Skip to content

Commit 2fb823a

Browse files
chaudronapconole
authored andcommitted
ofproto-dpif: Fix spelling in comments and the support field macro.
Acked-by: Simon Horman <[email protected]> Acked-by: Aaron Conole <[email protected]> Signed-off-by: Eelco Chaudron <[email protected]> Signed-off-by: Aaron Conole <[email protected]>
1 parent a78108e commit 2fb823a

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

ofproto/ofproto-dpif.c

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct ofbundle {
100100
* NULL if all VLANs are trunked. */
101101
unsigned long *cvlans;
102102
struct lacp *lacp; /* LACP if LACP is enabled, otherwise NULL. */
103-
struct bond *bond; /* Nonnull iff more than one port. */
103+
struct bond *bond; /* Nonnull if more than one port. */
104104
enum port_priority_tags_mode use_priority_tags;
105105
/* Use 802.1p tag for frames in VLAN 0? */
106106

@@ -1453,7 +1453,7 @@ check_max_dp_hash_alg(struct dpif_backer *backer)
14531453
ofpbuf_use_stack(&key, &keybuf, sizeof keybuf);
14541454
odp_flow_key_from_flow(&odp_parms, &key);
14551455

1456-
/* All datapaths support algortithm 0 (OVS_HASH_ALG_L4). */
1456+
/* All datapaths support algorithm 0 (OVS_HASH_ALG_L4). */
14571457
for (int alg = 1; alg < __OVS_HASH_MAX; alg++) {
14581458
struct ofpbuf actions;
14591459
bool ok;
@@ -3466,7 +3466,7 @@ bundle_set(struct ofproto *ofproto_, void *aux,
34663466
bundle->bond = NULL;
34673467
}
34683468

3469-
/* Set proteced port mode */
3469+
/* Set protected port mode. */
34703470
if (s->protected != bundle->protected) {
34713471
bundle->protected = s->protected;
34723472
need_flush = true;
@@ -4427,7 +4427,7 @@ ofproto_dpif_credit_table_stats(struct ofproto_dpif *ofproto, uint8_t table_id,
44274427

44284428
/* Look up 'flow' in 'ofproto''s classifier version 'version', starting from
44294429
* table '*table_id'. Returns the rule that was found, which may be one of the
4430-
* special rules according to packet miss hadling. If 'may_packet_in' is
4430+
* special rules according to packet miss handling. If 'may_packet_in' is
44314431
* false, returning of the miss_rule (which issues packet ins for the
44324432
* controller) is avoided. Updates 'wc', if nonnull, to reflect the fields
44334433
* that were used during the lookup.
@@ -6242,7 +6242,7 @@ struct dpif_support_field {
62426242
enum dpif_support_field_type type;
62436243
};
62446244

6245-
#define DPIF_SUPPORT_FIELD_INTIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
6245+
#define DPIF_SUPPORT_FIELD_INITIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
62466246
(struct dpif_support_field) {RT_PTR, BT_PTR, TITLE, TYPE}
62476247

62486248
static void
@@ -6297,26 +6297,26 @@ dpif_set_support(struct dpif_backer_support *rt_support,
62976297
struct shash_node *node;
62986298
bool changed = false;
62996299

6300-
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6301-
{\
6302-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6303-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->NAME, \
6304-
&bt_support->NAME, \
6305-
TITLE, \
6306-
DPIF_SUPPORT_FIELD_##TYPE);\
6307-
shash_add_once(&all_fields, #NAME, f); \
6300+
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6301+
{ \
6302+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6303+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->NAME, \
6304+
&bt_support->NAME, \
6305+
TITLE, \
6306+
DPIF_SUPPORT_FIELD_##TYPE); \
6307+
shash_add_once(&all_fields, #NAME, f); \
63086308
}
63096309
DPIF_SUPPORT_FIELDS;
63106310
#undef DPIF_SUPPORT_FIELD
63116311

6312-
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6313-
{\
6314-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6315-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->odp.NAME, \
6316-
&bt_support->odp.NAME, \
6317-
TITLE, \
6318-
DPIF_SUPPORT_FIELD_##TYPE);\
6319-
shash_add_once(&all_fields, #NAME, f); \
6312+
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6313+
{ \
6314+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6315+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->odp.NAME, \
6316+
&bt_support->odp.NAME, \
6317+
TITLE, \
6318+
DPIF_SUPPORT_FIELD_##TYPE); \
6319+
shash_add_once(&all_fields, #NAME, f); \
63206320
}
63216321
ODP_SUPPORT_FIELDS;
63226322
#undef ODP_SUPPORT_FIELD
@@ -6346,7 +6346,8 @@ dpif_set_support(struct dpif_backer_support *rt_support,
63466346
*(bool *)field->rt_ptr = true;
63476347
changed = true;
63486348
} else {
6349-
ds_put_cstr(ds, "Can not enable features not supported by the datapth");
6349+
ds_put_cstr(ds,
6350+
"Can not enable features not supported by the datapath");
63506351
}
63516352
} else if (!strcasecmp(value, "false")) {
63526353
*(bool *)field->rt_ptr = false;

0 commit comments

Comments
 (0)