All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support
Date: Tue, 07 Apr 2015 08:17:40 -0700	[thread overview]
Message-ID: <5523F514.20800@redhat.com> (raw)
In-Reply-To: <1428092835-16834-5-git-send-email-jeffrey.t.kirsher@intel.com>

On 04/03/2015 01:26 PM, Jeff Kirsher wrote:
> This change adds a function called "fm10k_netpoll" that's used to define
> "ndo_poll_controller" in "fm10k_netdev_ops". This is required to enable
> support for "netconsole" in fm10k.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
>   drivers/net/ethernet/intel/fm10k/fm10k.h        |  1 +
>   drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 21 +++++++++++++++++++++
>   drivers/net/ethernet/intel/fm10k/fm10k_pci.c    |  2 +-
>   3 files changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
> index 65e7001..715d0a0 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
> @@ -457,6 +457,7 @@ void fm10k_down(struct fm10k_intfc *interface);
>   void fm10k_update_stats(struct fm10k_intfc *interface);
>   void fm10k_service_event_schedule(struct fm10k_intfc *interface);
>   void fm10k_update_rx_drop_en(struct fm10k_intfc *interface);
> +irqreturn_t fm10k_msix_clean_rings(int irq, void *data);
>   
>   /* Netdev */
>   struct net_device *fm10k_alloc_netdev(void);
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> index a7db5e2..2a61b83 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> @@ -1350,6 +1350,26 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv)
>   	}
>   }
>   
> +/**
> + * fm10k_netpoll - A Polling 'interrupt' handler
> + * @netdev: network interface device structure
> + *
> + * This is used by netconsole to send skbs without having to re-enable
> + * interrupts. It's not called while the normal interrupt routine is executing.
> + **/
> +static void fm10k_netpoll(struct net_device *netdev)
> +{
> +	struct fm10k_intfc *interface = netdev_priv(netdev);
> +	int i;
> +
> +	/* if interface is down do nothing */
> +	if (test_bit(__FM10K_DOWN, &interface->state))
> +		return;
> +
> +	for (i = 0; i < interface->num_q_vectors; i++)
> +		fm10k_msix_clean_rings(0, interface->q_vector[i]);
> +}
> +
>   static netdev_features_t fm10k_features_check(struct sk_buff *skb,
>   					      struct net_device *dev,
>   					      netdev_features_t features)
> @@ -1382,6 +1402,7 @@ static const struct net_device_ops fm10k_netdev_ops = {
>   	.ndo_do_ioctl		= fm10k_ioctl,
>   	.ndo_dfwd_add_station	= fm10k_dfwd_add_station,
>   	.ndo_dfwd_del_station	= fm10k_dfwd_del_station,
> +	.ndo_poll_controller	= fm10k_netpoll,
>   	.ndo_features_check	= fm10k_features_check,
>   };
>   
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> index 6fc9965..c11e2c9 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> @@ -807,7 +807,7 @@ static void fm10k_napi_enable_all(struct fm10k_intfc *interface)
>   	}
>   }
>   
> -static irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
> +irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
>   {
>   	struct fm10k_q_vector *q_vector = data;
>   

2 quick issues with this patch based on the fact that it triggered the 
build bot.

1.  You should probably place fm10k_netpoll in fm10k_pci.c since it is 
technically an interrupt handler.  Then you can avoid issues down the 
road for having to convert fm10k_msix_clean_rings to a non-static 
function that is only used when CONFIG_NET_POLL_CONTROLLER is defined.
2.  It should be wrapped in CONFIG_NET_POLL_CONTROLLER along with the 
inititalization in the fm10k_netdev_ops structure.

- Alex

  parent reply	other threads:[~2015-04-07 15:17 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
2015-04-03 21:01   ` Jeff Kirsher
2015-04-14 19:37     ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
2015-04-03 21:01   ` Jeff Kirsher
2015-04-14 19:37     ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
2015-04-03 21:01   ` Jeff Kirsher
2015-04-14 19:42     ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
2015-04-03 21:02   ` Jeff Kirsher
2015-04-14 19:44     ` Singh, Krishneil K
2015-04-07 15:17   ` Alexander Duyck [this message]
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
2015-04-03 21:02   ` Jeff Kirsher
2015-04-14 19:45     ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
2015-04-03 21:02   ` Jeff Kirsher
2015-04-14 19:45     ` Singh, Krishneil K
2015-04-04 17:39   ` Alexander Duyck
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
2015-04-03 21:02   ` Jeff Kirsher
2015-04-14 19:46     ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
2015-04-03 21:03   ` Jeff Kirsher
2015-04-14 19:47     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
2015-04-03 21:03   ` Jeff Kirsher
2015-04-14 19:47     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
2015-04-03 21:03   ` Jeff Kirsher
2015-04-14 19:47     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
2015-04-03 21:04   ` Jeff Kirsher
2015-04-14 19:48     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
2015-04-03 21:04   ` Jeff Kirsher
2015-04-14 19:48     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
2015-04-03 21:04   ` Jeff Kirsher
2015-04-14 19:49     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
2015-04-03 21:04   ` Jeff Kirsher
2015-04-14 19:49     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path Jeff Kirsher
2015-04-03 21:05   ` Jeff Kirsher
2015-04-14 19:49     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
2015-04-03 21:05   ` Jeff Kirsher
2015-04-14 19:49     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
2015-04-03 21:05   ` Jeff Kirsher
2015-04-14 19:50     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
2015-04-03 21:05   ` Jeff Kirsher
2015-04-14 19:50     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
2015-04-03 21:06   ` Jeff Kirsher
2015-04-04 18:16   ` Alexander Duyck
2015-04-06 16:39     ` Vick, Matthew
2015-04-06 17:05       ` Alexander Duyck
2015-04-06 18:33         ` Vick, Matthew
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses Jeff Kirsher
2015-04-03 21:06   ` Jeff Kirsher
2015-04-14 19:50     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
2015-04-03 21:06   ` Jeff Kirsher
2015-04-14 19:50     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
2015-04-03 21:07   ` Jeff Kirsher
2015-04-14 19:51     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
2015-04-03 21:07   ` Jeff Kirsher
2015-04-14 19:51     ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update Jeff Kirsher
2015-04-03 21:07   ` Jeff Kirsher
2015-04-14 19:51     ` Singh, Krishneil K
2015-04-03 21:00 ` [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-14 19:36   ` Singh, Krishneil K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5523F514.20800@redhat.com \
    --to=alexander.h.duyck@redhat.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.