Commit 9bacb93b authored by Walter Heymans's avatar Walter Heymans Committed by David S. Miller
Browse files

nfp: flower: fix comment typos and formatting



A number of spelling and language mistakes in the flower section are
fixed. The spacing between the text inside some comments and the comment
symbols are also updated for consistency.

Signed-off-by: default avatarWalter Heymans <walter.heymans@corigine.com>
Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b2373c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ nfp_fl_pre_lag(struct nfp_app *app, const struct flow_action_entry *act,
	}

	/* Pre_lag action must be first on action list.
	 * If other actions already exist they need pushed forward.
	 * If other actions already exist they need to be pushed forward.
	 */
	if (act_len)
		memmove(nfp_flow->action_data + act_size,
+7 −7
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ static int nfp_ct_merge_check(struct nfp_fl_ct_flow_entry *entry1,
	u8 ip_proto = 0;
	/* Temporary buffer for mangling keys, 64 is enough to cover max
	 * struct size of key in various fields that may be mangled.
	 * Supported fileds to mangle:
	 * Supported fields to mangle:
	 * mac_src/mac_dst(struct flow_match_eth_addrs, 12B)
	 * nw_tos/nw_ttl(struct flow_match_ip, 2B)
	 * nw_src/nw_dst(struct flow_match_ipv4/6_addrs, 32B)
@@ -194,7 +194,7 @@ static int nfp_ct_merge_check(struct nfp_fl_ct_flow_entry *entry1,
	    entry1->netdev != entry2->netdev)
		return -EINVAL;

	/* check the overlapped fields one by one, the unmasked part
	/* Check the overlapped fields one by one, the unmasked part
	 * should not conflict with each other.
	 */
	if (ovlp_keys & BIT(FLOW_DISSECTOR_KEY_CONTROL)) {
@@ -563,7 +563,7 @@ static int nfp_fl_merge_actions_offload(struct flow_rule **rules,
		if (flow_rule_match_key(rules[j], FLOW_DISSECTOR_KEY_BASIC)) {
			struct flow_match_basic match;

			/* ip_proto is the only field that needed in later compile_action,
			/* ip_proto is the only field that is needed in later compile_action,
			 * needed to set the correct checksum flags. It doesn't really matter
			 * which input rule's ip_proto field we take as the earlier merge checks
			 * would have made sure that they don't conflict. We do not know which
@@ -1013,7 +1013,7 @@ static int nfp_ct_do_nft_merge(struct nfp_fl_ct_zone_entry *zt,
	nft_m_entry->tc_m_parent = tc_m_entry;
	nft_m_entry->nft_parent = nft_entry;
	nft_m_entry->tc_flower_cookie = 0;
	/* Copy the netdev from one the pre_ct entry. When the tc_m_entry was created
	/* Copy the netdev from the pre_ct entry. When the tc_m_entry was created
	 * it only combined them if the netdevs were the same, so can use any of them.
	 */
	nft_m_entry->netdev = pre_ct_entry->netdev;
+2 −2
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ nfp_fl_lag_config_group(struct nfp_fl_lag *lag, struct nfp_fl_lag_group *group,
	}

	/* To signal the end of a batch, both the switch and last flags are set
	 * and the the reserved SYNC group ID is used.
	 * and the reserved SYNC group ID is used.
	 */
	if (*batch == NFP_FL_LAG_BATCH_FINISHED) {
		flags |= NFP_FL_LAG_SWITCH | NFP_FL_LAG_LAST;
@@ -576,7 +576,7 @@ nfp_fl_lag_changeupper_event(struct nfp_fl_lag *lag,
	group->dirty = true;
	group->slave_cnt = slave_count;

	/* Group may have been on queue for removal but is now offloable. */
	/* Group may have been on queue for removal but is now offloadable. */
	group->to_remove = false;
	mutex_unlock(&lag->lock);

+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ int nfp_compile_flow_metadata(struct nfp_app *app, u32 cookie,
		goto err_free_ctx_entry;
	}

	/* Do net allocate a mask-id for pre_tun_rules. These flows are used to
	/* Do not allocate a mask-id for pre_tun_rules. These flows are used to
	 * configure the pre_tun table and are never actually send to the
	 * firmware as an add-flow message. This causes the mask-id allocation
	 * on the firmware to get out of sync if allocated here.
+2 −2
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,
			flow_rule_match_enc_opts(rule, &enc_op);

		if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_PORTS)) {
			/* check if GRE, which has no enc_ports */
			/* Check if GRE, which has no enc_ports */
			if (!netif_is_gretap(netdev) && !netif_is_ip6gretap(netdev)) {
				NL_SET_ERR_MSG_MOD(extack, "unsupported offload: an exact match on L4 destination port is required for non-GRE tunnels");
				return -EOPNOTSUPP;
@@ -1016,7 +1016,7 @@ int nfp_flower_merge_offloaded_flows(struct nfp_app *app,
	    nfp_flower_is_merge_flow(sub_flow2))
		return -EINVAL;

	/* check if the two flows are already merged */
	/* Check if the two flows are already merged */
	parent_ctx = (u64)(be32_to_cpu(sub_flow1->meta.host_ctx_id)) << 32;
	parent_ctx |= (u64)(be32_to_cpu(sub_flow2->meta.host_ctx_id));
	if (rhashtable_lookup_fast(&priv->merge_table,
Loading