Skip to content

Commit ba67589

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 f141b7c commit ba67589

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

ofproto/ofproto-dpif.c

+23-22
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct ofbundle {
102102
* NULL if all VLANs are trunked. */
103103
unsigned long *cvlans;
104104
struct lacp *lacp; /* LACP if LACP is enabled, otherwise NULL. */
105-
struct bond *bond; /* Nonnull iff more than one port. */
105+
struct bond *bond; /* Nonnull if more than one port. */
106106
enum port_priority_tags_mode use_priority_tags;
107107
/* Use 802.1p tag for frames in VLAN 0? */
108108

@@ -1508,7 +1508,7 @@ check_max_dp_hash_alg(struct dpif_backer *backer)
15081508
ofpbuf_use_stack(&key, &keybuf, sizeof keybuf);
15091509
odp_flow_key_from_flow(&odp_parms, &key);
15101510

1511-
/* All datapaths support algortithm 0 (OVS_HASH_ALG_L4). */
1511+
/* All datapaths support algorithm 0 (OVS_HASH_ALG_L4). */
15121512
for (int alg = 1; alg < __OVS_HASH_MAX; alg++) {
15131513
struct ofpbuf actions;
15141514
bool ok;
@@ -3642,7 +3642,7 @@ bundle_set(struct ofproto *ofproto_, void *aux,
36423642
bundle->bond = NULL;
36433643
}
36443644

3645-
/* Set proteced port mode */
3645+
/* Set protected port mode. */
36463646
if (s->protected != bundle->protected) {
36473647
bundle->protected = s->protected;
36483648
need_flush = true;
@@ -4609,7 +4609,7 @@ ofproto_dpif_credit_table_stats(struct ofproto_dpif *ofproto, uint8_t table_id,
46094609

46104610
/* Look up 'flow' in 'ofproto''s classifier version 'version', starting from
46114611
* table '*table_id'. Returns the rule that was found, which may be one of the
4612-
* special rules according to packet miss hadling. If 'may_packet_in' is
4612+
* special rules according to packet miss handling. If 'may_packet_in' is
46134613
* false, returning of the miss_rule (which issues packet ins for the
46144614
* controller) is avoided. Updates 'wc', if nonnull, to reflect the fields
46154615
* that were used during the lookup.
@@ -6550,7 +6550,7 @@ struct dpif_support_field {
65506550
enum dpif_support_field_type type;
65516551
};
65526552

6553-
#define DPIF_SUPPORT_FIELD_INTIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
6553+
#define DPIF_SUPPORT_FIELD_INITIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
65546554
(struct dpif_support_field) {RT_PTR, BT_PTR, TITLE, TYPE}
65556555

65566556
static void
@@ -6616,26 +6616,26 @@ dpif_set_support(struct dpif_backer_support *rt_support,
66166616
struct shash_node *node;
66176617
bool changed = false;
66186618

6619-
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6620-
{\
6621-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6622-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->NAME, \
6623-
&bt_support->NAME, \
6624-
TITLE, \
6625-
DPIF_SUPPORT_FIELD_##TYPE);\
6626-
shash_add_once(&all_fields, #NAME, f); \
6619+
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6620+
{ \
6621+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6622+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->NAME, \
6623+
&bt_support->NAME, \
6624+
TITLE, \
6625+
DPIF_SUPPORT_FIELD_##TYPE); \
6626+
shash_add_once(&all_fields, #NAME, f); \
66276627
}
66286628
DPIF_SUPPORT_FIELDS;
66296629
#undef DPIF_SUPPORT_FIELD
66306630

6631-
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6632-
{\
6633-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6634-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->odp.NAME, \
6635-
&bt_support->odp.NAME, \
6636-
TITLE, \
6637-
DPIF_SUPPORT_FIELD_##TYPE);\
6638-
shash_add_once(&all_fields, #NAME, f); \
6631+
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6632+
{ \
6633+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6634+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->odp.NAME, \
6635+
&bt_support->odp.NAME, \
6636+
TITLE, \
6637+
DPIF_SUPPORT_FIELD_##TYPE); \
6638+
shash_add_once(&all_fields, #NAME, f); \
66396639
}
66406640
ODP_SUPPORT_FIELDS;
66416641
#undef ODP_SUPPORT_FIELD
@@ -6670,7 +6670,8 @@ dpif_set_support(struct dpif_backer_support *rt_support,
66706670
*(bool *) field->rt_ptr = true;
66716671
changed = true;
66726672
} else {
6673-
ds_put_cstr(ds, "Can not enable features not supported by the datapth");
6673+
ds_put_cstr(ds,
6674+
"Can not enable features not supported by the datapath");
66746675
}
66756676
} else if (!strcasecmp(value, "false")) {
66766677
*(bool *)field->rt_ptr = false;

0 commit comments

Comments
 (0)