netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@redhat.com>
To: Huazhong Tan <tanhuazhong@huawei.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, salil.mehta@huawei.com,
	yisen.zhuang@huawei.com, linuxarm@huawei.com,
	Weihang Li <liweihang@hisilicon.com>,
	Peng Li <lipeng321@huawei.com>
Subject: Re: [PATCH net-next 10/12] net: hns3: Add handling of MAC tunnel interruption
Date: Fri, 19 Apr 2019 07:29:02 -0400	[thread overview]
Message-ID: <20190419112902.GA31368@hmswarspite.think-freely.org> (raw)
In-Reply-To: <1555643147-52407-11-git-send-email-tanhuazhong@huawei.com>

On Fri, Apr 19, 2019 at 11:05:45AM +0800, Huazhong Tan wrote:
> From: Weihang Li <liweihang@hisilicon.com>
> 
> MAC tnl interruptions are different from other type of RAS and MSI-X
> errors, because some bits, such as OVF/LR/RF will occur during link up
> and down.
> 
> The drivers should clear status of all MAC tnl interruption bits but
> shouldn't print any message that would mislead the users.
> 
> In case that link down and re-up in a short time because of some reasons,
> we record when they occurred, and users can query them by debugfs.
> 
> Signed-off-by: Weihang Li <liweihang@hisilicon.com>
> Signed-off-by: Peng Li <lipeng321@huawei.com>
> ---
><snip>>
>  					     bool en)
>  {
> @@ -1611,6 +1636,7 @@ pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev)
>  int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
>  			       unsigned long *reset_requests)
>  {
> +	struct hclge_mac_tnl_stats mac_tnl_stats;
>  	struct device *dev = &hdev->pdev->dev;
>  	u32 mpf_bd_num, pf_bd_num, bd_num;
>  	enum hnae3_reset_type reset_level;
> @@ -1745,6 +1771,31 @@ int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
>  		set_bit(HNAE3_GLOBAL_RESET, reset_requests);
>  	}
>  
> +	/* query and clear mac tnl interruptions */
> +	hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QUERY_MAC_TNL_INT,
> +				   true);
> +	ret = hclge_cmd_send(&hdev->hw, &desc[0], 1);
Is this running in interrupt context ever?  I don't think it is, but the
function name makes me think otherwise.  If it is, this could be unsafe as you
take a spinlock in hclge_cmd_send, which is protected against bottom halves, but
not interrupts.  That could cause a deadlock if there is a path to get here
directly from an interrupt context.
Neil


  reply	other threads:[~2019-04-19 18:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  3:05 [PATCH net-next 00/12] net: hns3: add some DFX info for HNS3 driver Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 01/12] net: hns3: add reset statistics info for PF Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 02/12] net: hns3: add reset statistics for VF Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 03/12] net: hns3: add some debug information for hclge_check_event_cause Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 04/12] net: hns3: add some debug info for hclgevf_get_mbx_resp() Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 05/12] net: hns3: refine tx timeout count handle Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 06/12] net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info() Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 07/12] net: hns3: dump more information when tx timeout happens Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 08/12] net: hns3: Add support for netif message level settings Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 09/12] net: hns3: add support for dump ncl config by debugfs Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 10/12] net: hns3: Add handling of MAC tunnel interruption Huazhong Tan
2019-04-19 11:29   ` Neil Horman [this message]
2019-04-20  1:05     ` tanhuazhong
2019-04-19  3:05 ` [PATCH net-next 11/12] net: hns3: add queue's statistics update to service task Huazhong Tan
2019-04-19  3:05 ` [PATCH net-next 12/12] net: hns3: add function type check for debugfs help information Huazhong Tan
2019-04-20  1:43 ` [PATCH net-next 00/12] net: hns3: add some DFX info for HNS3 driver David Miller

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=20190419112902.GA31368@hmswarspite.think-freely.org \
    --to=nhorman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=liweihang@hisilicon.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=tanhuazhong@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).