From: Pravin B Shelar Date: Mon, 20 Oct 2014 22:19:10 +0000 (-0700) Subject: datapath: Fix comment style. X-Git-Tag: v2.4.0~1131 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=af465b67a9b93f7db935924f1b51a90dea81fe12 datapath: Fix comment style. Use netdev comment style. Signed-off-by: Pravin B Shelar Acked-by: Andy Zhou --- diff --git a/datapath/actions.c b/datapath/actions.c index b527cb655..00c1fd4b7 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -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) diff --git a/datapath/compat.h b/datapath/compat.h index f38d38c06..9632a6e60 100644 --- a/datapath/compat.h +++ b/datapath/compat.h @@ -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 = { diff --git a/datapath/datapath.c b/datapath/datapath.c index e53c5d52d..6820a95ad 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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); diff --git a/datapath/flow.c b/datapath/flow.c index 2086a1a0a..a3c5d2f2b 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -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 { diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 762ea035b..37b0bdd6c 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -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); diff --git a/datapath/flow_table.c b/datapath/flow_table.c index 9656cfe04..ad410fda3 100644 --- a/datapath/flow_table.c +++ b/datapath/flow_table.c @@ -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)); diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 3a38138a4..a1c4949c8 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -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; diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index c76349128..9c0908a03 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -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; diff --git a/datapath/vport.c b/datapath/vport.c index 18f39569f..274e47f28 100644 --- a/datapath/vport.c +++ b/datapath/vport.c @@ -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, diff --git a/datapath/vport.h b/datapath/vport.h index 82d9a78fd..c0ab88a9e 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -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;