MINOR: listener: maintain a per-thread count of the number of connections on a listener

Having this information will help us improve thread-level distribution
of incoming traffic.
diff --git a/include/types/listener.h b/include/types/listener.h
index 1203d17..f9eeafa 100644
--- a/include/types/listener.h
+++ b/include/types/listener.h
@@ -215,6 +215,9 @@
 	const struct netns_entry *netns; /* network namespace of the listener*/
 
 	/* cache line boundary */
+	unsigned int thr_conn[MAX_THREADS]; /* number of connections per thread */
+
+	/* cache line boundary */
 	struct list by_fe;              /* chaining in frontend's list of listeners */
 	struct list by_bind;            /* chaining in bind_conf's list of listeners */
 	struct bind_conf *bind_conf;	/* "bind" line settings, include SSL settings among other things */
diff --git a/src/listener.c b/src/listener.c
index b4e0bc2..f642eb4 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -653,6 +653,7 @@
 		 */
 		next_conn = 0;
 
+		HA_ATOMIC_ADD(&l->thr_conn[tid], 1);
 		ret = l->accept(l, cfd, &addr);
 		if (unlikely(ret <= 0)) {
 			/* The connection was closed by stream_accept(). Either
@@ -723,6 +724,7 @@
 	if (!(l->options & LI_O_UNLIMITED))
 		HA_ATOMIC_SUB(&actconn, 1);
 	HA_ATOMIC_SUB(&l->nbconn, 1);
+	HA_ATOMIC_SUB(&l->thr_conn[tid], 1);
 	if (l->state == LI_FULL)
 		resume_listener(l);