Received: by 10.213.65.68 with SMTP id h4csp978744imn; Thu, 22 Mar 2018 12:35:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELuGuhAGAKpRYrHdTBxEUdtzOZ/G3KdGYcrYrYn82NOrDoDe002OrTqNpnGSsFTlsaMWb1Fv X-Received: by 10.99.117.68 with SMTP id f4mr19223859pgn.437.1521747355684; Thu, 22 Mar 2018 12:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521747355; cv=none; d=google.com; s=arc-20160816; b=FhvQhUIsl1KQgaIvWGDbjvjNhm61+zp9IQBFvMVftCjew7Ys0C1vYeGniOrfqE+4Pp VFdo3Br316mMVk8GypSZYpDZgj2ztqtpVVjswcdpkmip29IkVk6bsoneUrtatpJ/mETX d/i4Ox8i76+kJ66mbEW8dCqqEnqvR0PSXIuwgFP0PBjFsOAHf1XTQLXb0M8HNJQ8SQFt ka+oI/vYERKGST+qsjMb5IRVRVyLvNvD4iBz3wAL0PbvkDIZzc4wx9j08UcQe/xa8OVC ObNTbWoRNxlSK/T504ZPY42IBG173orFBOC01U/Qg+hW7OPJcPkJaHypoQwtDcDVNHN0 k9zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=gso35lxBa1oSpa2P7wBauFjIepHJIaD+u/8FceEvEug=; b=o1PaONqk6yO7tjmNXqcDpjKydK8G0j9v41K/CY9M0u3Pd1rmlbBPOhNf3sHdJ9kvUO zvGnCYknRfgCcNjCZ64UftAkXd1Ewv1TFC8eCGe17N6yQUFBvk7E7Lu1nN8uYgRdRbnf AIbs23k4nfqnHavSzxYi/NmwfOcqmyOUu+4BlR7zi4cmbq/chz0ooujtzUVdIeVaBuBI PLPkhOJOy3QzNYaeE7Qr7GNufxGYbgltQ4PVhCP6WTE7pZeeN8O1L1lRlfPnLDpvsV3Z Bb4/+2RhmcLG6TFsrGiwL5rShhJ4TtGU6+Ltpk1+pU/z6p8InQhDhUQpzL/x9i6nXnw1 nJFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si4839323pgn.275.2018.03.22.12.35.39; Thu, 22 Mar 2018 12:35:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbeCVTep (ORCPT + 99 others); Thu, 22 Mar 2018 15:34:45 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:60028 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbeCVTeo (ORCPT ); Thu, 22 Mar 2018 15:34:44 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 317FA1403CDFE; Thu, 22 Mar 2018 12:34:43 -0700 (PDT) Date: Thu, 22 Mar 2018 15:34:42 -0400 (EDT) Message-Id: <20180322.153442.967912156804832743.davem@davemloft.net> To: salil.mehta@huawei.com Cc: yisen.zhuang@huawei.com, mehta.salil.lnk@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com Subject: Re: [PATCH net-next 0/9] Add support of VF Reset to HNS3 VF driver From: David Miller In-Reply-To: <20180322142900.22860-1-salil.mehta@huawei.com> References: <20180322142900.22860-1-salil.mehta@huawei.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 22 Mar 2018 12:34:43 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Salil Mehta Date: Thu, 22 Mar 2018 14:28:51 +0000 > This patch-set adds the support of VF reset to the existing VF driver. > VF Reset can be triggered due to TX watchdog firing as a result of TX > data-path not working. VF reset could also be a result of some internal > configuration changes if that requires reset, or as a result of the > PF/Core/Global/IMP(Integrated Management Processor) reset happened in > the PF. > > Summary of Patches: > * Watchdog timer trigger chnages are present in Patch 1. > * Reset Service Task and related Event handling is present in Patches {2,3} > * Changes to send reset request to PF, reset stack and re-initialization > of the hclge device is present in Patches {4,5,6} > * Changes related to ARQ (Asynchronous Receive Queue) and its event handling > are present in Patches {7,8} > * Changes required in PF to handle the VF Reset request and actually perform > hardware VF reset is there in Patch 9. > > > NOTE: This patch depends upon "[PATCH net-next 00/11] fix some bugs for HNS3 driver" > Link: https://lkml.org/lkml/2018/3/21/72 Series applied, thank you. Please audit your usage of the various reset state bits. In most places you do the correct atomic sequence by making use of test_and_set_bit() and test_and_clear_bit(). But in some cases you do things like: if (!test_bit(X) && !test_bit(Y)) { ... set_bit(Y); } which is racy.