Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
From: roopa @ 2015-01-28 13:37 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, stephen, rami.rosen
In-Reply-To: <20150127.230511.1131199235284204820.davem@davemloft.net>

On 1/27/15, 11:05 PM, David Miller wrote:
> From: roopa@cumulusnetworks.com
> Date: Tue, 27 Jan 2015 21:46:24 -0800
>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081
>>
>> This patch avoids calling rtnl_notify if the device ndo_bridge_getlink
>> handler does not return any bytes in the skb.
>>
>> Alternately, the skb->len check can be moved inside rtnl_notify.
>>
>> For the bridge vlan case described in 92081, there is also a fix needed
>> in bridge driver to generate a proper notification. Will fix that in
>> subsequent patch.
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> This doesn't apply to the 'net' tree, is there something I missed?
sorry, that's me. This should be net-next. Resubmitting with net-next in 
the PATCH line.

thanks.

^ permalink raw reply

* Re: [PATCH net] net: ipv6: allow explicitly choosing optimistic addresses
From: Erik Kline @ 2015-01-28 12:03 UTC (permalink / raw)
  To: Hannes Frederic Sowa; +Cc: netdev, David Miller
In-Reply-To: <1422189993.2148036.218504993.339586EE@webmail.messagingengine.com>

On Sun, Jan 25, 2015 at 9:46 PM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> Hi,
>
> On Wed, Jan 21, 2015, at 08:02, Erik Kline wrote:
>>               if (ipv6_addr_equal(&ifp->addr, addr) &&
>> -                   !(ifp->flags&IFA_F_TENTATIVE) &&
>> +                   (!(ifp->flags&IFA_F_TENTATIVE) ||
>> +                    ifp->flags&IFA_F_OPTIMISTIC) &&
>> +                   !(ifp->flags&banned_flags) &&
>>                   (dev == NULL || ifp->idev->dev == dev ||
>
> Can the wrapper take the IFA_F_TENTATIVE and IFA_F_OPTIMISTIC into the
> banned_flags argument, so this condition becomes easier to read? The new
> caller could also specify them verbatim. I think it would improve
> readability.

So I did a bit of fiddling (and some fiddling of bits) and I've got a
working version with your suggestion.

Note that because we use 2 flags to represent optimistic state we
still have a bit of complication in order to check whether or not
optimistic is explicitly banned or not (as opposed to accidentally
banned by virtue of its pairing with tentative).

Thanks,
-Erik

^ permalink raw reply

* [PATCH] net: remove sock_iocb
From: Christoph Hellwig @ 2015-01-28 17:04 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

The sock_iocb structure is allocate on stack for each read/write-like
operation on sockets, and contains various fields of which only the
embedded msghdr and sometimes a pointer to the scm_cookie is ever used.
Get rid of the sock_iocb and put a msghdr directly on the stack and pass
the scm_cookie explicitly to netlink_mmap_sendmsg.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/net/sock.h       | 23 ---------------
 net/netlink/af_netlink.c | 28 +++++++------------
 net/socket.c             | 45 +++--------------------------
 net/unix/af_unix.c       | 73 +++++++++++++++++++-----------------------------
 4 files changed, 43 insertions(+), 126 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 2210fec..1534149 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1374,29 +1374,6 @@ void sk_prot_clear_portaddr_nulls(struct sock *sk, int size);
 #define SOCK_BINDADDR_LOCK	4
 #define SOCK_BINDPORT_LOCK	8
 
-/* sock_iocb: used to kick off async processing of socket ios */
-struct sock_iocb {
-	struct list_head	list;
-
-	int			flags;
-	int			size;
-	struct socket		*sock;
-	struct sock		*sk;
-	struct scm_cookie	*scm;
-	struct msghdr		*msg, async_msg;
-	struct kiocb		*kiocb;
-};
-
-static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb)
-{
-	return (struct sock_iocb *)iocb->private;
-}
-
-static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
-{
-	return si->kiocb;
-}
-
 struct socket_alloc {
 	struct socket socket;
 	struct inode vfs_inode;
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 02fdde2..efae751 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -708,7 +708,7 @@ static void netlink_ring_setup_skb(struct sk_buff *skb, struct sock *sk,
 
 static int netlink_mmap_sendmsg(struct sock *sk, struct msghdr *msg,
 				u32 dst_portid, u32 dst_group,
-				struct sock_iocb *siocb)
+				struct scm_cookie *scm)
 {
 	struct netlink_sock *nlk = nlk_sk(sk);
 	struct netlink_ring *ring;
@@ -754,7 +754,7 @@ static int netlink_mmap_sendmsg(struct sock *sk, struct msghdr *msg,
 
 		NETLINK_CB(skb).portid	  = nlk->portid;
 		NETLINK_CB(skb).dst_group = dst_group;
-		NETLINK_CB(skb).creds	  = siocb->scm->creds;
+		NETLINK_CB(skb).creds	  = scm->creds;
 
 		err = security_netlink_send(sk, skb);
 		if (err) {
@@ -833,7 +833,7 @@ static void netlink_ring_set_copied(struct sock *sk, struct sk_buff *skb)
 #define netlink_tx_is_mmaped(sk)	false
 #define netlink_mmap			sock_no_mmap
 #define netlink_poll			datagram_poll
-#define netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group, siocb)	0
+#define netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group, scm)	0
 #endif /* CONFIG_NETLINK_MMAP */
 
 static void netlink_skb_destructor(struct sk_buff *skb)
@@ -2259,7 +2259,6 @@ static void netlink_cmsg_recv_pktinfo(struct msghdr *msg, struct sk_buff *skb)
 static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
 			   struct msghdr *msg, size_t len)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
 	struct sock *sk = sock->sk;
 	struct netlink_sock *nlk = nlk_sk(sk);
 	DECLARE_SOCKADDR(struct sockaddr_nl *, addr, msg->msg_name);
@@ -2273,10 +2272,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
 	if (msg->msg_flags&MSG_OOB)
 		return -EOPNOTSUPP;
 
-	if (NULL == siocb->scm)
-		siocb->scm = &scm;
-
-	err = scm_send(sock, msg, siocb->scm, true);
+	err = scm_send(sock, msg, &scm, true);
 	if (err < 0)
 		return err;
 
@@ -2305,7 +2301,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
 	if (netlink_tx_is_mmaped(sk) &&
 	    msg->msg_iter.iov->iov_base == NULL) {
 		err = netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group,
-					   siocb);
+					   &scm);
 		goto out;
 	}
 
@@ -2319,7 +2315,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
 
 	NETLINK_CB(skb).portid	= nlk->portid;
 	NETLINK_CB(skb).dst_group = dst_group;
-	NETLINK_CB(skb).creds	= siocb->scm->creds;
+	NETLINK_CB(skb).creds	= scm.creds;
 	NETLINK_CB(skb).flags	= netlink_skb_flags;
 
 	err = -EFAULT;
@@ -2341,7 +2337,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
 	err = netlink_unicast(sk, skb, dst_portid, msg->msg_flags&MSG_DONTWAIT);
 
 out:
-	scm_destroy(siocb->scm);
+	scm_destroy(&scm);
 	return err;
 }
 
@@ -2349,7 +2345,6 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
 			   struct msghdr *msg, size_t len,
 			   int flags)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
 	struct scm_cookie scm;
 	struct sock *sk = sock->sk;
 	struct netlink_sock *nlk = nlk_sk(sk);
@@ -2412,11 +2407,8 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
 	if (nlk->flags & NETLINK_RECV_PKTINFO)
 		netlink_cmsg_recv_pktinfo(msg, skb);
 
-	if (NULL == siocb->scm) {
-		memset(&scm, 0, sizeof(scm));
-		siocb->scm = &scm;
-	}
-	siocb->scm->creds = *NETLINK_CREDS(skb);
+	memset(&scm, 0, sizeof(scm));
+	scm.creds = *NETLINK_CREDS(skb);
 	if (flags & MSG_TRUNC)
 		copied = data_skb->len;
 
@@ -2431,7 +2423,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
 		}
 	}
 
-	scm_recv(sock, msg, siocb->scm, flags);
+	scm_recv(sock, msg, &scm, flags);
 out:
 	netlink_rcv_wake(sk);
 	return err ? : copied;
diff --git a/net/socket.c b/net/socket.c
index 418795c..748a8f5 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -613,13 +613,6 @@ EXPORT_SYMBOL(__sock_tx_timestamp);
 static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock,
 				       struct msghdr *msg, size_t size)
 {
-	struct sock_iocb *si = kiocb_to_siocb(iocb);
-
-	si->sock = sock;
-	si->scm = NULL;
-	si->msg = msg;
-	si->size = size;
-
 	return sock->ops->sendmsg(iocb, sock, msg, size);
 }
 
@@ -635,11 +628,9 @@ static int do_sock_sendmsg(struct socket *sock, struct msghdr *msg,
 			   size_t size, bool nosec)
 {
 	struct kiocb iocb;
-	struct sock_iocb siocb;
 	int ret;
 
 	init_sync_kiocb(&iocb, NULL);
-	iocb.private = &siocb;
 	ret = nosec ? __sock_sendmsg_nosec(&iocb, sock, msg, size) :
 		      __sock_sendmsg(&iocb, sock, msg, size);
 	if (-EIOCBQUEUED == ret)
@@ -756,14 +747,6 @@ EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops);
 static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock,
 				       struct msghdr *msg, size_t size, int flags)
 {
-	struct sock_iocb *si = kiocb_to_siocb(iocb);
-
-	si->sock = sock;
-	si->scm = NULL;
-	si->msg = msg;
-	si->size = size;
-	si->flags = flags;
-
 	return sock->ops->recvmsg(iocb, sock, msg, size, flags);
 }
 
@@ -779,11 +762,9 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
 		 size_t size, int flags)
 {
 	struct kiocb iocb;
-	struct sock_iocb siocb;
 	int ret;
 
 	init_sync_kiocb(&iocb, NULL);
-	iocb.private = &siocb;
 	ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&iocb);
@@ -795,11 +776,9 @@ static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
 			      size_t size, int flags)
 {
 	struct kiocb iocb;
-	struct sock_iocb siocb;
 	int ret;
 
 	init_sync_kiocb(&iocb, NULL);
-	iocb.private = &siocb;
 	ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&iocb);
@@ -866,14 +845,6 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
 	return sock->ops->splice_read(sock, ppos, pipe, len, flags);
 }
 
-static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb,
-					 struct sock_iocb *siocb)
-{
-	siocb->kiocb = iocb;
-	iocb->private = siocb;
-	return siocb;
-}
-
 static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb,
 		struct file *file, const struct iovec *iov,
 		unsigned long nr_segs)
@@ -898,7 +869,7 @@ static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb,
 static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
 				unsigned long nr_segs, loff_t pos)
 {
-	struct sock_iocb siocb, *x;
+	struct msghdr msg;
 
 	if (pos != 0)
 		return -ESPIPE;
@@ -906,11 +877,7 @@ static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
 	if (iocb->ki_nbytes == 0)	/* Match SYS5 behaviour */
 		return 0;
 
-
-	x = alloc_sock_iocb(iocb, &siocb);
-	if (!x)
-		return -ENOMEM;
-	return do_sock_read(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs);
+	return do_sock_read(&msg, iocb, iocb->ki_filp, iov, nr_segs);
 }
 
 static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb,
@@ -939,16 +906,12 @@ static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb,
 static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
 			  unsigned long nr_segs, loff_t pos)
 {
-	struct sock_iocb siocb, *x;
+	struct msghdr msg;
 
 	if (pos != 0)
 		return -ESPIPE;
 
-	x = alloc_sock_iocb(iocb, &siocb);
-	if (!x)
-		return -ENOMEM;
-
-	return do_sock_write(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs);
+	return do_sock_write(&msg, iocb, iocb->ki_filp, iov, nr_segs);
 }
 
 /*
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 8e1b102..526b6ed 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1445,7 +1445,6 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
 static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
 			      struct msghdr *msg, size_t len)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
 	struct sock *sk = sock->sk;
 	struct net *net = sock_net(sk);
 	struct unix_sock *u = unix_sk(sk);
@@ -1456,14 +1455,12 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
 	unsigned int hash;
 	struct sk_buff *skb;
 	long timeo;
-	struct scm_cookie tmp_scm;
+	struct scm_cookie scm;
 	int max_level;
 	int data_len = 0;
 
-	if (NULL == siocb->scm)
-		siocb->scm = &tmp_scm;
 	wait_for_unix_gc();
-	err = scm_send(sock, msg, siocb->scm, false);
+	err = scm_send(sock, msg, &scm, false);
 	if (err < 0)
 		return err;
 
@@ -1507,11 +1504,11 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
 	if (skb == NULL)
 		goto out;
 
-	err = unix_scm_to_skb(siocb->scm, skb, true);
+	err = unix_scm_to_skb(&scm, skb, true);
 	if (err < 0)
 		goto out_free;
 	max_level = err + 1;
-	unix_get_secdata(siocb->scm, skb);
+	unix_get_secdata(&scm, skb);
 
 	skb_put(skb, len - data_len);
 	skb->data_len = data_len;
@@ -1606,7 +1603,7 @@ restart:
 	unix_state_unlock(other);
 	other->sk_data_ready(other);
 	sock_put(other);
-	scm_destroy(siocb->scm);
+	scm_destroy(&scm);
 	return len;
 
 out_unlock:
@@ -1616,7 +1613,7 @@ out_free:
 out:
 	if (other)
 		sock_put(other);
-	scm_destroy(siocb->scm);
+	scm_destroy(&scm);
 	return err;
 }
 
@@ -1628,21 +1625,18 @@ out:
 static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
 			       struct msghdr *msg, size_t len)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
 	struct sock *sk = sock->sk;
 	struct sock *other = NULL;
 	int err, size;
 	struct sk_buff *skb;
 	int sent = 0;
-	struct scm_cookie tmp_scm;
+	struct scm_cookie scm;
 	bool fds_sent = false;
 	int max_level;
 	int data_len;
 
-	if (NULL == siocb->scm)
-		siocb->scm = &tmp_scm;
 	wait_for_unix_gc();
-	err = scm_send(sock, msg, siocb->scm, false);
+	err = scm_send(sock, msg, &scm, false);
 	if (err < 0)
 		return err;
 
@@ -1683,7 +1677,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
 			goto out_err;
 
 		/* Only send the fds in the first buffer */
-		err = unix_scm_to_skb(siocb->scm, skb, !fds_sent);
+		err = unix_scm_to_skb(&scm, skb, !fds_sent);
 		if (err < 0) {
 			kfree_skb(skb);
 			goto out_err;
@@ -1715,8 +1709,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
 		sent += size;
 	}
 
-	scm_destroy(siocb->scm);
-	siocb->scm = NULL;
+	scm_destroy(&scm);
 
 	return sent;
 
@@ -1728,8 +1721,7 @@ pipe_err:
 		send_sig(SIGPIPE, current, 0);
 	err = -EPIPE;
 out_err:
-	scm_destroy(siocb->scm);
-	siocb->scm = NULL;
+	scm_destroy(&scm);
 	return sent ? : err;
 }
 
@@ -1778,8 +1770,7 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
 			      struct msghdr *msg, size_t size,
 			      int flags)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(iocb);
-	struct scm_cookie tmp_scm;
+	struct scm_cookie scm;
 	struct sock *sk = sock->sk;
 	struct unix_sock *u = unix_sk(sk);
 	int noblock = flags & MSG_DONTWAIT;
@@ -1831,16 +1822,14 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
 	if (sock_flag(sk, SOCK_RCVTSTAMP))
 		__sock_recv_timestamp(msg, sk, skb);
 
-	if (!siocb->scm) {
-		siocb->scm = &tmp_scm;
-		memset(&tmp_scm, 0, sizeof(tmp_scm));
-	}
-	scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
-	unix_set_secdata(siocb->scm, skb);
+	memset(&scm, 0, sizeof(scm));
+
+	scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
+	unix_set_secdata(&scm, skb);
 
 	if (!(flags & MSG_PEEK)) {
 		if (UNIXCB(skb).fp)
-			unix_detach_fds(siocb->scm, skb);
+			unix_detach_fds(&scm, skb);
 
 		sk_peek_offset_bwd(sk, skb->len);
 	} else {
@@ -1860,11 +1849,11 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
 		sk_peek_offset_fwd(sk, size);
 
 		if (UNIXCB(skb).fp)
-			siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+			scm.fp = scm_fp_dup(UNIXCB(skb).fp);
 	}
 	err = (flags & MSG_TRUNC) ? skb->len - skip : size;
 
-	scm_recv(sock, msg, siocb->scm, flags);
+	scm_recv(sock, msg, &scm, flags);
 
 out_free:
 	skb_free_datagram(sk, skb);
@@ -1915,8 +1904,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
 			       struct msghdr *msg, size_t size,
 			       int flags)
 {
-	struct sock_iocb *siocb = kiocb_to_siocb(iocb);
-	struct scm_cookie tmp_scm;
+	struct scm_cookie scm;
 	struct sock *sk = sock->sk;
 	struct unix_sock *u = unix_sk(sk);
 	DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, msg->msg_name);
@@ -1943,10 +1931,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
 	 * while sleeps in memcpy_tomsg
 	 */
 
-	if (!siocb->scm) {
-		siocb->scm = &tmp_scm;
-		memset(&tmp_scm, 0, sizeof(tmp_scm));
-	}
+	memset(&scm, 0, sizeof(scm));
 
 	err = mutex_lock_interruptible(&u->readlock);
 	if (unlikely(err)) {
@@ -2012,13 +1997,13 @@ again:
 
 		if (check_creds) {
 			/* Never glue messages from different writers */
-			if ((UNIXCB(skb).pid  != siocb->scm->pid) ||
-			    !uid_eq(UNIXCB(skb).uid, siocb->scm->creds.uid) ||
-			    !gid_eq(UNIXCB(skb).gid, siocb->scm->creds.gid))
+			if ((UNIXCB(skb).pid  != scm.pid) ||
+			    !uid_eq(UNIXCB(skb).uid, scm.creds.uid) ||
+			    !gid_eq(UNIXCB(skb).gid, scm.creds.gid))
 				break;
 		} else if (test_bit(SOCK_PASSCRED, &sock->flags)) {
 			/* Copy credentials */
-			scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
+			scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
 			check_creds = 1;
 		}
 
@@ -2045,7 +2030,7 @@ again:
 			sk_peek_offset_bwd(sk, chunk);
 
 			if (UNIXCB(skb).fp)
-				unix_detach_fds(siocb->scm, skb);
+				unix_detach_fds(&scm, skb);
 
 			if (unix_skb_len(skb))
 				break;
@@ -2053,13 +2038,13 @@ again:
 			skb_unlink(skb, &sk->sk_receive_queue);
 			consume_skb(skb);
 
-			if (siocb->scm->fp)
+			if (scm.fp)
 				break;
 		} else {
 			/* It is questionable, see note in unix_dgram_recvmsg.
 			 */
 			if (UNIXCB(skb).fp)
-				siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+				scm.fp = scm_fp_dup(UNIXCB(skb).fp);
 
 			sk_peek_offset_fwd(sk, chunk);
 
@@ -2068,7 +2053,7 @@ again:
 	} while (size);
 
 	mutex_unlock(&u->readlock);
-	scm_recv(sock, msg, siocb->scm, flags);
+	scm_recv(sock, msg, &scm, flags);
 out:
 	return copied ? : err;
 }
-- 
1.9.1

^ permalink raw reply related

* [PATCH RFC 2/2] ipv6: Extend the route lookups to low priority metrics.
From: Steffen Klassert @ 2015-01-28 12:12 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <20150128121026.GM13046@secunet.com>

We search only for routes with highest prioriy metric in
find_rr_leaf(). However if one of these routes is marked
as invalid, we may fail to find a route even if there is
a appropriate route with lower priority. Then we loose
connectivity until the garbage collector deletes the
invalid route. This typically happens if a host route
expires afer a pmtu event. Fix this by searching also
for routes with a lower priority metric.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv6/route.c | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 3e864e7..ce354c9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -654,15 +654,33 @@ static struct rt6_info *find_rr_leaf(struct fib6_node *fn,
 				     u32 metric, int oif, int strict,
 				     bool *do_rr)
 {
-	struct rt6_info *rt, *match;
+	struct rt6_info *rt, *match, *cont;
 	int mpri = -1;
 
 	match = NULL;
-	for (rt = rr_head; rt && rt->rt6i_metric == metric;
-	     rt = rt->dst.rt6_next)
+	cont = NULL;
+	for (rt = rr_head; rt; rt = rt->dst.rt6_next) {
+		if (rt->rt6i_metric != metric) {
+			cont = rt;
+			break;
+		}
+
+		match = find_match(rt, oif, strict, &mpri, match, do_rr);
+	}
+
+	for (rt = fn->leaf; rt && rt != rr_head; rt = rt->dst.rt6_next) {
+		if (rt->rt6i_metric != metric) {
+			cont = rt;
+			break;
+		}
+
 		match = find_match(rt, oif, strict, &mpri, match, do_rr);
-	for (rt = fn->leaf; rt && rt != rr_head && rt->rt6i_metric == metric;
-	     rt = rt->dst.rt6_next)
+	}
+
+	if (match || !cont)
+		return match;
+
+	for (rt = cont; rt; rt = rt->dst.rt6_next)
 		match = find_match(rt, oif, strict, &mpri, match, do_rr);
 
 	return match;
-- 
1.9.1

^ permalink raw reply related

* [PATCH RFC 1/2] ipv6: Fix after pmtu events dissapearing host routes
From: Steffen Klassert @ 2015-01-28 12:11 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <20150128121026.GM13046@secunet.com>

We currently don't clone host routes before we use them.
If a pmtu event is received on such a route, it gets
an expires value. As soon as the expiration time is
elapsed, the route is deleted. As a result, the host
is not reachable any more.

We fix this by cloning host routes if they are gatewayed,
i.e. if pmtu events can happen.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c910831..3e864e7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -961,7 +961,7 @@ redo_rt6_select:
 
 	if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
 		nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
-	else if (!(rt->dst.flags & DST_HOST))
+	else if (!(rt->dst.flags & DST_HOST) || (rt->rt6i_flags & RTF_GATEWAY))
 		nrt = rt6_alloc_clone(rt, &fl6->daddr);
 	else
 		goto out2;
-- 
1.9.1

^ permalink raw reply related

* Re: A problem about ICMP packet-too-big message handler
From: Steffen Klassert @ 2015-01-28 12:10 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <54C78B8D.1070104@huawei.com>

On Tue, Jan 27, 2015 at 08:58:53PM +0800, Yang Yingliang wrote:
> Hi,
> 
> My kernel is 3.10 LTS.
> 
> I got a problem here about handling ICMP packet-too-big message.
> 
> Before sending a packet-too-big packet :
> 
> # ip -6 route list table local
> local ::1 dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80::1 dev lo  metric 0 	//It  does not have expire value
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:2 dev lo  metric 0 
> local fe80::5054:ff:fe12:3456 dev lo  metric 0
> 
> 
> After sending a packet-too-big packet
> 
> ip -6 route list table local
> local ::1 dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80:: dev lo  metric 0 
> local fe80::1 dev lo  metric 0  expires _597_  //It has expire value

Is this route still present after the expiration time is elapsed?

> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:0 dev lo  metric 0 
> local fe80::200:ff:fe00:2 dev lo  metric 0 
> local fe80::5054:ff:fe12:3456 dev lo  metric 0
> 
> When time is up, I can't ping fe80::1 .
> Is it ok or a bug ?

This looks pretty similar to a bug I discovered recently.
In my case, a ipv6 host route dissapeared 10 minutes after
a PMTU event. As a result, this host was not reachable
anymore.

This happens because we don't clone host routes before
we use them. If a PMTU event happens, the original route
is marked with an expire value. After the expiration time
is elapsed, the original route is deleted and we loose
conectivity to the host.

I'm currently testing patches to fix this. With these
patches the ipv6 host routes are cloned if they are
gateway routes, i.e. if PMTU events can happen.

I fear it will not fix your case because PMTU events are
not expected to happen at local fe80 routes. But you could
change patch 1 to unconditionally clone the routes, if
you want to check if this is your problem.

I'll sent the fixes marked as RFC in reply to this mail.

^ permalink raw reply

* [PATCH net-next] net: gianfar: remove the unneeded check of disabled device
From: Kevin Hao @ 2015-01-28 12:06 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Claudiu Manoil

Since commit cd1e65044d44 ("of/device: Don't register disabled
devices"), the disabled device will not be registered at all. So we
don't need to do the check again in the platform device driver.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 93ff846e96f1..43df78882e48 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -764,7 +764,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
 	u32 *tx_queues, *rx_queues;
 	unsigned short mode, poll_mode;
 
-	if (!np || !of_device_is_available(np))
+	if (!np)
 		return -ENODEV;
 
 	if (of_device_is_compatible(np, "fsl,etsec2")) {
-- 
1.9.3

^ permalink raw reply related

* [RFC] net: tcp: null pointer crash in __inet_put_port
From: Harout Hedeshian @ 2015-01-28 15:56 UTC (permalink / raw)
  To: netdev; +Cc: Harout Hedeshian

Hello,

We are observing a crash in __inet_put_port() wherein icsk_bind_hash
is null (stack trace below).

net/ipv4/inet_hashtables.c:
tb = inet_csk(sk)->icsk_bind_hash;
__sk_del_bind_node(sk);
tb->num_owners--;       <-- tb is unconditionally dereferenced here

>From the RAM dumps: [D:0xFFFFFFC0222FB6F8] icsk_bind_hash = 0x0 = ,

The caller of inet_put_port() in this case is tcp_set_state() which
already does a null check on this particular field before calling
inet_put_port().

net/ipv4/tcp.c:
if (inet_csk(sk)->icsk_bind_hash &&
   !(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
	inet_put_port(sk);

It seems that inet_put_port() does some locking by disabling bottom
halves, but this locking is happening after the null check.

Additionally, I see tcp_v4_destroy_sock() also calling inet_put_port()
after doing a similar null check. However, I am unsure if it would
ever be called on the same socket.

Does the proposed solution of locking the bottom halves from
tcp_set_state() make any sense here? Or use some other locking mechanism
directly on the socket?

[66356.767342] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[66356.767366] pgd = ffffffc0409cb000
[66356.767377] [00000010] *pgd=00000000409c9003, *pmd=0000000000000000
[66356.767397] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[66356.767409] Modules linked in: ecryptfs(O) texfat(PO) mcKernelApi mcDrvModule moc_crypto_api_tmpl(O) moc_crypto(PO) moc_platform_mod(O)
[66356.767453] CPU: 0 PID: 3735 Comm: GCMReader Tainted: P        W  O 3.10.49-g0d75018 #1
[66356.767467] task: ffffffc03a790ac0 ti: ffffffc02b1d0000 task.ti: ffffffc02b1d0000
[66356.767486] PC is at inet_put_port+0x7c/0xb4
[66356.767498] LR is at inet_put_port+0x64/0xb4
[66356.767509] pc : [<ffffffc000ba3890>] lr : [<ffffffc000ba3878>] pstate: 80000145
[66356.767520] sp : ffffffc02b1d3d00
[66356.767530] x29: ffffffc02b1d3d00 x28: ffffffc02b1d0000
[66356.767544] x27: ffffffc0016cf000 x26: 0000000000000039
[66356.767557] x25: ffffffc055644030 x24: ffffffc026280f10
[66356.767570] x23: ffffffc055644030 x22: ffffffc0222fb398
[66356.767583] x21: ffffffc001b2f4c0 x20: ffffffc0222fb300
[66356.767597] x19: ffffffc0b50b7780 x18: 0000007f8399b000
[66356.767610] x17: 0000007f869e00f8 x16: ffffffc0002fb850
[66356.767624] x15: 0000007f83a4c000 x14: 0000000000000000
[66356.767637] x13: 0000000000430000 x12: 0000000000550000
[66356.767651] x11: 0000000000430000 x10: 0000000000000000
[66356.767663] x9 : b36a52a36930d612 x8 : 0008e12c614dea00
[66356.767676] x7 : 0000000000000018 x6 : 0000000034155555
[66356.767689] x5 : 0000000000000000 x4 : 0000000000000000
[66356.767702] x3 : 0000000000000200 x2 : ffffffc002c17de8
[66356.767715] x1 : 0000000000000000 x0 : 0000000000000000
[66356.767727]
[66356.767739] Process GCMReader (pid: 3735, stack limit = 0xffffffc02b1d0058)
[66356.767749] Call trace:
[66356.767762] [<ffffffc000ba3890>] inet_put_port+0x7c/0xb4
[66356.767777] [<ffffffc000ba6940>] tcp_set_state+0xbc/0x108
[66356.767790] [<ffffffc000baa78c>] tcp_close+0x374/0x420
[66356.767807] [<ffffffc000bca210>] inet_release+0x84/0x98
[66356.767821] [<ffffffc000bfd0d8>] inet6_release+0x34/0x44
[66356.767838] [<ffffffc000b22b38>] sock_release+0x34/0xac
[66356.767852] [<ffffffc000b22bbc>] sock_close+0xc/0x1c
[66356.767868] [<ffffffc0002fd718>] __fput+0x108/0x208
[66356.767882] [<ffffffc0002fd8c0>] ____fput+0x8/0x14
[66356.767898] [<ffffffc00023b8d4>] task_work_run+0xb0/0xe4
[66356.767914] [<ffffffc0002072ec>] do_notify_resume+0x44/0x54
[66356.767929] Code: f941fe81 f9000040 b4000040 f9000402 (b9401020)
[66356.767942] ---[ end trace 421040d8ca7bbe73 ]---
---
 net/ipv4/tcp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 3075723..f3b5714 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1910,9 +1910,11 @@ void tcp_set_state(struct sock *sk, int state)
 			TCP_INC_STATS(sock_net(sk), TCP_MIB_ESTABRESETS);
 
 		sk->sk_prot->unhash(sk);
+		local_bh_disable();
 		if (inet_csk(sk)->icsk_bind_hash &&
 		    !(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
 			inet_put_port(sk);
+		local_bh_enable();
 		/* fall through */
 	default:
 		if (oldstate == TCP_ESTABLISHED)
-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

^ permalink raw reply related

* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 20:43 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <54C92878.3030207@ti.com>

On 01/28/2015 01:20 PM, Murali Karicheri wrote:
> On 01/28/2015 12:43 PM, Murali Karicheri wrote:
>> On 01/28/2015 11:49 AM, Murali Karicheri wrote:
>>> On 01/27/2015 05:28 PM, Arnd Bergmann wrote:
>>>> On Tuesday 20 January 2015 10:53:36 Murali Karicheri wrote:
>>>>> On 01/19/2015 03:11 PM, David Miller wrote:
>>>>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>>>>> Date: Thu, 15 Jan 2015 19:10:03 -0500
>>>>>>
>>>>>>> The Network Coprocessor (NetCP) is a hardware accelerator that
>>>>>>> processes
>>>>>>> Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with
>>>>>>> a ethernet
>>>>>>> switch sub-module to send and receive packets. NetCP also includes
>>>>>>> a packet
>>>>>>> accelerator (PA) module to perform packet classification operations
>>>>>>> such as
>>>>>>> header matching, and packet modification operations such as checksum
>>>>>>> generation. NetCP can also optionally include a Security
>>>>>>> Accelerator(SA)
>>>>>>> capable of performing IPSec operations on ingress/egress packets.
>>>>>>>
>>>>>>> Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE)
>>>>>>> which
>>>>>>> includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
>>>>>>> 1Gb/s rates per Ethernet port.
>>>>>>>
>>>>>>> Both GBE and XGBE network processors supported using common
>>>>>>> driver. It
>>>>>>> is also designed to handle future variants of NetCP.
>>>>>>
>>>>>> Series applied to net-next, thanks.
>>>>> David,
>>>>>
>>>>> Thanks a lot for applying this series. This helps us move forward to
>>>>> work on the next set of patches.
>>>>
>>>> Hi Murali,
>>>>
>>>> Building an ARM 'allmodconfig' kernel now runs into two separate
>>>> problems
>>>> from your driver:
>>>>
>>>> - you have two module_init() instances in one module, which conflict.
>>>>
>>>> - you have two files that are linked into more than one module, so
>>>> building
>>>> both TI_CPSW and TI_KEYSTONE_NETCP in the same kernel fails.
>>>>
>>>> The answer to both of these is probably to have separate loadable
>>>> modules,
>>>> but you might be able to come up with a different solution.
>>> Arnd,
>>>
>>> Thanks for letting us know. We will look into this.
>>>
>>> How do I reproduce this? Is there a defconfig used for allmodconfig? I
>>> am unable to find one. Any details to reproduce this will be useful.
>>>
>> Ok I think I found it.
>>
>> I did this with next-next branch and it seems to work. I will make
>> kernel build to reproduce this.
>>
>> make ARCH=arm allmodconfig
>> make uImage;
>>
>> I am building it now.
> Arnd,
>
> I see allmodconfig configure NetCP driver as module. My uImage build
> from net-next branch went through fine. I am building modules right now
> and should show error as you have pointed out. Let me know if you any
> issues on how I am working to reproduce the issue (wrong branch, wrong
> /incomplete commands etc. I have my CROSS_COMPILE and ARCH set in my
> env). Want to reproduce this so as to make sure my fix is addressing
> this. Hope I am on the right track.

Reproduced this. Following errors seen when building the modules.

   LD [M]  drivers/net/ethernet/ti/keystone_netcp.o
drivers/net/ethernet/ti/netcp_ethss.o: In function `init_module':
netcp_ethss.c:(.init.text+0x0): multiple definition of `init_module'
drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.init.text+0x0): 
first defined here
drivers/net/ethernet/ti/netcp_ethss.o: In function `cleanup_module':
netcp_ethss.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.exit.text+0x0): 
first defined here
make[4]: *** [drivers/net/ethernet/ti/keystone_netcp.o] Error 1


BTW, I had to disable cpsw_ale.c to get to build keystone NetCP. I am 
assuming someone from TI is addressing this.

drivers/net/ethernet/ti/cpsw_ale.c: In function ‘cpsw_ale_start’:
drivers/net/ethernet/ti/cpsw_ale.c:759:2: error: ‘KBUILD_MODNAME’ 
undeclared (first use in this function)
drivers/net/ethernet/ti/cpsw_ale.c:759:2: note: each undeclared 
identifier is reported only once for each function it appears in

Murali

>
> Thanks
>
> Murali
>>
>> Murali
>>> Thanks.
>>>
>>> Murali
>>>>
>>>> Arnd
>>>
>>>
>>
>>
>
>


-- 
Murali Karicheri
Linux Kernel, Texas Instruments

^ permalink raw reply

* Re: [PATCH v2 linux-trace 4/8] samples: bpf: simple tracing example in C
From: Arnaldo Carvalho de Melo @ 2015-01-28 20:44 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Steven Rostedt, Ingo Molnar, Namhyung Kim, Jiri Olsa,
	Masami Hiramatsu, Linux API, Network Development, LKML
In-Reply-To: <CAMEtUuxRXEPOaX3rksqQKdz4THMmtLR3=uHymEKaMSNkjMBhxw@mail.gmail.com>

Em Wed, Jan 28, 2015 at 08:42:29AM -0800, Alexei Starovoitov escreveu:
> On Wed, Jan 28, 2015 at 8:25 AM, Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> > Em Wed, Jan 28, 2015 at 01:24:15PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> Em Tue, Jan 27, 2015 at 08:06:09PM -0800, Alexei Starovoitov escreveu:
> >> > +   if (bpf_memcmp(dev->name, devname, 2) == 0)

> >> I'm only starting to look at all this, so bear with me... But why do we
> >> need to have it as "bpf_memcmp"? Can't we simply use it as "memcmp" and
> >> have it use the right function?

> >> Less typing, perhaps we would need to have a:

> >> #define memcmp bpf_memcmp(s1, s2, n) bpf_memcmp(s1, s2, n)

> > Argh, like this:

> > #define memcmp(s1, s2, n) bpf_memcmp(s1, s2, n)

> >> in bpf_helpers.h to have it work?

> yes, that will work just fine.
> Since it's an example I made it explicit that bpf_memcmp()
> has memcmp() semantics, but little bit different:
> int bpf_memcmp(void *unsafe_ptr, void *safe_ptr, int size)

Not knowing about the safe/unsafe pointers (at this point in my
conceptual eBPF learning process), I would think that it would be easier
to understand if it would reuse another well known idiom:

#define memcmp_from_user(kernel, user, n) bpf_memcmp(user, kernel, n)

That would be similar to:

 copy_from_user(void *to, const void __user *from, unsigned long n)

But here, again bear with me, I'm just brainstorming, as from just
looking at:

  bpf_memcmp(a, b, n)

I don't reuse anything I've learned before trying to understand eBPF,
not I see any well known marker (__user) that would help me understand
that that pointer needs special treatment/belongs to a different "domain".

> meaning that one of the pointers can point anywhere and
> the function will be doing probe_kernel_read() underneath
> similar to bpf_fetch_*() helpers.

> If it was plain memcmp() it would give a wrong impression
> that vanilla memcmp() can be used.

Since that is not the case, I agree that the 'memcmp' semantic can't be
used, as the two pointers are not on the same "domain", so to say.

> In general the programs cannot use any library functions
> outside of helpers defined in uapi/linux/bpf.h
> 
> bpf_fetch_*() helpers are also explicit in examples.
> If one need to do a lot of pointer walking, then macro like
> #define D(P) ((typeof(P))bpf_fetch_ptr(&P))
> would be easier to use: p = D(D(skb->dev)->ifalias)
> multiple pointer derefs would look more natural...

And if possible, i.e. if the eBPF compiler would take care of that
somehow, would indeed be preferred as it looks more natural :-)

- Arnaldo

^ permalink raw reply

* Re: [PATCH net 0/2] netns: audit netdevice creation with IFLA_NET_NS_[PID|FD]
From: Nicolas Dichtel @ 2015-01-28  9:37 UTC (permalink / raw)
  To: Alexander Aring; +Cc: netdev, davem, arvid.brodin, linux-wpan
In-Reply-To: <20150127202617.GA13654@omega>

Le 27/01/2015 21:26, Alexander Aring a écrit :
> On Tue, Jan 27, 2015 at 03:50:31PM +0100, Nicolas Dichtel wrote:
>> Le 27/01/2015 15:06, Alexander Aring a écrit :
>>> Hi,
>>>
>>> On Tue, Jan 27, 2015 at 02:28:47PM +0100, Nicolas Dichtel wrote:
>>> ...
>> [snip]
>>>>
>>>> I don't know how wpan0 is created and if this interface can be created directly
>>>> in another netns than init_net.
>>>>
>>>
>>> no it can't. The wpan0 interface can be created via the 802.15.4
>>> userspace tools and we don't have such option for namespaces. It
>>> should be always to init_net while creation.
>> Even with 'ip netns exec foo iwpan ...'?
>>
>
> I did a quick test:
>
> diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
> index 6fb6bdf..df55b42 100644
> --- a/net/mac802154/iface.c
> +++ b/net/mac802154/iface.c
> @@ -590,6 +590,11 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name,
>          list_add_tail_rcu(&sdata->list, &local->interfaces);
>          mutex_unlock(&local->iflist_mtx);
>
> +       if (net_eq(dev_net(ndev), &init_net))
> +               printk(KERN_INFO "it's init_net\n");
> +       else
> +               printk(KERN_INFO "it's not init_net\n");
>
> With this patch and running:
>
> ip netns exec foo iwpan phy phy0 interface add bar%d type node
>
> I got a:
>
> [   52.032956] it's init_net
>
> It's also init_net when I run with "ip netns exec foo iwpan ..."
Ok. After looking at the code, it's right that no netns is set in
ieee802154_if_add(), thus the interface is in the default netns (init_net).

[snip]
>>
>> But I still wonder if we should add a check about dev_net(dev) != init_net in
>> net/ieee802154/6lowpan/core.c.
>> If my understanding is correct:
>>   - wpan can be created directly in a netns != init_net
>>   - 6lowpan must be in the same netns than wpan
>>   - code under net/ieee802154 only works in init_net, thus 6lowpan only works
>>     in init_net.
>>
>> Do you agree?
>
> yes. I will put the last item on my ToDo list if we can do more netns
> stuff there.
Cool.

>
>> What about this (based on net-next)?
>>
>
> There are some little issues, see below.
>
>>  From 5ca1c46c68e4e4381b2f7e284f5dadeb28a53b2f Mon Sep 17 00:00:00 2001
>> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> Date: Tue, 27 Jan 2015 11:26:20 +0100
>> Subject: [PATCH] wpan/6lowpan: fix netns settings
>>
>
> use "ieee802154:" instead "wpan/6lowpan:".
Ok.

>
> Can you rebase this patch on bluetooth-next?
Will do.

[snip]
>> --- a/net/mac802154/iface.c
>> +++ b/net/mac802154/iface.c
>> @@ -475,6 +475,7 @@ static void ieee802154_if_setup(struct net_device *dev)
>>   	dev->mtu		= IEEE802154_MTU;
>>   	dev->tx_queue_len	= 300;
>>   	dev->flags		= IFF_NOARP | IFF_BROADCAST;
>> +	dev->features		|= NETIF_F_NETNS_LOCAL;
>
> We should set this inside the cfg802154_netdev_notifier_call function
> and NETDEV_REGISTER case. This can be found in "net/ieee802154/core.c". [0]
>
> The branch "net/mac802154" affects 802.15.4 SoftMAC interfaces only. We
> currently support SoftMAC only, but further we support HardMAC drivers.
> The HardMAC drivers doesn't use the "net/mac802154" branch and call
> netdev_register in driver layer.
>
> When we do it in cfg802154_netdev_notifier_call then this will be set
> for SoftMAC and HardMAC drivers (when we have a HardMAC driver). The
> same behaviour can also be found in wireless implementation. [1]
Ok.


Regards,
Nicolas

^ permalink raw reply

* Re: [PATCH iproute2-next 1/3] include: update headers
From: Nicolas Dichtel @ 2015-01-28 13:28 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <1421750163-20348-1-git-send-email-nicolas.dichtel@6wind.com>

Le 20/01/2015 11:36, Nicolas Dichtel a écrit :
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
Please drop this series, I will send a v2.

^ permalink raw reply

* Re: [PATCH net-next v1 2/3] net-timestamp: no-payload only sysctl
From: Willem de Bruijn @ 2015-01-28 16:40 UTC (permalink / raw)
  To: Network Development
  Cc: David Miller, Richard Cochran, Andy Lutomirski, Willem de Bruijn
In-Reply-To: <1422462528-4060-3-git-send-email-willemb@google.com>

On Wed, Jan 28, 2015 at 11:28 AM, Willem de Bruijn <willemb@google.com> wrote:
> Tx timestamps are looped onto the error queue on top of an skb. This
> mechanism leaks packet headers to processes unless the no-payload
> options SOF_TIMESTAMPING_OPT_TSONLY is set.
>
> Add a sysctl that optionally drops looped timestamp with data. This
> only affects processes without CAP_NET_RAW.
>
> The policy is checked when timestamps are generated in the stack.
> It is possible for timestamps with data to be reported after the
> sysctl is set, if these were queued internally earlier.
>
> No vulnerability is immediately known that exploits knowledge
> gleaned from packet headers, but it may still be preferable to allow
> administrators to lock down this path at the cost of possible
> breakage of legacy applications.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
>
> ----
>
> Changes (rfc -> v1)
>   - document the sysctl in Documentation/sysctl/net.txt
>   - fix access control race: read .._OPT_TSONLY only once,
>         use same value for permission check and skb generation.
> ---
>  Documentation/sysctl/net.txt |  8 ++++++++
>  include/net/sock.h           |  1 +
>  net/core/skbuff.c            | 10 +++++++++-
>  net/core/sock.c              |  3 +++
>  net/core/sysctl_net_core.c   |  9 +++++++++
>  5 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
> index 666594b..6294b51 100644
> --- a/Documentation/sysctl/net.txt
> +++ b/Documentation/sysctl/net.txt
> @@ -97,6 +97,14 @@ rmem_max
>
>  The maximum receive socket buffer size in bytes.
>
> +tstamp_allow_data
> +-----------------
> +Allow processes to receive tx timestamps looped together with the original
> +packet contents. If disabled, transmit timestamp requests from unprivileged
> +processes are dropped unless socket option SOF_TIMESTAMPING_OPT_TSONLY is set.
> +Default: 1 (on)
> +
> +
>  wmem_default
>  ------------
>
> diff --git a/include/net/sock.h b/include/net/sock.h
> index 2210fec..9729171 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -2262,6 +2262,7 @@ bool sk_net_capable(const struct sock *sk, int cap);
>  extern __u32 sysctl_wmem_max;
>  extern __u32 sysctl_rmem_max;
>
> +extern int sysctl_tstamp_allow_data;
>  extern int sysctl_optmem_max;
>
>  extern __u32 sysctl_wmem_default;
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 65a3798..333c62e 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -3690,11 +3690,19 @@ static void __skb_complete_tx_timestamp(struct sk_buff *skb,
>                 kfree_skb(skb);
>  }
>
> +static bool skb_may_tx_timestamp(struct sock *sk, bool tsonly)
> +{
> +       return sysctl_tstamp_allow_data || capable(CAP_NET_RAW) || tsonly;

Immediately after hitting send discovered an issue with this patch,
sorry. This test for CAP_NET_RAW is not correct in this context. Will
have to either drop the CAP_NET_RAW exception to policy enforcement or
find another way of testing for it.

> +}
> +
>  void skb_complete_tx_timestamp(struct sk_buff *skb,
>                                struct skb_shared_hwtstamps *hwtstamps)
>  {
>         struct sock *sk = skb->sk;
>
> +       if (!skb_may_tx_timestamp(sk, false))
> +               return;
> +
>         /* take a reference to prevent skb_orphan() from freeing the socket */
>         sock_hold(sk);
>
> @@ -3712,7 +3720,7 @@ void __skb_tstamp_tx(struct sk_buff *orig_skb,
>         struct sk_buff *skb;
>         bool tsonly = sk->sk_tsflags & SOF_TIMESTAMPING_OPT_TSONLY;
>
> -       if (!sk)
> +       if (!sk || !skb_may_tx_timestamp(sk, tsonly))
>                 return;
>
>         if (tsonly)
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 1c7a33d..93c8b20 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -325,6 +325,8 @@ __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
>  int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
>  EXPORT_SYMBOL(sysctl_optmem_max);
>
> +int sysctl_tstamp_allow_data __read_mostly = 1;
> +
>  struct static_key memalloc_socks = STATIC_KEY_INIT_FALSE;
>  EXPORT_SYMBOL_GPL(memalloc_socks);
>
> @@ -840,6 +842,7 @@ set_rcvbuf:
>                         ret = -EINVAL;
>                         break;
>                 }
> +
>                 if (val & SOF_TIMESTAMPING_OPT_ID &&
>                     !(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)) {
>                         if (sk->sk_protocol == IPPROTO_TCP) {
> diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> index 31baba2..fde21d1 100644
> --- a/net/core/sysctl_net_core.c
> +++ b/net/core/sysctl_net_core.c
> @@ -321,6 +321,15 @@ static struct ctl_table net_core_table[] = {
>                 .mode           = 0644,
>                 .proc_handler   = proc_dointvec
>         },
> +       {
> +               .procname       = "tstamp_allow_data",
> +               .data           = &sysctl_tstamp_allow_data,
> +               .maxlen         = sizeof(int),
> +               .mode           = 0644,
> +               .proc_handler   = proc_dointvec_minmax,
> +               .extra1         = &zero,
> +               .extra2         = &one
> +       },
>  #ifdef CONFIG_RPS
>         {
>                 .procname       = "rps_sock_flow_entries",
> --
> 2.2.0.rc0.207.ga3a616c
>

^ permalink raw reply

* [PATCH] act_connmark: fix dependencies better
From: Arnd Bergmann @ 2015-01-28 16:30 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Graf, Felix Fietkau, Jamal Hadi Salim, David S. Miller

NET_ACT_CONNMARK fails to build if NF_CONNTRACK_MARK is disabled,
and d7924450e14ea4 ("act_connmark: Add missing dependency on
NF_CONNTRACK_MARK") fixed that case, but missed the cased where
NF_CONNTRACK is a loadable module.

This adds the second dependency to ensure that NET_ACT_CONNMARK
can only be built-in if NF_CONNTRACK is also part of the kernel
rather than a loadable module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 5fd81031f8f6..2264b491383a 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -713,7 +713,7 @@ config NET_ACT_BPF
 config NET_ACT_CONNMARK
         tristate "Netfilter Connection Mark Retriever"
         depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES
-        depends on NF_CONNTRACK_MARK
+        depends on NF_CONNTRACK && NF_CONNTRACK_MARK
         ---help---
 	  Say Y here to allow retrieving of conn mark
 

^ permalink raw reply related

* [PATCH net] tcp: ipv4: initialize unicast_sock sk_pacing_rate
From: Eric Dumazet @ 2015-01-28 13:47 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

When I added sk_pacing_rate field, I forgot to initialize its value
in the per cpu unicast_sock used in ip_send_unicast_reply()

This means that for sch_fq users, RST packets, or ACK packets sent
on behalf of TIME_WAIT sockets might be sent to slowly or even dropped
once we reach the per flow limit.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 95bd09eb2750 ("tcp: TSO packets automatic sizing")
---
 net/ipv4/ip_output.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index b50861b22b6bea036b1a99ddf141d7ed2d6cf6cd..38a20a9cca1af327618c816e0695e92e8e152bb5 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1517,6 +1517,7 @@ static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
 		.sk_wmem_alloc	= ATOMIC_INIT(1),
 		.sk_allocation	= GFP_ATOMIC,
 		.sk_flags	= (1UL << SOCK_USE_WRITE_QUEUE),
+		.sk_pacing_rate = ~0U,
 	},
 	.pmtudisc	= IP_PMTUDISC_WANT,
 	.uc_ttl		= -1,

^ permalink raw reply related

* [PATCH bluetooth-next v2] ieee802154: fix netns settings
From: Nicolas Dichtel @ 2015-01-28 14:58 UTC (permalink / raw)
  To: alex.aring; +Cc: netdev, davem, Nicolas Dichtel

6LoWPAN currently doesn't supports x-netns and works only in init_net.

With this patch, we ensure that:
 - the wpan interface cannot be moved to another netns;
 - the 6lowpan interface cannot be moved to another netns;
 - the wpan interface is in the same netns than the 6lowpan interface;
 - the 6lowpan interface is in init_net.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---

Note: only compile tested.

v2: update patch title
    rebase the patch on bluetooth-next
    update flag features in cfg802154_netdev_notifier_call

 net/ieee802154/6lowpan/core.c | 6 ++++--
 net/ieee802154/core.c         | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index 055fbb71ba6f..dfd3c6007f60 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -126,6 +126,7 @@ static void lowpan_setup(struct net_device *dev)
 	dev->header_ops		= &lowpan_header_ops;
 	dev->ml_priv		= &lowpan_mlme;
 	dev->destructor		= free_netdev;
+	dev->features		|= NETIF_F_NETNS_LOCAL;
 }
 
 static int lowpan_validate(struct nlattr *tb[], struct nlattr *data[])
@@ -148,10 +149,11 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
 
 	pr_debug("adding new link\n");
 
-	if (!tb[IFLA_LINK])
+	if (!tb[IFLA_LINK] ||
+	    !net_eq(dev_net(dev), &init_net))
 		return -EINVAL;
 	/* find and hold real wpan device */
-	real_dev = dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK]));
+	real_dev = dev_get_by_index(dev_net(dev), nla_get_u32(tb[IFLA_LINK]));
 	if (!real_dev)
 		return -ENODEV;
 	if (real_dev->type != ARPHRD_IEEE802154) {
diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index 18bc7e738507..888d0991c761 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -225,6 +225,7 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb,
 	switch (state) {
 		/* TODO NETDEV_DEVTYPE */
 	case NETDEV_REGISTER:
+		dev->features |= NETIF_F_NETNS_LOCAL;
 		wpan_dev->identifier = ++rdev->wpan_dev_id;
 		list_add_rcu(&wpan_dev->list, &rdev->wpan_dev_list);
 		rdev->devlist_generation++;
-- 
2.2.2

^ permalink raw reply related

* [PATCH net-next] ipv6: tcp: tcp_v6_send_response() should give an owner to skb
From: Eric Dumazet @ 2015-01-28 13:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

RST packets and ACK packets sent on behalf of TIME_WAIT sockets
do not have a socket owner currently.

For sch_fq users, this means fq classifier has to fallback to packet
dissection and allocate one flow structure, while we generally send
a single packet. This is also an attack vector.

Note that ip6_xmit() correctly uses skb_set_owner_w() if skb needs
to be reallocated when head room is not big enough.

Simply use sock_wmalloc() instead of alloc_skb().

Note: This might increase false sharing on the ctl_sk, which is
shared by all cpus for a given network namespace. We might switch later
to a percpu socket as we do for IPv4.

Also use MAX_TCP_HEADER, as it makes the code shorter.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/tcp_ipv6.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 5d46832c6f72b89a278a3326918a3c8bff9afed4..cd4f7be3ecdd3628b07eb76bd2d4204753da23a6 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -809,12 +809,11 @@ static void tcp_v6_send_response(struct sock *sk, struct sk_buff *skb, u32 seq,
 		tot_len += TCPOLEN_MD5SIG_ALIGNED;
 #endif
 
-	buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
-			 GFP_ATOMIC);
-	if (buff == NULL)
+	buff = sock_wmalloc(ctl_sk, MAX_TCP_HEADER, 1, GFP_ATOMIC);
+	if (!buff)
 		return;
 
-	skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len);
+	skb_reserve(buff, MAX_TCP_HEADER);
 
 	t1 = (struct tcphdr *) skb_push(buff, tot_len);
 	skb_reset_transport_header(buff);

^ permalink raw reply related

* (unknown), 
From: kichawa23 @ 2015-01-28 14:48 UTC (permalink / raw)
  To: netdev, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

Hi,

My connection is randomly picked. Symptoms are the same as a year ago. [attachment: iwlwifi.log]

My kernel:
Linux x61s 3.18.2-2-ARCH #1 SMP PREEMPT Fri Jan 9 07:23:08 CET 2015 i686 GNU/Linux
Linux x61s 3.18.4-1-ARCH #1 SMP PREEMPT Tue Jan 27 21:01:00 CET 2015 i686 GNU/Linux

My wireless controller:
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)

Thank in advance

[-- Attachment #2: ifconfig_wlan0_up --]
[-- Type: text/plain, Size: 3080 bytes --]

[ 1091.345765]  [<c106c253>] kthread+0xb3/0xd0
[ 1091.345771]  [<c1479f41>] ret_from_kernel_thread+0x21/0x30
[ 1091.345774]  [<c106c1a0>] ? kthread_create_on_node+0x130/0x130
[ 1091.345778] ---[ end trace 0c7129685113d084 ]---
[ 1091.346187] cfg80211: Calling CRDA to update world regulatory domain
[ 1091.347266] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1092.152886] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1092.953799] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1110.559529] thinkpad_acpi: EC reports that Thermal Table has changed
[ 1110.647118] EXT4-fs (sda5): re-mounted. Opts: data=ordered,commit=600
[ 1111.251256] EXT4-fs (sda1): re-mounted. Opts: (null)
[ 1111.276142] EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600
[ 1111.357783] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.158623] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.959585] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1113.760724] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1114.561713] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1115.362895] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.164144] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.965222] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1117.766201] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1118.567244] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1196.936806] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1197.006316] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1202.642017] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1202.642029] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1202.642037] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1204.435533] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1206.246198] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1208.092369] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1209.903953] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1211.668061] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1220.413655] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1220.483357] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1226.118549] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1226.118558] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1226.118567] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1227.911330] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1229.721430] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1231.566820] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1233.377219] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1235.140838] iwlwifi 0000:02:00.0: Unable to initialize device.

[-- Attachment #3: tained --]
[-- Type: text/plain, Size: 6 bytes --]

4096

[-- Attachment #4: lsmod_modinfo --]
[-- Type: text/plain, Size: 7729 bytes --]

filename:       /lib/modules/3.18.4-1-ARCH/kernel/fs/fuse/fuse.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bnep/bnep.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/bluetooth/btusb.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bluetooth.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/coretemp.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/thermal/intel_powerclamp.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/kvm/kvm.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/joydev.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mousedev.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-hdmi.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/thinkpad_acpi.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32-pclmul.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32c-intel.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-conexant.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-generic.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/arc4.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aesni-intel.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/nvram.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_wdt.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_vendor_support.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-intel.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-controller.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-hwdep.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aes-i586.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-pcm.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/xts.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/leds/led-class.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/mac80211/mac80211.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/busses/i2c-i801.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/hwmon.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-timer.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/sound/soundcore.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/lrw.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mouse/psmouse.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm_tis.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/gf128mul.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/wireless/cfg80211.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/intel_ips.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/ablk_helper.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/thermal.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-agp.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/mfd/lpc_ich.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio_raw.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/crypto/cryptd.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/ptp/ptp.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/pps/pps_core.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/wmi.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/rfkill/rfkill.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/ac.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/pci/hotplug/shpchp.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei-me.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/battery.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/evdev.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/macintosh/mac_hid.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/net/sched/sch_fq_codel.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/cpufreq_powersave.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/acpi-cpufreq.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/processor.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/extramodules/vboxnetflt.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/extramodules/vboxdrv.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/fs/ext4/ext4.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/lib/crc16.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/fs/mbcache.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/fs/jbd2/jbd2.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/sd_mod.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid-generic.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/usbhid/usbhid.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/keyboard/atkbd.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/libps2.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/ahci.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libahci.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libata.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-pci.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-hcd.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/core/usbcore.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/common/usb-common.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/i8042.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/i915/i915.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/button.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-gtt.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/algos/i2c-algo-bit.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/video.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm_kms_helper.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/agpgart.ko.gz
filename:       /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/i2c-core.ko.gz

[-- Attachment #5: iwlwifi.log --]
[-- Type: text/plain, Size: 41675 bytes --]

[    2.240667] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    2.241652] ata1.00: configured for UDMA/100
[    2.242013] scsi 0:0:0:0: Direct-Access     ATA      WDC WD1600BEKT-6 1A03 PQ: 0 ANSI: 5
[    2.314986] hub 1-1:1.0: USB hub found
[    2.315167] hub 1-1:1.0: 6 ports detected
[    2.328133] hub 2-1:1.0: USB hub found
[    2.328242] hub 2-1:1.0: 8 ports detected
[    2.560325] ata2: SATA link down (SStatus 0 SControl 300)
[    2.580464] usb 1-1.1: new full-speed USB device number 3 using ehci-pci
[    2.593803] Switched to clocksource tsc
[    2.667065] hub 1-1.1:1.0: USB hub found
[    2.667195] hub 1-1.1:1.0: 3 ports detected
[    2.733763] usb 1-1.3: new full-speed USB device number 4 using ehci-pci
[    2.880123] ata5: SATA link down (SStatus 0 SControl 300)
[    2.933614] usb 1-1.1.1: new full-speed USB device number 5 using ehci-pci
[    3.021913] hidraw: raw HID events driver (C) Jiri Kosina
[    3.023672] usbcore: registered new interface driver usbhid
[    3.023677] usbhid: USB HID core driver
[    3.024340] input: HID 0a5c:4502 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/0003:0A5C:4502.0001/input/input6
[    3.024425] hid-generic 0003:0A5C:4502.0001: input,hidraw0: USB HID v1.11 Keyboard [HID 0a5c:4502] on usb-0000:00:1a.0-1.1.1/input0
[    3.086962] usb 1-1.1.2: new full-speed USB device number 6 using ehci-pci
[    3.176844] input: HID 0a5c:4503 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:0A5C:4503.0002/input/input7
[    3.176968] hid-generic 0003:0A5C:4503.0002: input,hidraw1: USB HID v1.11 Mouse [HID 0a5c:4503] on usb-0000:00:1a.0-1.1.2/input0
[    3.199924] ata6: SATA link down (SStatus 0 SControl 300)
[    3.204317] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[    3.204418] sd 0:0:0:0: [sda] Write Protect is off
[    3.204426] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.204471] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.243409] usb 1-1.1.3: new full-speed USB device number 7 using ehci-pci
[    3.256658]  sda: sda1 sda2 sda3 < sda5 sda6 >
[    3.257293] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.708516] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[    4.773097] random: nonblocking pool is initialized
[    4.788760] systemd[1]: RTC configured in localtime, applying delta of 60 minutes to system time.
[    6.009083] systemd[1]: [/usr/lib/systemd/system/mpd.service:17] Unknown lvalue 'ControlGroup' in section 'Service'
[    6.009110] systemd[1]: [/usr/lib/systemd/system/mpd.service:20] Unknown lvalue 'ControlGroupAttribute' in section 'Service'
[    6.466663] thinkpad_ec: thinkpad_ec 0.41 loaded.
[    6.469279] tp_smapi 0.41 loading...
[    6.469487] tp_smapi successfully loaded (smapi_port=0xb2).
[    6.566841] vboxdrv: Found 4 processor cores.
[    6.567257] vboxdrv: fAsync=0 offMin=0x3ea offMax=0x2588
[    6.567395] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
[    6.567397] vboxdrv: Successfully loaded version 4.3.20_OSE (interface 0x001a0008).
[    6.568897] EXT4-fs (sda5): re-mounted. Opts: (null)
[    9.856787] ACPI: Battery Slot [BAT0] (battery present)
[    9.909078] agpgart: Erk, registering with no pci_dev!
[    9.909083] agpgart-intel: probe of 0000:00:00.0 failed with error -22
[    9.923847] tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
[    9.927300] pps_core: LinuxPPS API ver. 1 registered
[    9.927302] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    9.941411] PTP clock support registered
[    9.972841] tpm_tis 00:05: TPM is disabled/deactivated (0x6)
[   10.045646] ACPI Warning: SystemIO range 0x00001028-0x0000102f conflicts with OpRegion 0x00001000-0x0000107f (\_SB_.PCI0.LPC_.PMIO) (20140926/utaddress-258)
[   10.045652] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   10.045656] ACPI Warning: SystemIO range 0x000011c0-0x000011cf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[   10.045659] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   10.045660] ACPI Warning: SystemIO range 0x000011b0-0x000011bf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[   10.045662] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   10.045663] ACPI Warning: SystemIO range 0x00001180-0x000011af conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[   10.045666] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   10.045667] lpc_ich: Resource conflict(s) found affecting gpio_ich
[   10.058335] thermal LNXTHERM:00: registered as thermal_zone0
[   10.058339] ACPI: Thermal Zone [THM0] (60 C)
[   10.068941] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[   10.081236] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt
[   10.122734] intel ips 0000:00:1f.6: CPU TDP doesn't match expected value (found 25, expected 29)
[   10.123420] wmi: Mapper loaded
[   10.126066] intel ips 0000:00:1f.6: IPS driver initialized, MCP temp limit 90
[   10.134364] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[   10.134367] e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
[   10.134526] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[   10.134548] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[   10.310987] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) f0:de:f1:08:57:de
[   10.310995] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[   10.311040] e1000e 0000:00:19.0 eth0: MAC: 9, PHY: 10, PBA No: C5C0FF-0FF
[   10.311193] mei_me 0000:00:16.0: irq 27 for MSI/MSI-X
[   10.315956] ACPI: AC Adapter [AC] (on-line)
[   10.420470] cfg80211: Calling CRDA to update world regulatory domain
[   10.504483] Intel(R) Wireless WiFi driver for Linux, in-tree:
[   10.504486] Copyright(c) 2003- 2014 Intel Corporation
[   10.504652] iwlwifi 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[   10.504801] iwlwifi 0000:02:00.0: irq 28 for MSI/MSI-X
[   10.589711] Non-volatile memory driver v1.3
[   10.667220] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-6.ucode failed with error -2
[   10.667255] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-5.ucode failed with error -2
[   10.679529] iwlwifi 0000:02:00.0: loaded firmware version 9.221.4.1 build 25532 op_mode iwldvm
[   10.819241] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[   10.819245] thinkpad_acpi: http://ibm-acpi.sf.net/
[   10.819246] thinkpad_acpi: ThinkPad BIOS 6QET46WW (1.16 ), EC 6QHT28WW-1.09
[   10.819248] thinkpad_acpi: Lenovo ThinkPad X201, model 3680BR4
[   10.819694] thinkpad_acpi: detected a 16-level brightness capable ThinkPad
[   10.819868] thinkpad_acpi: radio switch found; radios are enabled
[   10.820047] thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
[   10.820059] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[   10.820060] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[   10.823954] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[   10.824030] thinkpad_acpi: Console audio control enabled, mode: override (read/write)
[   10.825218] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input9
[   10.848234] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
[   10.848238] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[   10.848240] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[   10.848242] iwlwifi 0000:02:00.0: Detected Intel(R) Centrino(R) Advanced-N 6200 AGN, REV=0x74
[   10.848392] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[   10.889301] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   10.907788] iTCO_vendor_support: vendor-support=0
[   10.913764] snd_hda_intel 0000:00:1b.0: irq 29 for MSI/MSI-X
[   10.993037] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[   10.993085] iTCO_wdt: Found a QM57 TCO device (Version=2, TCOBASE=0x1060)
[   10.993158] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[   11.048503] sound hdaudioC0D0: CX20585: BIOS auto-probing.
[   11.049003] sound hdaudioC0D0: autoconfig: line_outs=1 (0x1f/0x0/0x0/0x0/0x0) type:speaker
[   11.049006] sound hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   11.049007] sound hdaudioC0D0:    hp_outs=2 (0x1c/0x19/0x0/0x0/0x0)
[   11.049009] sound hdaudioC0D0:    mono: mono_out=0x0
[   11.049010] sound hdaudioC0D0:    inputs:
[   11.049012] sound hdaudioC0D0:      Internal Mic=0x23
[   11.049014] sound hdaudioC0D0:      Mic=0x1b
[   11.049015] sound hdaudioC0D0:      Dock Mic=0x1a
[   11.050092] sound hdaudioC0D0: Enable sync_write for stable communication
[   11.247477] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd047b3/0xb40000/0xa0000, board id: 71, fw id: 615624
[   11.247490] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[   11.300794] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input8
[   11.325149] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/hdaudioC0D0/input10
[   11.325557] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[   11.325647] input: HDA Intel MID Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[   11.325734] input: HDA Intel MID Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[   11.325815] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[   11.325899] input: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[   11.430883] mousedev: PS/2 mouse device common for all mice
[   11.718985] kvm: disabled by bios
[   11.735951] kvm: disabled by bios
[   12.032924] systemd-journald[144]: Received request to flush runtime journal from PID 1
[   13.513457] Adding 249000k swap on /dev/sda2.  Priority:-1 extents:1 across:249000k FS
[   14.084971] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[   14.254685] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   14.919322] Bluetooth: Core ver 2.19
[   14.919341] NET: Registered protocol family 31
[   14.919342] Bluetooth: HCI device and connection manager initialized
[   14.919350] Bluetooth: HCI socket layer initialized
[   14.919353] Bluetooth: L2CAP socket layer initialized
[   14.919359] Bluetooth: SCO socket layer initialized
[   14.976084] usbcore: registered new interface driver btusb
[   15.236769] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[   15.285941] psmouse serio2: hgpk: ID: 10 00 64
[   16.923655] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
[   17.188937] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input11
[   19.248504] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.248508] Bluetooth: BNEP filters: protocol multicast
[   19.248514] Bluetooth: BNEP socket layer initialized
[   22.488952] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[   22.589181] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[   22.589351] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   24.021487] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[   24.028356] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[   24.238338] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[   24.245153] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[   24.320319] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   26.332454] wlan0: authenticate with 00:25:9c:3d:11:92
[   26.333774] wlan0: send auth to 00:25:9c:3d:11:92 (try 1/3)
[   26.339122] wlan0: authenticated
[   26.339351] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[   26.339360] wlan0: waiting for beacon from 00:25:9c:3d:11:92
[   26.413651] wlan0: associate with 00:25:9c:3d:11:92 (try 1/3)
[   26.417375] wlan0: RX AssocResp from 00:25:9c:3d:11:92 (capab=0x411 status=0 aid=2)
[   26.427487] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   26.427671] wlan0: associated
[   54.181665] cfg80211: Calling CRDA to update world regulatory domain
[   90.496163] cfg80211: Calling CRDA to update world regulatory domain
[  124.726421] fuse init (API version 7.23)
[  163.182366] cfg80211: Calling CRDA to update world regulatory domain
[  549.484387] perf interrupt took too long (2523 > 2495), lowering kernel.perf_event_max_sample_rate to 50100
[ 1207.499667] perf interrupt took too long (4991 > 4960), lowering kernel.perf_event_max_sample_rate to 25200
[ 1536.295554] iwlwifi 0000:02:00.0: Error sending REPLY_TXFIFO_FLUSH: time out after 2000ms.
[ 1536.295561] iwlwifi 0000:02:00.0: Current CMD queue read_ptr 222 write_ptr 226
[ 1536.312697] ------------[ cut here ]------------
[ 1536.312716] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/pcie/trans.c:1269 iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]()
[ 1536.312718] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
[ 1536.312720] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1536.312771]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.312783] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G           O   3.18.2-2-ARCH #1
[ 1536.312785] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.312801] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.312803]  00000000 9454c866 00000000 ce1b1cbc c1474f33 ce1b1d00 ce1b1cf0 c10527f2
[ 1536.312808]  f84405d0 ce1b1d20 000009e2 f84405a4 000004f5 f8430f34 000004f5 f8430f34
[ 1536.312812]  f843ba80 ce1b1d58 f43aa000 ce1b1d0c c105284e 00000009 ce1b1d00 f84405d0
[ 1536.312816] Call Trace:
[ 1536.312825]  [<c1474f33>] dump_stack+0x48/0x69
[ 1536.312832]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.312837]  [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312840]  [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312843]  [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1536.312847]  [<f8430f34>] iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312852]  [<f842447c>] iwl_write_prph+0x2c/0x60 [iwlwifi]
[ 1536.312856]  [<f84244d6>] iwl_force_nmi+0x26/0x50 [iwlwifi]
[ 1536.312860]  [<f842fcc0>] iwl_trans_pcie_send_hcmd+0x5a0/0x620 [iwlwifi]
[ 1536.312865]  [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.312872]  [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.312876]  [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.312880]  [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.312884]  [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.312894]  [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.312904]  [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.312913]  [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.312924]  [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.312934]  [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.312939]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.312942]  [<c1067a63>] process_one_work+0x113/0x380
[ 1536.312945]  [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.312948]  [<c1067f59>] worker_thread+0x39/0x440
[ 1536.312951]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.312954]  [<c106c173>] kthread+0xb3/0xd0
[ 1536.312958]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.312960]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.312963] ---[ end trace a5b5252fd3fa22c1 ]---
[ 1536.312993] iwlwifi 0000:02:00.0: Loaded firmware version: 9.221.4.1 build 25532
[ 1536.330191] iwlwifi 0000:02:00.0: Start IWL Error Log Dump:
[ 1536.330198] iwlwifi 0000:02:00.0: Status: 0x0000004C, count: -197484544
[ 1536.330201] iwlwifi 0000:02:00.0: 0xCE1B1CBC | ADVANCED_SYSASSERT          
[ 1536.330202] iwlwifi 0000:02:00.0: 0xC10564D3 | uPc
[ 1536.330204] iwlwifi 0000:02:00.0: 0xCE1B1CC8 | branchlink1
[ 1536.330206] iwlwifi 0000:02:00.0: 0xC147AD98 | branchlink2
[ 1536.330208] iwlwifi 0000:02:00.0: 0x9454C866 | interruptlink1
[ 1536.330210] iwlwifi 0000:02:00.0: 0xF5303B20 | interruptlink2
[ 1536.330212] iwlwifi 0000:02:00.0: 0xC1538797 | data1
[ 1536.330213] iwlwifi 0000:02:00.0: 0xCE1B1E08 | data2
[ 1536.330216] iwlwifi 0000:02:00.0: 0xCE1B1CE0 | line
[ 1536.330217] iwlwifi 0000:02:00.0: 0xC131754F | beacon time
[ 1536.330219] iwlwifi 0000:02:00.0: 0xCE1B1CF4 | tsf low
[ 1536.330221] iwlwifi 0000:02:00.0: 0xCE1B1D10 | tsf hi
[ 1536.330223] iwlwifi 0000:02:00.0: 0xC13175AA | time gp1
[ 1536.330224] iwlwifi 0000:02:00.0: 0x00000003 | time gp2
[ 1536.330226] iwlwifi 0000:02:00.0: 0xF533E064 | time gp3
[ 1536.330228] iwlwifi 0000:02:00.0: 0xC156A6F8 | uCode version
[ 1536.330230] iwlwifi 0000:02:00.0: 0xF843E569 | hw version
[ 1536.330231] iwlwifi 0000:02:00.0: 0xF5303B20 | board version
[ 1536.330233] iwlwifi 0000:02:00.0: 0xF2C49084 | hcmd
[ 1536.330235] iwlwifi 0000:02:00.0: 0xCE1B1D40 | isr0
[ 1536.330237] iwlwifi 0000:02:00.0: 0xCE1B1D28 | isr1
[ 1536.330239] iwlwifi 0000:02:00.0: 0xC1317768 | isr2
[ 1536.330241] iwlwifi 0000:02:00.0: 0xCE1B1D38 | isr3
[ 1536.330242] iwlwifi 0000:02:00.0: 0xF843E2DA | isr4
[ 1536.330244] iwlwifi 0000:02:00.0: 0xCE1B1D18 | isr_pref
[ 1536.330246] iwlwifi 0000:02:00.0: 0x9454C866 | wait_event
[ 1536.330248] iwlwifi 0000:02:00.0: 0xCE1B1D54 | l2p_control
[ 1536.330250] iwlwifi 0000:02:00.0: 0xF8426340 | l2p_duration
[ 1536.330252] iwlwifi 0000:02:00.0: 0xF533E064 | l2p_mhvalid
[ 1536.330253] iwlwifi 0000:02:00.0: 0xF843E2DA | l2p_addr_match
[ 1536.330255] iwlwifi 0000:02:00.0: 0xCE1B1D40 | lmpm_pmg_sel
[ 1536.330256] iwlwifi 0000:02:00.0: 0xCE1B1D6C | timestamp
[ 1536.330258] iwlwifi 0000:02:00.0: 0xF895A0B1 | flow_handler
[ 1536.347419] ------------[ cut here ]------------
[ 1536.347434] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]()
[ 1536.347436] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1536.347476]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.347486] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1536.347487] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.347499] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.347501]  00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.347504]  c15468cc 00000000 000009e2 f895c488 0000037b f893c867 0000037b f893c867
[ 1536.347507]  00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.347510] Call Trace:
[ 1536.347520]  [<c1474f33>] dump_stack+0x48/0x69
[ 1536.347526]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.347530]  [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347533]  [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347536]  [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.347539]  [<f893c867>] iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347544]  [<c1317768>] ? dev_err+0x38/0x50
[ 1536.347548]  [<f8426340>] ? __iwl_err+0xd0/0xe0 [iwlwifi]
[ 1536.347551]  [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.347555]  [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.347560]  [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.347565]  [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.347569]  [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.347573]  [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.347576]  [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.347584]  [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.347592]  [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.347600]  [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.347607]  [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.347615]  [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.347619]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.347621]  [<c1067a63>] process_one_work+0x113/0x380
[ 1536.347623]  [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.347625]  [<c1067f59>] worker_thread+0x39/0x440
[ 1536.347627]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.347629]  [<c106c173>] kthread+0xb3/0xd0
[ 1536.347632]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.347634]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.347635] ---[ end trace a5b5252fd3fa22c2 ]---
[ 1536.364779] ------------[ cut here ]------------
[ 1536.364797] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]()
[ 1536.364798] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1536.364838]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.364848] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1536.364850] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.364862] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.364864]  00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.364867]  c15468cc 00000000 000009e2 f895c488 0000037b f893c827 0000037b f893c827
[ 1536.364870]  00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.364874] Call Trace:
[ 1536.364882]  [<c1474f33>] dump_stack+0x48/0x69
[ 1536.364887]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.364891]  [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364894]  [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364897]  [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.364900]  [<f893c827>] iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364904]  [<c1317768>] ? dev_err+0x38/0x50
[ 1536.364908]  [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.364912]  [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.364917]  [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.364922]  [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.364926]  [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.364929]  [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.364933]  [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.364941]  [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.364949]  [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.364956]  [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.364964]  [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.364972]  [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.364975]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.364977]  [<c1067a63>] process_one_work+0x113/0x380
[ 1536.364979]  [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.364981]  [<c1067f59>] worker_thread+0x39/0x440
[ 1536.364983]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.364985]  [<c106c173>] kthread+0xb3/0xd0
[ 1536.364988]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.364989]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.364991] ---[ end trace a5b5252fd3fa22c3 ]---
[ 1536.382167] ------------[ cut here ]------------
[ 1536.382186] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]()
[ 1536.382187] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1536.382227]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.382237] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1536.382239] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.382251] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.382253]  00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.382256]  c15468cc 00000000 000009e2 f895c488 0000037b f893c847 0000037b f893c847
[ 1536.382259]  00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.382263] Call Trace:
[ 1536.382271]  [<c1474f33>] dump_stack+0x48/0x69
[ 1536.382277]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.382281]  [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382284]  [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382286]  [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.382289]  [<f893c847>] iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382294]  [<c1317768>] ? dev_err+0x38/0x50
[ 1536.382298]  [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.382303]  [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.382307]  [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.382312]  [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.382316]  [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.382319]  [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.382323]  [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.382331]  [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.382339]  [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.382346]  [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.382354]  [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.382362]  [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.382365]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.382367]  [<c1067a63>] process_one_work+0x113/0x380
[ 1536.382369]  [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.382371]  [<c1067f59>] worker_thread+0x39/0x440
[ 1536.382373]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.382375]  [<c106c173>] kthread+0xb3/0xd0
[ 1536.382378]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.382380]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.382382] ---[ end trace a5b5252fd3fa22c4 ]---
[ 1536.399578] ------------[ cut here ]------------
[ 1536.399596] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]()
[ 1536.399598] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1536.399638]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.399648] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1536.399649] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.399662] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.399664]  00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.399667]  c15468cc 00000000 000009e2 f895c488 0000037b f893c80c 0000037b f893c80c
[ 1536.399670]  a5a5a5a5 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.399673] Call Trace:
[ 1536.399681]  [<c1474f33>] dump_stack+0x48/0x69
[ 1536.399686]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.399690]  [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399693]  [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399695]  [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.399698]  [<f893c80c>] iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399703]  [<c1317768>] ? dev_err+0x38/0x50
[ 1536.399707]  [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.399712]  [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.399716]  [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.399721]  [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.399725]  [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.399729]  [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.399732]  [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.399741]  [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.399749]  [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.399756]  [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.399764]  [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.399771]  [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.399775]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.399777]  [<c1067a63>] process_one_work+0x113/0x380
[ 1536.399780]  [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.399782]  [<c1067f59>] worker_thread+0x39/0x440
[ 1536.399784]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.399786]  [<c106c173>] kthread+0xb3/0xd0
[ 1536.399789]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.399791]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.399792] ---[ end trace a5b5252fd3fa22c5 ]---
[ 1536.399797] iwlwifi 0000:02:00.0: Log capacity -1515870811 is bogus, limit to 512 entries
[ 1536.399800] iwlwifi 0000:02:00.0: Log write index -1515870811 is bogus, limit to 512
[ 1536.399802] iwlwifi 0000:02:00.0: Start IWL Event Log Dump: display last 20 entries
[ 1536.416951] iwlwifi 0000:02:00.0: flush request fail
[ 1538.194457] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1539.990896] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1541.827348] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1543.625376] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1545.380698] ieee80211 phy0: Hardware restart was requested
[ 1545.380786] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 1e
[ 1545.380791] iwlwifi 0000:02:00.0: flush request fail
[ 1545.397083] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 20
[ 1545.397095] wlan0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-5)
[ 1545.397218] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1545.466236] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1551.100485] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1551.100495] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1551.100504] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1552.878783] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1554.675102] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1556.505200] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1558.301091] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1558.301103] sched: RT throttling activated
[ 1560.060161] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1560.060170] ------------[ cut here ]------------
[ 1560.060197] WARNING: CPU: 2 PID: 149 at net/mac80211/util.c:1686 ieee80211_reconfig+0x12f2/0x16a0 [mac80211]()
[ 1560.060200] Hardware became unavailable during restart.
[ 1560.060202] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1560.060273]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060288] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1560.060291] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060303] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060305]  00000000 24cb9ba5 00000000 f4bf1e40 c1474f33 f4bf1e84 f4bf1e74 c10527f2
[ 1560.060312]  f920951c f4bf1ea4 00000095 f920b4e9 00000696 f91d2512 00000696 f91d2512
[ 1560.060318]  f2c48fe4 ffffff92 f4ad1900 f4bf1e90 c105284e 00000009 f4bf1e84 f920951c
[ 1560.060325] Call Trace:
[ 1560.060337]  [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060345]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060362]  [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060378]  [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060383]  [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060399]  [<f91d2512>] ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060404]  [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060415]  [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060421]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060425]  [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060429]  [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060433]  [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060437]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060441]  [<c106c173>] kthread+0xb3/0xd0
[ 1560.060447]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060450]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060454] ---[ end trace a5b5252fd3fa22c6 ]---
[ 1560.060533] ------------[ cut here ]------------
[ 1560.060551] WARNING: CPU: 2 PID: 149 at net/mac80211/driver-ops.h:12 ieee80211_do_stop+0x872/0x890 [mac80211]()
[ 1560.060553] wlan0:  Failed check-sdata-in-driver check, flags: 0x4
[ 1560.060555] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci_pci ehci_hcd
[ 1560.060615]  usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060627] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G        W  O   3.18.2-2-ARCH #1
[ 1560.060630] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060640] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060642]  00000000 24cb9ba5 00000000 f4bf1d54 c1474f33 f4bf1d98 f4bf1d88 c10527f2
[ 1560.060648]  f9208e60 f4bf1db8 00000095 f920b267 0000000c f91b8e82 0000000c f91b8e82
[ 1560.060655]  f2c48cd8 00000000 f40dbcf8 f4bf1da4 c105284e 00000009 f4bf1d98 f9208e60
[ 1560.060661] Call Trace:
[ 1560.060667]  [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060672]  [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060687]  [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060701]  [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060705]  [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060720]  [<f91b8e82>] ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060727]  [<c13b8699>] ? dev_deactivate_many+0x1a9/0x1f0
[ 1560.060741]  [<f91b8eb7>] ieee80211_stop+0x17/0x20 [mac80211]
[ 1560.060748]  [<c1395059>] __dev_close_many+0x79/0xe0
[ 1560.060752]  [<c139512d>] dev_close_many+0x6d/0xf0
[ 1560.060757]  [<c1398c90>] dev_close.part.77+0x30/0x50
[ 1560.060761]  [<c1398cc6>] dev_close+0x16/0x20
[ 1560.060772]  [<f85627b5>] cfg80211_shutdown_all_interfaces+0x45/0xb0 [cfg80211]
[ 1560.060776]  [<c105284e>] ? warn_slowpath_fmt+0x3e/0x60
[ 1560.060793]  [<f91d14ec>] ieee80211_reconfig+0x2cc/0x16a0 [mac80211]
[ 1560.060798]  [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060809]  [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060813]  [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060817]  [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060821]  [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060825]  [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060829]  [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060832]  [<c106c173>] kthread+0xb3/0xd0
[ 1560.060837]  [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060840]  [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060843] ---[ end trace a5b5252fd3fa22c7 ]---
[ 1560.061547] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1560.062625] cfg80211: Calling CRDA to update world regulatory domain

^ permalink raw reply

* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Arnd Bergmann @ 2015-01-28 21:03 UTC (permalink / raw)
  To: Murali Karicheri; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <54C94A0D.9050505@ti.com>

On Wednesday 28 January 2015 15:43:57 Murali Karicheri wrote:
> > this. Hope I am on the right track.
> 
> Reproduced this. Following errors seen when building the modules.
> 
>    LD [M]  drivers/net/ethernet/ti/keystone_netcp.o
> drivers/net/ethernet/ti/netcp_ethss.o: In function `init_module':
> netcp_ethss.c:(.init.text+0x0): multiple definition of `init_module'
> drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.init.text+0x0): 
> first defined here
> drivers/net/ethernet/ti/netcp_ethss.o: In function `cleanup_module':
> netcp_ethss.c:(.exit.text+0x0): multiple definition of `cleanup_module'
> drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.exit.text+0x0): 
> first defined here
> make[4]: *** [drivers/net/ethernet/ti/keystone_netcp.o] Error 1
>
> BTW, I had to disable cpsw_ale.c to get to build keystone NetCP. I am 
> assuming someone from TI is addressing this.
> 
> drivers/net/ethernet/ti/cpsw_ale.c: In function ‘cpsw_ale_start’:
> drivers/net/ethernet/ti/cpsw_ale.c:759:2: error: ‘KBUILD_MODNAME’ 
> undeclared (first use in this function)
> drivers/net/ethernet/ti/cpsw_ale.c:759:2: note: each undeclared 
> identifier is reported only once for each function it appears in

I think both problems are nontrivial to fix. The first one is obviously
that there are multiple init_module functions in one module. You have
to either split the driver into multiple loadable modules with at most
one init_module/cleanup_module pair each, or call one of the functions
from the other one in the right order.

The second problem is where I got stuck myself: cpsw_ale.c (also cpts.c)
is getting linked into both modules, which is not allowed: It is
impossible for the kernel to compile these if one driver is a module
and the other one is not, and any use of KBUILD_MODNAME fails because
it is unclear what the modname is if the file is compiled once to
be linked into two drivers.

	Arnd

^ permalink raw reply

* Re: cxgb4:  CONFIG_CXGB4_DCB?
From: Paul Bolle @ 2015-01-28 21:35 UTC (permalink / raw)
  To: Hariprasad S; +Cc: Valentin Rothberg, netdev, linux-kernel
In-Reply-To: <1422431914.5666.7.camel@x220>

[resend because netdev and linux-kernel were down the first time.]

On Wed, 2015-01-28 at 08:58 +0100, Paul Bolle wrote:
> Your commit dc9daab226aa ("cxgb4: Added support in debugfs to dump
> sge_qinfo") is included in today's linux-next (ie, next-20150128). I
> noticed because a script I use to check linux-next spotted a problem
> with it.
> 
> It added a preprocessor check for CONFIG_CXGB4_DCB. There's no Kconfig
> symbol CXGB4_DCB. I guess a check for CONFIG_CHELSIO_T4_DCB was actually
> intended.
> 
> Thanks,
> 
> 
> Paul Bolle

^ permalink raw reply

* [PATCH 3.13.y-ckt 017/139] xen-netfront: Fix handling packets on compound pages with skb_linearize
From: Kamal Mostafa @ 2015-01-28 22:19 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wei Liu, Ian Campbell, netdev, Kamal Mostafa, Stefan Bader,
	Paul Durrant, Zoltan Kiss, xen-devel, David S. Miller
In-Reply-To: <1422483682-15393-1-git-send-email-kamal@canonical.com>

3.13.11-ckt15 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Zoltan Kiss <zoltan.kiss@citrix.com>

commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d upstream.

There is a long known problem with the netfront/netback interface: if the guest
tries to send a packet which constitues more than MAX_SKB_FRAGS + 1 ring slots,
it gets dropped. The reason is that netback maps these slots to a frag in the
frags array, which is limited by size. Having so many slots can occur since
compound pages were introduced, as the ring protocol slice them up into
individual (non-compound) page aligned slots. The theoretical worst case
scenario looks like this (note, skbs are limited to 64 Kb here):
linear buffer: at most PAGE_SIZE - 17 * 2 bytes, overlapping page boundary,
using 2 slots
first 15 frags: 1 + PAGE_SIZE + 1 bytes long, first and last bytes are at the
end and the beginning of a page, therefore they use 3 * 15 = 45 slots
last 2 frags: 1 + 1 bytes, overlapping page boundary, 2 * 2 = 4 slots
Although I don't think this 51 slots skb can really happen, we need a solution
which can deal with every scenario. In real life there is only a few slots
overdue, but usually it causes the TCP stream to be blocked, as the retry will
most likely have the same buffer layout.
This patch solves this problem by linearizing the packet. This is not the
fastest way, and it can fail much easier as it tries to allocate a big linear
area for the whole packet, but probably easier by an order of magnitude than
anything else. Probably this code path is not touched very frequently anyway.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: David S. Miller <davem@davemloft.net>
BugLink: http://bugs.launchpad.net/bugs/1317811
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/xen-netfront.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index d58830b..a3ed8de 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -568,9 +568,10 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	slots = DIV_ROUND_UP(offset + len, PAGE_SIZE) +
 		xennet_count_skb_frag_slots(skb);
 	if (unlikely(slots > MAX_SKB_FRAGS + 1)) {
-		net_alert_ratelimited(
-			"xennet: skb rides the rocket: %d slots\n", slots);
-		goto drop;
+		net_dbg_ratelimited("xennet: skb rides the rocket: %d slots, %d bytes\n",
+				    slots, skb->len);
+		if (skb_linearize(skb))
+			goto drop;
 	}
 
 	spin_lock_irqsave(&np->tx_lock, flags);
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 22:40 UTC (permalink / raw)
  To: Arnd Bergmann, Balbi, Felipe, mugunthanvnm
  Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <20343006.1NmdQEM9nn@wuerfel>

+ Felipe, Mugunthan for commenting on TI_CPSW, ALE.

On 01/28/2015 04:03 PM, Arnd Bergmann wrote:
> On Wednesday 28 January 2015 15:43:57 Murali Karicheri wrote:
>>> this. Hope I am on the right track.
>>
>> Reproduced this. Following errors seen when building the modules.
>>
>>     LD [M]  drivers/net/ethernet/ti/keystone_netcp.o
>> drivers/net/ethernet/ti/netcp_ethss.o: In function `init_module':
>> netcp_ethss.c:(.init.text+0x0): multiple definition of `init_module'
>> drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.init.text+0x0):
>> first defined here
>> drivers/net/ethernet/ti/netcp_ethss.o: In function `cleanup_module':
>> netcp_ethss.c:(.exit.text+0x0): multiple definition of `cleanup_module'
>> drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.exit.text+0x0):
>> first defined here
>> make[4]: *** [drivers/net/ethernet/ti/keystone_netcp.o] Error 1
>>
>> BTW, I had to disable cpsw_ale.c to get to build keystone NetCP. I am
>> assuming someone from TI is addressing this.
>>
>> drivers/net/ethernet/ti/cpsw_ale.c: In function ‘cpsw_ale_start’:
>> drivers/net/ethernet/ti/cpsw_ale.c:759:2: error: ‘KBUILD_MODNAME’
>> undeclared (first use in this function)
>> drivers/net/ethernet/ti/cpsw_ale.c:759:2: note: each undeclared
>> identifier is reported only once for each function it appears in
>
> I think both problems are nontrivial to fix. The first one is obviously
> that there are multiple init_module functions in one module. You have
> to either split the driver into multiple loadable modules with at most
> one init_module/cleanup_module pair each, or call one of the functions
> from the other one in the right order.
I have a version that is building now with out issues. I had to make 
several modifications.

1. export functions from drivers/soc/ti/knav* that are used by the netcp 
driver. I will be sending a patch for this soon.

2. Convert netcp_ethss.o to a module and add Kconfig for the same

  config TI_KEYSTONE_NETCP
-       tristate "TI Keystone NETCP Ethernet subsystem Support"
+       tristate "TI Keystone NETCP Core Support"
+       select TI_CPSW_ALE
         depends on OF
         depends on KEYSTONE_NAVIGATOR_DMA && KEYSTONE_NAVIGATOR_QMSS
         ---help---
-         This driver supports TI's Keystone NETCP Ethernet subsystem.
+         This driver supports TI's Keystone NETCP Core.
+
+         To compile this driver as a module, choose M here: the module
+         will be called keystone_netcp.
+
+config TI_KEYSTONE_NETCP_ETHSS
+       depends on TI_KEYSTONE_NETCP
+       tristate "TI Keystone NETCP Ethernet subsystem Support"
+       ---help---


And Makefile to change as

diff --git a/drivers/net/ethernet/ti/Makefile 
b/drivers/net/ethernet/ti/Makefile
index 0a9813b..1dbb8b5 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -8,9 +8,13 @@ obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
  obj-$(CONFIG_TI_DAVINCI_MDIO) += davinci_mdio.o
  obj-$(CONFIG_TI_DAVINCI_CPDMA) += davinci_cpdma.o
  obj-$(CONFIG_TI_CPSW_PHY_SEL) += cpsw-phy-sel.o
  obj-$(CONFIG_TI_CPSW) += ti_cpsw.o
  ti_cpsw-y := cpsw_ale.o cpsw.o cpts.o

  obj-$(CONFIG_TI_KEYSTONE_NETCP) += keystone_netcp.o
-keystone_netcp-y := netcp_core.o netcp_ethss.o netcp_sgmii.o \
-                       netcp_xgbepcsr.o cpsw_ale.o
+keystone_netcp-y := netcp_core.o
+
+obj-$(CONFIG_TI_KEYSTONE_NETCP_ETHSS) += keystone_netcp_ethss.o
+keystone_netcp_ethss-y := netcp_ethss.o netcp_sgmii.o netcp_xgbepcsr.o \
+               cpsw_ale.o

3. export some of the functions in netcp_core.c to support building 
keystone_netcp_ethss as module.

>
> The second problem is where I got stuck myself: cpsw_ale.c (also cpts.c)
> is getting linked into both modules, which is not allowed: It is
> impossible for the kernel to compile these if one driver is a module
> and the other one is not, and any use of KBUILD_MODNAME fails because
> it is unclear what the modname is if the file is compiled once to
> be linked into two drivers.

I am still looking into this. Both Keystone and TI CPSW driver would 
need to use cpsw_ale.o and cpts.o (currently not used, but will need 
this later). Not found a solution yet.

Murali
>
> 	Arnd


-- 
Murali Karicheri
Linux Kernel, Texas Instruments

^ permalink raw reply related

* [RFC] NFC: PN544: Supply the right length to skb_trim
From: Robert Dolca @ 2015-01-28 23:50 UTC (permalink / raw)
  To: linux-nfc, Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz
  Cc: linux-kernel, linux-wireless, netdev, David S. Miller,
	Berg Johannes, Clement Perrochaud, Robert Dolca

The 2nd parameter of skb_trim is the new length of the skb.

pn544_hci_i2c_remove_len_crc used the tailroom for the 2nd parameter so
the new length was 2 no metter how big the skb was.
Now the length is (skb->len - PN544_I2C_FRAME_TAILROOM)

Signed-off-by: Robert Dolca <robert.dolca@intel.com>
---
 drivers/nfc/pn544/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 58b9029..42e7b26 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -297,7 +297,7 @@ static void pn544_hci_i2c_add_len_crc(struct sk_buff *skb)
 static void pn544_hci_i2c_remove_len_crc(struct sk_buff *skb)
 {
 	skb_pull(skb, PN544_I2C_FRAME_HEADROOM);
-	skb_trim(skb, PN544_I2C_FRAME_TAILROOM);
+	skb_trim(skb, skb->len - PN544_I2C_FRAME_TAILROOM);
 }
 
 /*
@@ -411,8 +411,7 @@ static int pn544_hci_i2c_read(struct pn544_i2c_phy *phy, struct sk_buff **skb)
 		goto flush;
 	}
 
-	skb_pull(*skb, 1);
-	skb_trim(*skb, (*skb)->len - 2);
+	pn544_hci_i2c_remove_len_crc(*skb);
 
 	usleep_range(3000, 6000);
 
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH] Repair soft lockup with monitor mode of ath9k_htc card
From: Yuwei Zheng @ 2015-01-29  0:18 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: linux-kernel, ath9k-devel, linux-wireless, kvalo, ath9k-devel,
	netdev, Yuwei Zheng
In-Reply-To: <54CB6326.2070803@rempel-privat.de>

You mean tasklet_schedule ?
The normal tasklet does not support delayed schedule.

um, I will try normal timer or delayed workqueue later. 


On 五, 2015-01-30 at 11:55 +0100, Oleksij Rempel wrote:
> Am 29.01.2015 um 00:14 schrieb yuweizheng@139.com:
> > From: Yuwei Zheng <yuweizheng@139.com>
> > 
> > In the environment with heavy wifi traffic, set the ar9271 into monitor mode, will
> > trigger a deadloop panic.
> >  
> > The ath9k_hif_usb_rx_cb function excute on  the interrupt context, and ath9k_rx_tasklet excute
> > on the soft irq context. In other words, the ath9k_hif_usb_rx_cb have more chance to excute than
> > ath9k_rx_tasklet.  So in the worst condition,  the rx.rxbuf receive list is always full,
> > and the do {}while(true) loop will not be break. The kernel get a soft lockup panic. 
> 
> Please note, ath9k_htc is also used on HW where real hrtimer actually
> exist. It should behave differently and produce different load on the
> system. The overhead of setting up the hrtimers *may* not be worth it.
> Depending on the load, it may provide lots of avoidable interrupts.
> Did you tried to use simple tasklet_start?
> 
> > [59011.007210] BUG: soft lockup - CPU#0 stuck for 23s!
> > [kworker/0:0:30609]
> > [59011.030560] BUG: scheduling while atomic: kworker/0:0/30609/0x40010100
> > [59013.804486] BUG: scheduling while atomic: kworker/0:0/30609/0x40010100
> > [59013.858522] Kernel panic - not syncing: softlockup: hung tasks
> >  
> > [59014.038891] Exception stack(0xdf4bbc38 to 0xdf4bbc80)
> > [59014.046834] bc20:                                                       de57b950 60000113
> > [59014.059579] bc40: 00000000 bb32bb32 60000113 de57b948 de57b500 dc7bb440 df4bbcd0 00000000
> > [59014.072337] bc60: de57b950 60000113 df4bbcd0 df4bbc80 c04c259d c04c25a0 60000133 ffffffff
> > [59014.085233] [<c04c28db>] (__irq_svc+0x3b/0x5c) from [<c04c25a0>] (_raw_spin_unlock_irqrestore+0xc/0x10)
> > [59014.100437] [<c04c25a0>] (_raw_spin_unlock_irqrestore+0xc/0x10) from [<bf9c2089>] (ath9k_rx_tasklet+0x290/0x490 [ath9k_htc])
> > [59014.118267] [<bf9c2089>] (ath9k_rx_tasklet+0x290/0x490 [ath9k_htc]) from [<c0036d23>] (tasklet_action+0x3b/0x98)
> > [59014.134132] [<c0036d23>] (tasklet_action+0x3b/0x98) from [<c0036709>] (__do_softirq+0x99/0x16c)
> > [59014.147784] [<c0036709>] (__do_softirq+0x99/0x16c) from [<c00369f7>] (irq_exit+0x5b/0x5c)
> > [59014.160653] [<c00369f7>] (irq_exit+0x5b/0x5c) from [<c000cfc3>] (handle_IRQ+0x37/0x78)
> > [59014.173124] [<c000cfc3>] (handle_IRQ+0x37/0x78) from [<c00085df>] (omap3_intc_handle_irq+0x5f/0x68)
> > [59014.187225] [<c00085df>] (omap3_intc_handle_irq+0x5f/0x68) from [<c04c28db>](__irq_svc+0x3b/0x5c)
> >  
> > This bug can be see with low performance board, such as uniprocessor beagle bone board.
> >  
> >  
> > Signed-off-by: Yuwei Zheng <zhengyuwei@360.cn>
> > Signed-off-by: Yuwei Zheng <yuweizheng@139.com>
> > 
> > 
> > ---
> >  drivers/net/wireless/ath/ath9k/hif_usb.c       | 58 ++++++++++++++++++++++----
> >  drivers/net/wireless/ath/ath9k/hif_usb.h       |  5 +++
> >  drivers/net/wireless/ath/ath9k/htc.h           | 13 ++++++
> >  drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 49 ++++++++++++++++++++++
> >  drivers/net/wireless/ath/ath9k/htc_drv_txrx.c  | 26 ++++++++++++
> >  5 files changed, 144 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> > index 8e7153b..18c6f0e 100644
> > --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> > +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> > @@ -658,7 +658,6 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb)
> >  	default:
> >  		goto resubmit;
> >  	}
> > -
> >  	if (likely(urb->actual_length != 0)) {
> >  		skb_put(skb, urb->actual_length);
> >  		ath9k_hif_usb_rx_stream(hif_dev, skb);
> > @@ -667,12 +666,18 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb)
> >  resubmit:
> >  	skb_reset_tail_pointer(skb);
> >  	skb_trim(skb, 0);
> > -
> > -	usb_anchor_urb(urb, &hif_dev->rx_submitted);
> > -	ret = usb_submit_urb(urb, GFP_ATOMIC);
> > -	if (ret) {
> > -		usb_unanchor_urb(urb);
> > -		goto free;
> > +	if (atomic_read(&hif_dev->rx_urb_submit_delay) > 0) {
> > +		usb_anchor_urb(urb, &hif_dev->rx_delayed_submitted);
> > +		ret = tasklet_hrtimer_start(&hif_dev->rx_submit_timer,
> > +						ktime_set(0, atomic_read(&hif_dev->rx_urb_submit_delay)*1000),
> > +						HRTIMER_MODE_REL);
> > +	} else {
> > +		usb_anchor_urb(urb, &hif_dev->rx_submitted);
> > +		ret = usb_submit_urb(urb, GFP_ATOMIC);
> > +		if (ret) {
> > +			usb_unanchor_urb(urb);
> > +			goto free;
> > +		}
> >  	}
> >  
> >  	return;
> > @@ -818,9 +823,39 @@ err:
> >  	return -ENOMEM;
> >  }
> >  
> > +static enum hrtimer_restart rx_urb_submit_timer_handler(struct hrtimer *me)
> > +{
> > +	struct tasklet_hrtimer *thr =
> > +		container_of(me, struct tasklet_hrtimer, timer);
> > +	struct  hif_device_usb *hif_dev =
> > +		container_of(thr, struct hif_device_usb, rx_submit_timer);
> > +	struct urb *urb = NULL;
> > +	struct sk_buff *skb = NULL;
> > +	int ret;
> > +
> > +	while (true) {
> > +		urb = usb_get_from_anchor(&hif_dev->rx_delayed_submitted);
> > +		if (urb != NULL) {
> > +			skb = (struct sk_buff *)urb->context;
> > +			ret = usb_submit_urb(urb, GFP_ATOMIC);
> > +			if (ret != -EBUSY) {
> > +				usb_unanchor_urb(urb);
> > +				dev_kfree_skb_any(skb);
> > +				urb->context = NULL;
> > +			}
> > +		} else {
> > +			break;
> > +		}
> > +	}
> > +
> > +	return HRTIMER_NORESTART;
> > +}
> > +
> >  static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev)
> >  {
> >  	usb_kill_anchored_urbs(&hif_dev->rx_submitted);
> > +	usb_kill_anchored_urbs(&hif_dev->rx_delayed_submitted);
> > +	tasklet_hrtimer_cancel(&hif_dev->rx_submit_timer);
> >  }
> >  
> >  static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
> > @@ -830,6 +865,8 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
> >  	int i, ret;
> >  
> >  	init_usb_anchor(&hif_dev->rx_submitted);
> > +	init_usb_anchor(&hif_dev->rx_delayed_submitted);
> > +
> >  	spin_lock_init(&hif_dev->rx_lock);
> >  
> >  	for (i = 0; i < MAX_RX_URB_NUM; i++) {
> > @@ -871,6 +908,13 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
> >  		usb_free_urb(urb);
> >  	}
> >  
> > +	/* add for flow control*/
> > +	atomic_set(&hif_dev->rx_urb_submit_delay, 0);
> > +	tasklet_hrtimer_init(&hif_dev->rx_submit_timer,
> > +				rx_urb_submit_timer_handler,
> > +				CLOCK_MONOTONIC,
> > +				HRTIMER_MODE_REL);
> > +
> >  	return 0;
> >  
> >  err_submit:
> > diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
> > index 51496e7..56d6be8 100644
> > --- a/drivers/net/wireless/ath/ath9k/hif_usb.h
> > +++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
> > @@ -98,9 +98,14 @@ struct hif_device_usb {
> >  	struct hif_usb_tx tx;
> >  	struct usb_anchor regout_submitted;
> >  	struct usb_anchor rx_submitted;
> > +	struct usb_anchor rx_delayed_submitted; /* delayed submit anchor */
> >  	struct usb_anchor reg_in_submitted;
> >  	struct usb_anchor mgmt_submitted;
> >  	struct sk_buff *remain_skb;
> > +
> > +	struct tasklet_hrtimer  rx_submit_timer;/* delayed submit hrtimer */
> > +	atomic_t  rx_urb_submit_delay; /*us*/
> > +
> >  	const char *fw_name;
> >  	int rx_remain_len;
> >  	int rx_pkt_len;
> > diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> > index 9dde265..453d0a8 100644
> > --- a/drivers/net/wireless/ath/ath9k/htc.h
> > +++ b/drivers/net/wireless/ath/ath9k/htc.h
> > @@ -331,6 +331,10 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)
> >  
> >  #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
> >  
> > +#define TASKLETRX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.taskletrx_stats.c++)
> > +#define TASKLETRX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.taskletrx_stats.c += a)
> > +#define TASKLETRX_STAT_SET(c, a) (hif_dev->htc_handle->drv_priv->debug.taskletrx_stats.c = a)
> > +
> >  void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
> >  			   struct ath_rx_status *rs);
> >  
> > @@ -352,11 +356,20 @@ struct ath_skbrx_stats {
> >  	u32 skb_dropped;
> >  };
> >  
> > +struct ath_taskletrx_stats {
> > +	u32 taskletrx_looptimes;
> > +	u32 taskletrx_highwater;
> > +	u32 taskletrx_lowwater;
> > +	u32 taskletrx_watermark_triggered;
> > +	u32 taskletrx_urb_submit_delay;
> > +};
> > +
> >  struct ath9k_debug {
> >  	struct dentry *debugfs_phy;
> >  	struct ath_tx_stats tx_stats;
> >  	struct ath_rx_stats rx_stats;
> >  	struct ath_skbrx_stats skbrx_stats;
> > +	struct ath_taskletrx_stats taskletrx_stats;
> >  };
> >  
> >  void ath9k_htc_get_et_strings(struct ieee80211_hw *hw,
> > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> > index 8cef1ed..7c8322e 100644
> > --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> > @@ -286,6 +286,51 @@ static const struct file_operations fops_skb_rx = {
> >  	.llseek = default_llseek,
> >  };
> >  
> > +static ssize_t read_file_tasklet_rx(struct file *file, char __user *user_buf,
> > +				    size_t count, loff_t *ppos)
> > +{
> > +	struct ath9k_htc_priv *priv = file->private_data;
> > +	char *buf;
> > +	unsigned int len = 0, size = 1500;
> > +	ssize_t retval = 0;
> > +
> > +	buf = kzalloc(size, GFP_KERNEL);
> > +	if (buf == NULL)
> > +		return -ENOMEM;
> > +
> > +	len += scnprintf(buf + len, size - len,
> > +			"%20s : %10u\n", "Loop times",
> > +			priv->debug.taskletrx_stats.taskletrx_looptimes);
> > +	len += scnprintf(buf + len, size - len,
> > +			"%20s : %10u\n", "High watermark",
> > +			priv->debug.taskletrx_stats.taskletrx_highwater);
> > +	len += scnprintf(buf + len, size - len,
> > +			"%20s : %10u\n", "Low watermark",
> > +			priv->debug.taskletrx_stats.taskletrx_lowwater);
> > +
> > +	len += scnprintf(buf + len, size - len,
> > +			"%20s : %10u\n", "WM triggered",
> > +			priv->debug.taskletrx_stats.taskletrx_watermark_triggered);
> > +
> > +	len += scnprintf(buf + len, size - len,
> > +			"%20s : %10u\n", "URB delay",
> > +			priv->debug.taskletrx_stats.taskletrx_urb_submit_delay);
> > +	if (len > size)
> > +		len = size;
> > +
> > +	retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
> > +	kfree(buf);
> > +
> > +	return retval;
> > +}
> > +
> > +static const struct file_operations fops_tasklet_rx = {
> > +	.read = read_file_tasklet_rx,
> > +	.open = simple_open,
> > +	.owner = THIS_MODULE,
> > +	.llseek = default_llseek,
> > +};
> > +
> >  static ssize_t read_file_slot(struct file *file, char __user *user_buf,
> >  			      size_t count, loff_t *ppos)
> >  {
> > @@ -518,7 +563,11 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
> >  	debugfs_create_file("skb_rx", S_IRUSR, priv->debug.debugfs_phy,
> >  			    priv, &fops_skb_rx);
> >  
> > +	debugfs_create_file("tasklet_rx", S_IRUSR, priv->debug.debugfs_phy,
> > +			    priv, &fops_tasklet_rx);
> > +
> >  	ath9k_cmn_debug_recv(priv->debug.debugfs_phy, &priv->debug.rx_stats);
> > +
> >  	ath9k_cmn_debug_phy_err(priv->debug.debugfs_phy, &priv->debug.rx_stats);
> >  
> >  	debugfs_create_file("slot", S_IRUSR, priv->debug.debugfs_phy,
> > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> > index a0f58e2..f5e6217 100644
> > --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> > @@ -1061,7 +1061,28 @@ void ath9k_rx_tasklet(unsigned long data)
> >  	unsigned long flags;
> >  	struct ieee80211_hdr *hdr;
> >  
> > +	/* add for adaptive flow control*/
> > +	int looptimes = 0;
> > +	int highwatermark = ATH9K_HTC_RXBUF*3/4;
> > +	int lowwatermark = ATH9K_HTC_RXBUF/4;
> > +	unsigned int delay = 0;
> > +
> > +	struct htc_target *htc = priv->htc;
> > +	struct hif_device_usb *hif_dev = htc->hif_dev;
> > +
> > +	TASKLETRX_STAT_SET(taskletrx_highwater, highwatermark);
> > +	TASKLETRX_STAT_SET(taskletrx_lowwater, lowwatermark);
> > +
> >  	do {
> > +		looptimes++;
> > +		TASKLETRX_STAT_SET(taskletrx_looptimes, looptimes);
> > +		if (looptimes > highwatermark) {
> > +			delay = looptimes*10;
> > +			atomic_set(&hif_dev->rx_urb_submit_delay, delay);
> > +			TASKLETRX_STAT_INC(taskletrx_watermark_triggered);
> > +			TASKLETRX_STAT_SET(taskletrx_urb_submit_delay, delay);
> > +		}
> > +
> >  		spin_lock_irqsave(&priv->rx.rxbuflock, flags);
> >  		list_for_each_entry(tmp_buf, &priv->rx.rxbuf, list) {
> >  			if (tmp_buf->in_process) {
> > @@ -1072,6 +1093,11 @@ void ath9k_rx_tasklet(unsigned long data)
> >  
> >  		if (rxbuf == NULL) {
> >  			spin_unlock_irqrestore(&priv->rx.rxbuflock, flags);
> > +			if (looptimes < lowwatermark) {
> > +				atomic_set(&hif_dev->rx_urb_submit_delay, 0);
> > +				TASKLETRX_STAT_SET(taskletrx_urb_submit_delay, 0);
> > +			}
> > +
> >  			break;
> >  		}
> >  
> > 
> 
> 

^ permalink raw reply

* [PATCH net-next] openvswitch: Add support for checksums on UDP tunnels.
From: Jesse Gross @ 2015-01-29  0:32 UTC (permalink / raw)
  To: Pravin Shelar
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	David Miller

Currently, it isn't possible to request checksums on the outer UDP
header of tunnels - the TUNNEL_CSUM flag is ignored. This adds
support for requesting that UDP checksums be computed on transmit
and properly reported if they are present on receive.

Signed-off-by: Jesse Gross <jesse@nicira.com>
---
 include/net/geneve.h           | 2 +-
 net/ipv4/geneve.c              | 6 +++---
 net/openvswitch/vport-geneve.c | 2 +-
 net/openvswitch/vport-vxlan.c  | 7 +++++--
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/include/net/geneve.h b/include/net/geneve.h
index 03aa2ad..14fb8d3 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -90,7 +90,7 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
 		    struct sk_buff *skb, __be32 src, __be32 dst, __u8 tos,
 		    __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port,
 		    __be16 tun_flags, u8 vni[3], u8 opt_len, u8 *opt,
-		    bool xnet);
+		    bool csum, bool xnet);
 #endif /*ifdef CONFIG_INET */
 
 #endif /*ifdef__NET_GENEVE_H */
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index 93e5119..5a4828b 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -107,13 +107,13 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
 		    struct sk_buff *skb, __be32 src, __be32 dst, __u8 tos,
 		    __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port,
 		    __be16 tun_flags, u8 vni[3], u8 opt_len, u8 *opt,
-		    bool xnet)
+		    bool csum, bool xnet)
 {
 	struct genevehdr *gnvh;
 	int min_headroom;
 	int err;
 
-	skb = udp_tunnel_handle_offloads(skb, !gs->sock->sk->sk_no_check_tx);
+	skb = udp_tunnel_handle_offloads(skb, csum);
 	if (IS_ERR(skb))
 		return PTR_ERR(skb);
 
@@ -138,7 +138,7 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
 
 	return udp_tunnel_xmit_skb(rt, skb, src, dst,
 				   tos, ttl, df, src_port, dst_port, xnet,
-				   gs->sock->sk->sk_no_check_tx);
+				   !csum);
 }
 EXPORT_SYMBOL_GPL(geneve_xmit_skb);
 
diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
index 7ca3d45..bf02fd5 100644
--- a/net/openvswitch/vport-geneve.c
+++ b/net/openvswitch/vport-geneve.c
@@ -212,7 +212,7 @@ static int geneve_tnl_send(struct vport *vport, struct sk_buff *skb)
 			      tun_key->ipv4_dst, tun_key->ipv4_tos,
 			      tun_key->ipv4_ttl, df, sport, dport,
 			      tun_key->tun_flags, vni, opts_len, opts,
-			      false);
+			      !!(tun_key->tun_flags & TUNNEL_CSUM), false);
 	if (err < 0)
 		ip_rt_put(rt);
 	return err;
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index 3cc983b..ff07d40 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -74,7 +74,7 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
 	__be64 key;
 	__be16 flags;
 
-	flags = TUNNEL_KEY;
+	flags = TUNNEL_KEY | (udp_hdr(skb)->check != 0 ? TUNNEL_CSUM : 0);
 	vxlan_port = vxlan_vport(vport);
 	if (vxlan_port->exts & VXLAN_F_GBP)
 		flags |= TUNNEL_VXLAN_OPT;
@@ -230,6 +230,7 @@ static int vxlan_tnl_send(struct vport *vport, struct sk_buff *skb)
 	__be16 src_port;
 	__be16 df;
 	int err;
+	u32 vxflags;
 
 	if (unlikely(!OVS_CB(skb)->egress_tun_info)) {
 		err = -EINVAL;
@@ -251,11 +252,13 @@ static int vxlan_tnl_send(struct vport *vport, struct sk_buff *skb)
 	src_port = udp_flow_src_port(net, skb, 0, 0, true);
 	md.vni = htonl(be64_to_cpu(tun_key->tun_id) << 8);
 	md.gbp = vxlan_ext_gbp(skb);
+	vxflags = vxlan_port->exts |
+		      (tun_key->tun_flags & TUNNEL_CSUM ? VXLAN_F_UDP_CSUM : 0);
 
 	err = vxlan_xmit_skb(rt, skb, fl.saddr, tun_key->ipv4_dst,
 			     tun_key->ipv4_tos, tun_key->ipv4_ttl, df,
 			     src_port, dst_port,
-			     &md, false, vxlan_port->exts);
+			     &md, false, vxflags);
 	if (err < 0)
 		ip_rt_put(rt);
 	return err;
-- 
1.9.1

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

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox