datapath: Fix comment style.
authorPravin B Shelar <pshelar@nicira.com>
Mon, 20 Oct 2014 22:19:10 +0000 (15:19 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Fri, 24 Oct 2014 02:09:23 +0000 (19:09 -0700)
Use netdev comment style.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
datapath/actions.c
datapath/compat.h
datapath/datapath.c
datapath/flow.c
datapath/flow_netlink.c
datapath/flow_table.c
datapath/vport-internal_dev.c
datapath/vport-netdev.c
datapath/vport.c
datapath/vport.h

index b527cb6..00c1fd4 100644 (file)
@@ -62,7 +62,8 @@ struct action_fifo {
 
 static struct action_fifo __percpu *action_fifos;
 #define EXEC_ACTIONS_LEVEL_LIMIT 4   /* limit used to detect packet
-                                       looping by the network stack */
+                                     * looping by the network stack
+                                     */
 static DEFINE_PER_CPU(int, exec_actions_level);
 
 static void action_fifo_init(struct action_fifo *fifo)
index f38d38c..9632a6e 100644 (file)
@@ -49,7 +49,8 @@ static inline struct rtable *find_route(struct net *net,
 {
        struct rtable *rt;
        /* Tunnel configuration keeps DSCP part of TOS bits, But Linux
-        * router expect RT_TOS bits only. */
+        * router expect RT_TOS bits only.
+        */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
        struct flowi fl = { .nl_u = { .ip4_u = {
index e53c5d5..6820a95 100644 (file)
@@ -79,7 +79,8 @@ struct genl_multicast_group ovs_dp_vport_multicast_group = {
 };
 
 /* Check if need to build a reply message.
- * OVS userspace sets the NLM_F_ECHO flag if it needs the reply. */
+ * OVS userspace sets the NLM_F_ECHO flag if it needs the reply.
+ */
 static bool ovs_must_notify(struct genl_family *family, struct genl_info *info,
                            unsigned int group)
 {
@@ -156,7 +157,8 @@ static struct datapath *get_dp_rcu(struct net *net, int dp_ifindex)
 }
 
 /* The caller must hold either ovs_mutex or rcu_read_lock to keep the
- * returned dp pointer valid. */
+ * returned dp pointer valid.
+ */
 static inline struct datapath *get_dp(struct net *net, int dp_ifindex)
 {
        struct datapath *dp;
@@ -486,7 +488,8 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
        }
 
        /* Only reserve room for attribute header, packet data is added
-        * in skb_zerocopy() */
+        * in skb_zerocopy()
+        */
        if (!(nla = nla_reserve(user_skb, OVS_PACKET_ATTR_PACKET, 0))) {
                err = -ENOBUFS;
                goto out;
@@ -552,7 +555,8 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info)
 
        /* Normally, setting the skb 'protocol' field would be handled by a
         * call to eth_type_trans(), but it assumes there's a sending
-        * device, which we may not have. */
+        * device, which we may not have.
+        */
        if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN)
                packet->protocol = eth->h_proto;
        else
@@ -877,7 +881,8 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
        }
 
        /* Most of the time we need to allocate a new flow, do it before
-        * locking. */
+        * locking.
+        */
        new_flow = ovs_flow_alloc();
        if (IS_ERR(new_flow)) {
                error = PTR_ERR(new_flow);
index 2086a1a..a3c5d2f 100644 (file)
@@ -467,7 +467,8 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
 
        __skb_pull(skb, 2 * ETH_ALEN);
        /* We are going to push all headers that we pull, so no need to
-        * update skb->csum here. */
+        * update skb->csum here.
+        */
 
        key->eth.tci = 0;
        if (vlan_tx_tag_present(skb))
@@ -550,7 +551,8 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
                                struct icmphdr *icmp = icmp_hdr(skb);
                                /* The ICMP type and code fields use the 16-bit
                                 * transport port fields, so we need to store
-                                * them in 16-bit network byte order. */
+                                * them in 16-bit network byte order.
+                                */
                                key->tp.src = htons(icmp->type);
                                key->tp.dst = htons(icmp->code);
                        } else {
index 762ea03..37b0bdd 100644 (file)
@@ -118,7 +118,8 @@ static bool match_validate(const struct sw_flow_match *match,
        u64 mask_allowed = key_attrs;  /* At most allow all key attributes */
 
        /* The following mask attributes allowed only if they
-        * pass the validation tests. */
+        * pass the validation tests.
+        */
        mask_allowed &= ~((1ULL << OVS_KEY_ATTR_IPV4)
                        | (1ULL << OVS_KEY_ATTR_IPV6)
                        | (1ULL << OVS_KEY_ATTR_TCP)
@@ -253,7 +254,8 @@ static bool match_validate(const struct sw_flow_match *match,
 size_t ovs_tun_key_attr_size(void)
 {
        /* Whenever adding new OVS_TUNNEL_KEY_ FIELDS, we should consider
-        * updating this function.  */
+        * updating this function.
+        */
        return    nla_total_size(8)    /* OVS_TUNNEL_KEY_ATTR_ID */
                + nla_total_size(4)    /* OVS_TUNNEL_KEY_ATTR_IPV4_SRC */
                + nla_total_size(4)    /* OVS_TUNNEL_KEY_ATTR_IPV4_DST */
@@ -270,7 +272,8 @@ size_t ovs_tun_key_attr_size(void)
 size_t ovs_key_attr_size(void)
 {
        /* Whenever adding new OVS_KEY_ FIELDS, we should consider
-        * updating this function.  */
+        * updating this function.
+        */
        BUILD_BUG_ON(OVS_KEY_ATTR_TUNNEL_INFO != 22);
 
        return    nla_total_size(4)   /* OVS_KEY_ATTR_PRIORITY */
@@ -1388,7 +1391,8 @@ static void rcu_free_acts_callback(struct rcu_head *rcu)
 }
 
 /* Schedules 'sf_acts' to be freed after the next RCU grace period.
- * The caller must hold rcu_read_lock for this to be sensible. */
+ * The caller must hold rcu_read_lock for this to be sensible.
+ */
 void ovs_nla_free_flow_actions(struct sw_flow_actions *sf_acts)
 {
        call_rcu(&sf_acts->rcu, rcu_free_acts_callback);
index 9656cfe..ad410fd 100644 (file)
@@ -331,7 +331,8 @@ skip_flows:
 }
 
 /* No need for locking this function is called from RCU callback or
- * error path. */
+ * error path.
+ */
 void ovs_flow_tbl_destroy(struct flow_table *table)
 {
        struct table_instance *ti = rcu_dereference_raw(table->ti);
@@ -564,7 +565,7 @@ static struct sw_flow *flow_lookup(struct flow_table *tbl,
  * cache entry in mask cache.
  * This is per cpu cache and is divided in MC_HASH_SEGS segments.
  * In case of a hash collision the entry is hashed in next segment.
- * */
+ */
 struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *tbl,
                                          const struct sw_flow_key *key,
                                          u32 skb_hash,
@@ -715,7 +716,8 @@ void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow)
        table->count--;
 
        /* RCU delete the mask. 'flow->mask' is not NULLed, as it should be
-        * accessible as long as the RCU read lock is held. */
+        * accessible as long as the RCU read lock is held.
+        */
        flow_mask_remove(table, flow->mask);
 }
 
@@ -845,7 +847,8 @@ int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
 }
 
 /* Initializes the flow module.
- * Returns zero if successful or a negative error code. */
+ * Returns zero if successful or a negative error code.
+ */
 int ovs_flow_init(void)
 {
        BUILD_BUG_ON(__alignof__(struct sw_flow_key) % __alignof__(long));
index 3a38138..a1c4949 100644 (file)
@@ -59,7 +59,8 @@ static struct net_device_stats *internal_dev_sys_stats(struct net_device *netdev
        ovs_vport_get_stats(vport, &vport_stats);
 
        /* The tx and rx stats need to be swapped because the
-        * switch and host OS have opposite perspectives. */
+        * switch and host OS have opposite perspectives.
+        */
        stats->rx_packets       = vport_stats.tx_packets;
        stats->tx_packets       = vport_stats.rx_packets;
        stats->rx_bytes         = vport_stats.tx_bytes;
index c763491..9c0908a 100644 (file)
@@ -202,7 +202,8 @@ static void netdev_port_receive(struct vport *vport, struct sk_buff *skb)
        /* Make our own copy of the packet.  Otherwise we will mangle the
         * packet for anyone who came before us (e.g. tcpdump via AF_PACKET).
         * (No one comes after us, since we tell handle_bridge() that we took
-        * the packet.) */
+        * the packet.)
+        */
        skb = skb_share_check(skb, GFP_ATOMIC);
        if (unlikely(!skb))
                return;
index 18f3956..274e47f 100644 (file)
@@ -40,7 +40,8 @@ static void ovs_vport_record_error(struct vport *,
                                   enum vport_err_type err_type);
 
 /* List of statically compiled vport implementations.  Don't forget to also
- * add yours to the list at the bottom of vport.h. */
+ * add yours to the list at the bottom of vport.h.
+ */
 static const struct vport_ops *vport_ops_list[] = {
        &ovs_netdev_vport_ops,
        &ovs_internal_vport_ops,
index 82d9a78..c0ab88a 100644 (file)
@@ -221,7 +221,8 @@ void ovs_vport_receive(struct vport *, struct sk_buff *,
                       const struct ovs_tunnel_info *);
 
 /* List of statically compiled vport implementations.  Don't forget to also
- * add yours to the list at the top of vport.c. */
+ * add yours to the list at the top of vport.c.
+ */
 extern const struct vport_ops ovs_netdev_vport_ops;
 extern const struct vport_ops ovs_internal_vport_ops;
 extern const struct vport_ops ovs_geneve_vport_ops;