[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa85b5e9-2005-e977-af2a-b308ac6a86a2@huawei.com>
Date: Sat, 20 Apr 2019 09:05:57 +0800
From: tanhuazhong <tanhuazhong@...wei.com>
To: Neil Horman <nhorman@...hat.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <salil.mehta@...wei.com>,
<yisen.zhuang@...wei.com>, <linuxarm@...wei.com>,
Weihang Li <liweihang@...ilicon.com>,
Peng Li <lipeng321@...wei.com>
Subject: Re: [PATCH net-next 10/12] net: hns3: Add handling of MAC tunnel
interruption
On 2019/4/19 19:29, Neil Horman wrote:
> On Fri, Apr 19, 2019 at 11:05:45AM +0800, Huazhong Tan wrote:
>> From: Weihang Li <liweihang@...ilicon.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@...ilicon.com>
>> Signed-off-by: Peng Li <lipeng321@...wei.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
>
This function is not running in interrupt context. When the driver
recieve the msix interrupt, the irq_handler will schedule a task to call
this function for querying more information about the msix interrupt.
Best Regards, Huazhong
>
> .
>
Powered by blists - more mailing lists