Skip to content

Commit c4045ed

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 073a2a1 commit c4045ed

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.
@@ -6492,7 +6492,7 @@ struct dpif_support_field {
64926492
enum dpif_support_field_type type;
64936493
};
64946494

6495-
#define DPIF_SUPPORT_FIELD_INTIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
6495+
#define DPIF_SUPPORT_FIELD_INITIALIZER(RT_PTR, BT_PTR, TITLE, TYPE) \
64966496
(struct dpif_support_field) {RT_PTR, BT_PTR, TITLE, TYPE}
64976497

64986498
static void
@@ -6558,26 +6558,26 @@ dpif_set_support(struct dpif_backer_support *rt_support,
65586558
struct shash_node *node;
65596559
bool changed = false;
65606560

6561-
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6562-
{\
6563-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6564-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->NAME, \
6565-
&bt_support->NAME, \
6566-
TITLE, \
6567-
DPIF_SUPPORT_FIELD_##TYPE);\
6568-
shash_add_once(&all_fields, #NAME, f); \
6561+
#define DPIF_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6562+
{ \
6563+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6564+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->NAME, \
6565+
&bt_support->NAME, \
6566+
TITLE, \
6567+
DPIF_SUPPORT_FIELD_##TYPE); \
6568+
shash_add_once(&all_fields, #NAME, f); \
65696569
}
65706570
DPIF_SUPPORT_FIELDS;
65716571
#undef DPIF_SUPPORT_FIELD
65726572

6573-
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6574-
{\
6575-
struct dpif_support_field *f = xmalloc(sizeof *f); \
6576-
*f = DPIF_SUPPORT_FIELD_INTIALIZER(&rt_support->odp.NAME, \
6577-
&bt_support->odp.NAME, \
6578-
TITLE, \
6579-
DPIF_SUPPORT_FIELD_##TYPE);\
6580-
shash_add_once(&all_fields, #NAME, f); \
6573+
#define ODP_SUPPORT_FIELD(TYPE, NAME, TITLE) \
6574+
{ \
6575+
struct dpif_support_field *f = xmalloc(sizeof *f); \
6576+
*f = DPIF_SUPPORT_FIELD_INITIALIZER(&rt_support->odp.NAME, \
6577+
&bt_support->odp.NAME, \
6578+
TITLE, \
6579+
DPIF_SUPPORT_FIELD_##TYPE); \
6580+
shash_add_once(&all_fields, #NAME, f); \
65816581
}
65826582
ODP_SUPPORT_FIELDS;
65836583
#undef ODP_SUPPORT_FIELD
@@ -6612,7 +6612,8 @@ dpif_set_support(struct dpif_backer_support *rt_support,
66126612
*(bool *) field->rt_ptr = true;
66136613
changed = true;
66146614
} else {
6615-
ds_put_cstr(ds, "Can not enable features not supported by the datapth");
6615+
ds_put_cstr(ds,
6616+
"Can not enable features not supported by the datapath");
66166617
}
66176618
} else if (!strcasecmp(value, "false")) {
66186619
*(bool *)field->rt_ptr = false;

0 commit comments

Comments
 (0)