Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2917349pxj; Sun, 6 Jun 2021 19:22:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0KSz859r20WiHcY2js2uKQd+i+NCIh2DbmL/1ObEyA3XlUTrjHfpnSAzEu6zzvODsOL6k X-Received: by 2002:a17:906:4bcf:: with SMTP id x15mr9967916ejv.145.1623032553542; Sun, 06 Jun 2021 19:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623032553; cv=none; d=google.com; s=arc-20160816; b=wSuN9HYaZkMX6r3XImcu/IscibZ2u7D99hfds2HXtkjmOMfv1oxhB0Wu5OPAcIbBks RfmCvOgJs+ewOEcJSK7GnBFS7riFJBZcmYrMQIhYGcY7EpUWwQOFIrdWKAkUXBAJHFMb pHERioSsClATKWFYRtgGWtoSmpy5kuCnoK8mnWd7c68zQ9TxmBUrqsmA+wtngSDZ3f/G OUzcZqqIg/M1YwatuEqlKLYgEZY9TyEWqj9p8CfPMIwF/bs8cP/7vX2f6SF5OGUTYkMz S8TRuDVeZD2lmIC9LxQYM1v9pt9b/m/GYqV35OMIomjep3+A1NkLWvb5zucigaB43s3e +oOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=e6pSAH8LJH5/Nvro2kX6EvSgTrkqbhD577ws85q+wLg=; b=O3cwY3BSBp7DaBdJtKwvtQdlgaKMfk40AEHnCC+5HK7ZOihXbTX6wSGwAgKc2yrLt0 Y+Ewn5omNam75QIdTnkqu2A7vrImDSsncWmAHsUyNIG5rzL0VYVHRzNorzOJLMOLjAQs V6UaaAxWkL75xoA9pRnB9SPV0CEs/g67KErlOpdi7iN8zagLDrTvu2bF0TfAC+F7m3dk itiv53+ChvoKOLPL2E776twDR4103gvFOuP93+gjcw1ccEUW3z+fbpWOZNm5EP1tl/iY NCr3OC11CWIINWGcRHny4yzO5tK1zV0dfXsU4RV1smzmlXIlJ8yZ6fsZ1YL3zNzoZfrY 3dWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id br12si9428985ejb.231.2021.06.06.19.22.11; Sun, 06 Jun 2021 19:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbhFGCWp (ORCPT + 99 others); Sun, 6 Jun 2021 22:22:45 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:4372 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbhFGCWp (ORCPT ); Sun, 6 Jun 2021 22:22:45 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Fyxp80lBTz69HH; Mon, 7 Jun 2021 10:17:04 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 7 Jun 2021 10:20:49 +0800 Received: from [10.67.102.67] (10.67.102.67) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 7 Jun 2021 10:20:49 +0800 Subject: Re: [RESEND net-next 1/2] net: hns3: add support for PTP To: Richard Cochran CC: , , , , , , References: <1622602664-20274-1-git-send-email-huangguangbin2@huawei.com> <1622602664-20274-2-git-send-email-huangguangbin2@huawei.com> <20210603131452.GA6216@hoboy.vegasvil.org> <4b2247bc-605e-3aca-3bcb-c06477cd2f2e@huawei.com> <20210605155143.GA10328@localhost> From: "huangguangbin (A)" Message-ID: Date: Mon, 7 Jun 2021 10:20:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20210605155143.GA10328@localhost> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.67] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/5 23:51, Richard Cochran wrote: > On Sat, Jun 05, 2021 at 05:54:45PM +0800, huangguangbin (A) wrote: >>> This won't work. After all, the ISR thread might already be running. >>> Use a proper spinlock instead. >>> >> Thanks for review. Using spinlock in irq_handler looks heavy, what about >> adding a new flag HCLGE_STATE_PTP_CLEANING_TX_HWTS for hclge_ptp_clean_tx_hwts()? >> Function hclge_ptp_clean_tx_hwts() test and set this flag at the beginning >> and clean it in the end. Do you think it is Ok? > > No, I don't. Use a proper lock. Don't make vague arguments about how > it "looks heavy". > > Thanks, > Richard > . > Ok, thanks. We will modify this according to your idea, and repost a new version after we test ok.