Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205560

Re: [PATCH net] netconsole: Check for carrier before calling netpoll_send_udp()

From Jonathan Maxwell <jmaxwell37@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH net] netconsole: Check for carrier before calling netpoll_send_udp()
Date 2015-08-12 05:10 +0200
Message-ID <pWuAp-8cg-3@gated-at.bofh.it> (permalink)
References <pW6HL-75p-1@gated-at.bofh.it> <pW9mi-2Cq-1@gated-at.bofh.it> <pWaLn-4v5-3@gated-at.bofh.it> <pWlx8-3nb-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> I personally think that drivers need to synchronize such things
> internally.  They are the only entity which knows when it's "OK"
> to do whatever the netpoll method does, and they are also the only
> entity which can properly synchronize such checks.

Thanks agreed. I am testing the following ixgbe patch on my reproducer
that  checks for resetting/removing/down state flags in ixgbe_poll() and
bails if true. It does that check in other ixgbe routines as well. It's working
fine so far. We will need to do something similar for vmxnet3 as well and
possibly other drivers.

--- a/drivers/net/ixgbe/ixgbe_main.c 2015-08-10 17:13:02.899400508 +1000
+++ b/drivers/net/ixgbe/ixgbe_main.c.patch 2015-08-12 11:34:49.951053887 +1000
@@ -2672,6 +2672,11 @@
  int per_ring_budget;
  bool clean_complete = true;

+ if (test_bit(__IXGBE_DOWN, &adapter->state) ||
+    test_bit(__IXGBE_REMOVING, &adapter->state) ||
+    test_bit(__IXGBE_RESETTING, &adapter->state))
+ return budget;
+
 #ifdef CONFIG_IXGBE_DCA
  if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
  ixgbe_update_dca(q_vector);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH net] netconsole: Check for carrier before calling netpoll_send_udp() Jon Maxwell <jmaxwell37@gmail.com> - 2015-08-11 03:40 +0200
  Re: [PATCH net] netconsole: Check for carrier before calling  netpoll_send_udp() David Miller <davem@davemloft.net> - 2015-08-11 06:30 +0200
    Re: [PATCH net] netconsole: Check for carrier before calling netpoll_send_udp() Jonathan Maxwell <jmaxwell37@gmail.com> - 2015-08-11 08:00 +0200
      Re: [PATCH net] netconsole: Check for carrier before calling  netpoll_send_udp() David Miller <davem@davemloft.net> - 2015-08-11 19:30 +0200
        Re: [PATCH net] netconsole: Check for carrier before calling netpoll_send_udp() Jonathan Maxwell <jmaxwell37@gmail.com> - 2015-08-12 05:10 +0200

csiph-web