Signed-off-by: Joe Stringer <joestrin...@nicira.com>
---
 datapath/actions.c      | 6 +-----
 datapath/datapath.c     | 2 ++
 datapath/flow.h         | 1 -
 datapath/flow_netlink.c | 7 ++++---
 datapath/vport.c        | 3 +--
 datapath/vport.h        | 1 -
 6 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 4941ca0..6e32c00 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -28,6 +28,7 @@
 #include <linux/in6.h>
 #include <linux/if_arp.h>
 #include <linux/if_vlan.h>
+
 #include <net/ip.h>
 #include <net/ipv6.h>
 #include <net/checksum.h>
@@ -228,7 +229,6 @@ static int pop_vlan(struct sk_buff *skb, struct sw_flow_key 
*key)
                invalidate_flow_key(key);
        else
                key->eth.tci = 0;
-
        return err;
 }
 
@@ -239,7 +239,6 @@ static int push_vlan(struct sk_buff *skb, struct 
sw_flow_key *key,
                invalidate_flow_key(key);
        else
                key->eth.tci = vlan->vlan_tci;
-
        return skb_vlan_push(skb, vlan->vlan_tpid,
                             ntohs(vlan->vlan_tci) & ~VLAN_TAG_PRESENT);
 }
@@ -557,7 +556,6 @@ static int set_tcp(struct sk_buff *skb, struct sw_flow_key 
*flow_key,
                return err;
 
        th = tcp_hdr(skb);
-
        src = MASKED(th->source, key->tcp_src, mask->tcp_src);
        if (likely(src != th->source)) {
                set_tp_port(skb, &th->source, src, &th->check);
@@ -587,7 +585,6 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key 
*flow_key,
                return err;
 
        sh = sctp_hdr(skb);
-
        old_csum = sh->checksum;
        old_correct_csum = sctp_compute_cksum(skb, sctphoff);
 
@@ -747,7 +744,6 @@ static int execute_set_action(struct sk_buff *skb,
        }
 
        return -EINVAL;
-
 }
 
 /* Mask is at the midpoint of the data. */
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 365933f..ddcd1e5 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1587,6 +1587,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct 
genl_info *info)
 
        ovs_net = net_generic(ovs_dp_get_net(dp), ovs_net_id);
        list_add_tail_rcu(&dp->list_node, &ovs_net->dps);
+
        ovs_unlock();
 
        ovs_notify(&dp_datapath_genl_family, &ovs_dp_datapath_multicast_group, 
reply, info);
@@ -1686,6 +1687,7 @@ static int ovs_dp_cmd_set(struct sk_buff *skb, struct 
genl_info *info)
        err = ovs_dp_cmd_fill_info(dp, reply, info->snd_portid,
                                   info->snd_seq, 0, OVS_DP_CMD_NEW);
        BUG_ON(err < 0);
+
        ovs_unlock();
 
        ovs_notify(&dp_datapath_genl_family, &ovs_dp_datapath_multicast_group, 
reply, info);
diff --git a/datapath/flow.h b/datapath/flow.h
index 93aecf0..2433436 100644
--- a/datapath/flow.h
+++ b/datapath/flow.h
@@ -66,7 +66,6 @@ struct ovs_tunnel_info {
 #define TUN_METADATA_OPTS(flow_key, opt_len) \
        ((void *)((flow_key)->tun_opts + TUN_METADATA_OFFSET(opt_len)))
 
-
 static inline void __ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info,
                                            __be32 saddr, __be32 daddr,
                                            u8 tos, u8 ttl,
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index 95b852a..997da19 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -340,6 +340,7 @@ static const struct ovs_len_tbl 
ovs_key_lens[OVS_KEY_ATTR_MAX + 1] = {
                                     .next = ovs_tunnel_key_lens, },
        [OVS_KEY_ATTR_MPLS]      = { .len = sizeof(struct ovs_key_mpls) },
 };
+
 static bool is_all_zero(const u8 *fp, size_t size)
 {
        int i;
@@ -858,12 +859,14 @@ static int ovs_key_from_nlattrs(struct sw_flow_match 
*match, u64 attrs,
                                  ipv6_key->ipv6_frag, OVS_FRAG_TYPE_MAX);
                        return -EINVAL;
                }
+
                if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) {
                        OVS_NLERR(log,
                                  "Invalid IPv6 flow label value (value=%x, 
max=%x).",
                                  ntohl(ipv6_key->ipv6_label), (1 << 20) - 1);
                        return -EINVAL;
                }
+
                SW_FLOW_KEY_PUT(match, ipv6.label,
                                ipv6_key->ipv6_label, is_mask);
                SW_FLOW_KEY_PUT(match, ip.proto,
@@ -1797,7 +1800,6 @@ static int validate_and_copy_set_tun(const struct nlattr 
*attr,
                memcpy((tun_info + 1),
                       TUN_METADATA_OPTS(&key, key.tun_opts_len), 
key.tun_opts_len);
                tun_info->options = (tun_info + 1);
-
        } else {
                tun_info->options = NULL;
        }
@@ -1895,6 +1897,7 @@ static int validate_set(const struct nlattr *a,
                        return -EINVAL;
 
                ipv6_key = nla_data(ovs_key);
+
                if (masked) {
                        const struct ovs_key_ipv6 *mask = ipv6_key + 1;
 
@@ -2066,7 +2069,6 @@ static int __ovs_nla_copy_actions(const struct nlattr 
*attr,
                case OVS_ACTION_ATTR_OUTPUT:
                        if (nla_get_u32(a) >= DP_MAX_PORTS)
                                return -EINVAL;
-
                        break;
 
                case OVS_ACTION_ATTR_HASH: {
@@ -2103,7 +2105,6 @@ static int __ovs_nla_copy_actions(const struct nlattr 
*attr,
 
                        if (!eth_p_mpls(mpls->mpls_ethertype))
                                return -EINVAL;
-
                        /* Prohibit push MPLS other than to a white list
                         * for packets that have a known tag order.
                         */
diff --git a/datapath/vport.c b/datapath/vport.c
index 4486d06..024491f 100644
--- a/datapath/vport.c
+++ b/datapath/vport.c
@@ -501,7 +501,6 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff 
*skb,
                kfree_skb(skb);
                return;
        }
-
        ovs_dp_process_packet(skb, &key);
 }
 EXPORT_SYMBOL_GPL(ovs_vport_receive);
@@ -533,7 +532,6 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb)
        } else {
                ovs_vport_record_error(vport, VPORT_E_TX_DROPPED);
        }
-
        return sent;
 }
 
@@ -566,6 +564,7 @@ static void ovs_vport_record_error(struct vport *vport,
                atomic_long_inc(&vport->err_stats.tx_errors);
                break;
        }
+
 }
 
 static void free_vport_rcu(struct rcu_head *rcu)
diff --git a/datapath/vport.h b/datapath/vport.h
index c289d60..548ce66 100644
--- a/datapath/vport.h
+++ b/datapath/vport.h
@@ -226,7 +226,6 @@ static inline struct vport *vport_from_priv(void *priv)
 void ovs_vport_receive(struct vport *, struct sk_buff *,
                       const struct ovs_tunnel_info *);
 
-
 static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
                                      const void *start, unsigned int len)
 {
-- 
2.1.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to