]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/infiniband/sw/rxe/rxe_net.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[mirror_ubuntu-artful-kernel.git] / drivers / infiniband / sw / rxe / rxe_net.c
index ffff5a54cb340d9d95d6bef83ce78ff456011d46..16967cdb45dffb6c9841748ac0b13f379d02adb9 100644 (file)
@@ -46,7 +46,7 @@
 #include "rxe_loc.h"
 
 static LIST_HEAD(rxe_dev_list);
-static spinlock_t dev_list_lock; /* spinlock for device list */
+static DEFINE_SPINLOCK(dev_list_lock); /* spinlock for device list */
 
 struct rxe_dev *net_to_rxe(struct net_device *ndev)
 {
@@ -455,6 +455,8 @@ static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
                return -EAGAIN;
        }
 
+       if (pkt->qp)
+               atomic_inc(&pkt->qp->skb_out);
        kfree_skb(skb);
 
        return 0;
@@ -659,8 +661,6 @@ struct notifier_block rxe_net_notifier = {
 
 int rxe_net_ipv4_init(void)
 {
-       spin_lock_init(&dev_list_lock);
-
        recv_sockets.sk4 = rxe_setup_udp_tunnel(&init_net,
                                htons(ROCE_V2_UDP_DPORT), false);
        if (IS_ERR(recv_sockets.sk4)) {
@@ -676,8 +676,6 @@ int rxe_net_ipv6_init(void)
 {
 #if IS_ENABLED(CONFIG_IPV6)
 
-       spin_lock_init(&dev_list_lock);
-
        recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net,
                                                htons(ROCE_V2_UDP_DPORT), true);
        if (IS_ERR(recv_sockets.sk6)) {