net: report RCU QS on threaded NAPI repolling
[sfrench/cifs-2.6.git] / net / core / dev.c
index 0766a245816bdf70f6609dc7b6d694ae81e7a9e5..9a67003e49db87f3f92b6c6296b3e7a5ca9d9171 100644 (file)
@@ -2245,7 +2245,7 @@ void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
        rcu_read_lock();
 again:
        list_for_each_entry_rcu(ptype, ptype_list, list) {
-               if (ptype->ignore_outgoing)
+               if (READ_ONCE(ptype->ignore_outgoing))
                        continue;
 
                /* Never send packets back to the socket
@@ -6743,6 +6743,8 @@ static int napi_threaded_poll(void *data)
        void *have;
 
        while (!napi_thread_wait(napi)) {
+               unsigned long last_qs = jiffies;
+
                for (;;) {
                        bool repoll = false;
 
@@ -6767,6 +6769,7 @@ static int napi_threaded_poll(void *data)
                        if (!repoll)
                                break;
 
+                       rcu_softirq_qs_periodic(last_qs);
                        cond_resched();
                }
        }
@@ -11665,11 +11668,12 @@ static void __init net_dev_struct_check(void)
 
        /* TXRX read-mostly hotpath */
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, lstats);
+       CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, state);
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags);
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, hard_header_len);
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, features);
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, ip6_ptr);
-       CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 38);
+       CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 46);
 
        /* RX read-mostly hotpath */
        CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, ptype_specific);