nfp: flower: fix comment typos and formatting
authorWalter Heymans <walter.heymans@corigine.com>
Tue, 28 Jun 2022 12:18:02 +0000 (14:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2022 12:59:21 +0000 (13:59 +0100)
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: Walter Heymans <walter.heymans@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/action.c
drivers/net/ethernet/netronome/nfp/flower/conntrack.c
drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
drivers/net/ethernet/netronome/nfp/flower/metadata.c
drivers/net/ethernet/netronome/nfp/flower/offload.c
drivers/net/ethernet/netronome/nfp/flower/qos_conf.c
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c

index b456e81..7453cc5 100644 (file)
@@ -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,
index 7c31a46..b3b2a23 100644 (file)
@@ -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;
@@ -1143,7 +1143,7 @@ nfp_fl_ct_zone_entry *get_nfp_zone_entry(struct nfp_flower_priv *priv,
        zt->priv = priv;
        zt->nft = NULL;
 
-       /* init the various hash tables and lists*/
+       /* init the various hash tables and lists */
        INIT_LIST_HEAD(&zt->pre_ct_list);
        INIT_LIST_HEAD(&zt->post_ct_list);
        INIT_LIST_HEAD(&zt->nft_flows_list);
@@ -1346,7 +1346,7 @@ static void nfp_free_nft_merge_children(void *entry, bool is_nft_flow)
         */
 
        if (is_nft_flow) {
-               /* Need to iterate through list of nft_flow entries*/
+               /* Need to iterate through list of nft_flow entries */
                struct nfp_fl_ct_flow_entry *ct_entry = entry;
 
                list_for_each_entry_safe(m_entry, tmp, &ct_entry->children,
@@ -1354,7 +1354,7 @@ static void nfp_free_nft_merge_children(void *entry, bool is_nft_flow)
                        cleanup_nft_merge_entry(m_entry);
                }
        } else {
-               /* Need to iterate through list of tc_merged_flow entries*/
+               /* Need to iterate through list of tc_merged_flow entries */
                struct nfp_fl_ct_tc_merge *ct_entry = entry;
 
                list_for_each_entry_safe(m_entry, tmp, &ct_entry->children,
index ede90e0..e92860e 100644 (file)
@@ -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);
 
index 74e1b27..0f06ef6 100644 (file)
@@ -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.
index 9d65459..83c9715 100644 (file)
@@ -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,
index 3206ba8..4e5df9f 100644 (file)
@@ -534,7 +534,7 @@ int nfp_flower_setup_qos_offload(struct nfp_app *app, struct net_device *netdev,
        }
 }
 
-/* offload tc action, currently only for tc police */
+/* Offload tc action, currently only for tc police */
 
 static const struct rhashtable_params stats_meter_table_params = {
        .key_offset     = offsetof(struct nfp_meter_entry, meter_id),
@@ -690,7 +690,7 @@ nfp_act_install_actions(struct nfp_app *app, struct flow_offload_action *fl_act,
        pps_support = !!(fl_priv->flower_ext_feats & NFP_FL_FEATS_QOS_PPS);
 
        for (i = 0 ; i < action_num; i++) {
-               /*set qos associate data for this interface */
+               /* Set qos associate data for this interface */
                action = paction + i;
                if (action->id != FLOW_ACTION_POLICE) {
                        NL_SET_ERR_MSG_MOD(extack,
@@ -736,7 +736,7 @@ nfp_act_remove_actions(struct nfp_app *app, struct flow_offload_action *fl_act,
        u32 meter_id;
        bool pps;
 
-       /*delete qos associate data for this interface */
+       /* Delete qos associate data for this interface */
        if (fl_act->id != FLOW_ACTION_POLICE) {
                NL_SET_ERR_MSG_MOD(extack,
                                   "unsupported offload: qos rate limit offload requires police action");
index 6bf3ec4..0af5541 100644 (file)
@@ -1064,7 +1064,7 @@ nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
                return 0;
 
        entry->ref_count--;
-       /* If del is part of a mod then mac_list is still in use elsewheree. */
+       /* If del is part of a mod then mac_list is still in use elsewhere. */
        if (nfp_netdev_is_nfp_repr(netdev) && !mod) {
                repr = netdev_priv(netdev);
                repr_priv = repr->app_priv;