From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3C74C432C0 for ; Tue, 26 Nov 2019 21:19:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7CB52071E for ; Tue, 26 Nov 2019 21:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfKZVTq (ORCPT ); Tue, 26 Nov 2019 16:19:46 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:42446 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbfKZVTq (ORCPT ); Tue, 26 Nov 2019 16:19:46 -0500 Received: from localhost (c-73-35-209-67.hsd1.wa.comcast.net [73.35.209.67]) (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 D9EF914CED4B3; Tue, 26 Nov 2019 13:19:45 -0800 (PST) Date: Tue, 26 Nov 2019 13:19:45 -0800 (PST) Message-Id: <20191126.131945.1705488455872187863.davem@davemloft.net> To: tlfalcon@linux.ibm.com Cc: jakub.kicinski@netronome.com, netdev@vger.kernel.org, linuxppc-dev@ozlabs.org, dnbanerg@us.ibm.com, brking@linux.vnet.ibm.com, julietk@linux.vnet.ibm.com Subject: Re: [PATCH net v2 0/4] ibmvnic: Harden device commands and queries From: David Miller In-Reply-To: <1574723576-27553-1-git-send-email-tlfalcon@linux.ibm.com> References: <20191125112359.7a468352@cakuba.hsd1.ca.comcast.net> <1574723576-27553-1-git-send-email-tlfalcon@linux.ibm.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Tue, 26 Nov 2019 13:19:46 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Thomas Falcon Date: Mon, 25 Nov 2019 17:12:52 -0600 > This patch series fixes some shortcomings with the current > VNIC device command implementation. The first patch fixes > the initialization of driver completion structures used > for device commands. Additionally, all waits for device > commands are bounded with a timeout in the event that the > device does not respond or becomes inoperable. Finally, > serialize queries to retain the integrity of device return > codes. > > Changes in v2: > > - included header comment for ibmvnic_wait_for_completion > - removed open-coded loop in patch 3/4, suggested by Jakub > - ibmvnic_wait_for_completion accepts timeout value in milliseconds > instead of jiffies > - timeout calculations cleaned up and completed before wait loop > - included missing mutex_destroy calls, suggested by Jakub > - included comment before mutex declaration Series applied, thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B299AC432C0 for ; Tue, 26 Nov 2019 21:35:05 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47E8020722 for ; Tue, 26 Nov 2019 21:35:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47E8020722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=davemloft.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47MxyH2nYFzDqnT for ; Wed, 27 Nov 2019 08:35:03 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47Mxcv0lX6zDqlR for ; Wed, 27 Nov 2019 08:19:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=davemloft.net Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 47Mxct6M0rz8t0Q for ; Wed, 27 Nov 2019 08:19:58 +1100 (AEDT) Received: by ozlabs.org (Postfix) id 47Mxct5JgFz9sRQ; Wed, 27 Nov 2019 08:19:58 +1100 (AEDT) Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=davemloft.net (client-ip=2620:137:e000::1:9; helo=shards.monkeyblade.net; envelope-from=davem@davemloft.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=davemloft.net Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Mxct2q7Tz9sRH for ; Wed, 27 Nov 2019 08:19:55 +1100 (AEDT) Received: from localhost (c-73-35-209-67.hsd1.wa.comcast.net [73.35.209.67]) (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 D9EF914CED4B3; Tue, 26 Nov 2019 13:19:45 -0800 (PST) Date: Tue, 26 Nov 2019 13:19:45 -0800 (PST) Message-Id: <20191126.131945.1705488455872187863.davem@davemloft.net> To: tlfalcon@linux.ibm.com Subject: Re: [PATCH net v2 0/4] ibmvnic: Harden device commands and queries From: David Miller In-Reply-To: <1574723576-27553-1-git-send-email-tlfalcon@linux.ibm.com> References: <20191125112359.7a468352@cakuba.hsd1.ca.comcast.net> <1574723576-27553-1-git-send-email-tlfalcon@linux.ibm.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Tue, 26 Nov 2019 13:19:46 -0800 (PST) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jakub.kicinski@netronome.com, julietk@linux.vnet.ibm.com, netdev@vger.kernel.org, dnbanerg@us.ibm.com, linuxppc-dev@ozlabs.org, brking@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Thomas Falcon Date: Mon, 25 Nov 2019 17:12:52 -0600 > This patch series fixes some shortcomings with the current > VNIC device command implementation. The first patch fixes > the initialization of driver completion structures used > for device commands. Additionally, all waits for device > commands are bounded with a timeout in the event that the > device does not respond or becomes inoperable. Finally, > serialize queries to retain the integrity of device return > codes. > > Changes in v2: > > - included header comment for ibmvnic_wait_for_completion > - removed open-coded loop in patch 3/4, suggested by Jakub > - ibmvnic_wait_for_completion accepts timeout value in milliseconds > instead of jiffies > - timeout calculations cleaned up and completed before wait loop > - included missing mutex_destroy calls, suggested by Jakub > - included comment before mutex declaration Series applied, thanks.