Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1755325ybg; Sat, 19 Oct 2019 01:49:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo48bFl95iU6DGL2cPYUq8A4cv8/LHSUP4XbrkyMuH+0+ZF45NcSB4zVocODVFJnSgdCKU X-Received: by 2002:a17:906:85c5:: with SMTP id i5mr12432095ejy.222.1571474994111; Sat, 19 Oct 2019 01:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474994; cv=none; d=google.com; s=arc-20160816; b=Fe3+/cEjcETcrb0/29XLt19hRXjY5WGDiS5XX6s79N6d+YzCXeH6VjFonDa/Tq3RY7 44iTTwdcZCMsPfWdErDVtPBKG5uzP896dmKIKQ0Kios/0RRQUHZ3on1ddQ44oxVMArQ8 zmYQ2K+fOZ6beBsMokzlFQA9zE7EHK77wJCcG+fgcMht0QD2YzwgSJ4elUyGzLUT+cus qINeucsqB4hbd/iEsEaay1dpklyHjjUu5DAG5vqQ2N/OK8jUl3Kre61Eogo8LvbCiHk5 u6zTwn2Gc32uwb+wHoTDae1ArNT7BhYdU6NvecFiHeKpqOm4VEcddGscV1bPlYohu5/3 pLUw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=IOez4AH3FAxesTF0200hHYoiJIV2V8NUCCJGXlYSsIw=; b=ek5tRICPJAGbwB4CkHnifyFW3h70u9/JE7+Eq5/gAupGVytD1OJ9Dl2H/B7DRlyCH6 S9Tj31S/Gpo2Y25r5huvWQ110NFOTaaX7Id8rgaTXALIgbThx4FGwUD2wSp65axDiGzK YiOepgBg2l7zT0obhXSLAHt0z1ifrUNTAbaPTq82yqe9b7wVF/2eSrwMW9ZNCTxwC8JM NHsJZbvoXoJIguTxw6kKJFWQV1VJeZQtFHhZhpPYXEWitkobIU2kdQ3VDHpkLw6+c+4S Iunp6p1dut+jM2ixAsYzhxv2U5SvtwYl4J3+bOCHcUsTyfY/AGbXaH+oQW3aP3GSBQ7S VkLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=KzhFXzPg; 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 k25si4849073ejs.189.2019.10.19.01.49.30; Sat, 19 Oct 2019 01:49:54 -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; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=KzhFXzPg; 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 S2505123AbfJRRBd (ORCPT + 99 others); Fri, 18 Oct 2019 13:01:33 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39595 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502169AbfJRRBb (ORCPT ); Fri, 18 Oct 2019 13:01:31 -0400 Received: by mail-pf1-f195.google.com with SMTP id v4so4254351pff.6 for ; Fri, 18 Oct 2019 10:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=IOez4AH3FAxesTF0200hHYoiJIV2V8NUCCJGXlYSsIw=; b=KzhFXzPgLEaLHhBO7ptqMUiewe2hpO3sKQrkBTIS2eSa/S2OQK8ED1Lh62fietylGI Qxc98BpQoE6+T6m85d+BX5F9OGCmvuJyKwHs5EvTb8bcOasDPEgd4sXfcyqdynDwOgmU f/zk4LYzxayvko1ULjUgZsXIIUE4bet0Tef1a8qXOogeM1rM7ra71MHZ0UE/EzH5Juvk HeZas9YAZzfTsICtbivvQ0oS99a0+O+oOeY8yjnxY2aS6AuMpX2CK+8W9HhOvDHzCUnh GscyJu3Y1GcOL89BM6kSeU9uPrLmTBgjFriQ+KSWPTCYntykbTKCnmXaDCZkGguf3b2c i8Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=IOez4AH3FAxesTF0200hHYoiJIV2V8NUCCJGXlYSsIw=; b=d7L37/iNcsqZNdlYpDhZDsLBsUSYFt9+Kwur8yWWyCvz90l/k3k0D+GiRXjk0Adquj QDjDH8nC5R0yFeAsIeEehyKMD6lmUqWwe2OsDUHHQz6N4MP337tI/IzEk36BDbcYG+m1 PjcKuHX6EiBPEw/3jkqQTTcvabhb4zt1hBlvemXfkPoVGcmRiPm3X9E1jc7ijcYpKmL5 mHdUEEVvAs/wFlme6mj+gFTDPfdqVTT0IdN8FqP1Rm5vZrP471bmqu7gVD0m9lKIP/Fj C3GLCKvmJwitl0bo3nUFVBp/VopO/9+GbrjpQNUdV0GizFFFHKFVG92QHJX8cOQxhiL8 UUlQ== X-Gm-Message-State: APjAAAV6xdI2GTp64oMBAl40hklYqKoBInEsKS3E+T0wjtz+DuiZRb5F sL/BraEmICgQprINR1mUzTtKGQ== X-Received: by 2002:aa7:98c9:: with SMTP id e9mr8125740pfm.142.1571418091182; Fri, 18 Oct 2019 10:01:31 -0700 (PDT) Received: from cakuba.netronome.com (ip-184-250-188-81.sanjca.spcsdns.net. [184.250.188.81]) by smtp.gmail.com with ESMTPSA id j26sm6489404pgl.38.2019.10.18.10.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:01:31 -0700 (PDT) Date: Fri, 18 Oct 2019 10:01:22 -0700 From: Jakub Kicinski To: Vasundhara Volam Cc: Sheetal Tigadoli , =?UTF-8?B?UmFmYcWC?= =?UTF-8?B?IE1pxYJlY2tp?= , Greg Kroah-Hartman , Michal Simek , Rajan Vaja , Scott Branden , Ray Jui , Vikram Prakash , Jens Wiklander , Michael Chan , "David S. Miller" , Vikas Gupta , Linux Kernel Mailing List , tee-dev@lists.linaro.org, bcm-kernel-feedback-list@broadcom.com, Netdev Subject: Re: [PATCH V2 3/3] bnxt_en: Add support to collect crash dump via ethtool Message-ID: <20191018100122.4cf12967@cakuba.netronome.com> In-Reply-To: References: <1571313682-28900-1-git-send-email-sheetal.tigadoli@broadcom.com> <1571313682-28900-4-git-send-email-sheetal.tigadoli@broadcom.com> <20191017122156.4d5262ac@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019 12:04:35 +0530, Vasundhara Volam wrote: > On Fri, Oct 18, 2019 at 12:52 AM Jakub Kicinski wrote: > > On Thu, 17 Oct 2019 17:31:22 +0530, Sheetal Tigadoli wrote: > > > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > > > index 51c1404..1596221 100644 > > > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > > > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > > > @@ -3311,6 +3311,23 @@ static int bnxt_get_coredump(struct bnxt *bp, void *buf, u32 *dump_len) > > > return rc; > > > } > > > > > > +static int bnxt_set_dump(struct net_device *dev, struct ethtool_dump *dump) > > > +{ > > > + struct bnxt *bp = netdev_priv(dev); > > > + > > > +#ifndef CONFIG_TEE_BNXT_FW > > > + return -EOPNOTSUPP; > > > +#endif > > > > if (!IS_ENABLED(...)) > > return x; > > > > reads better IMHO > Okay. > > > > > But also you seem to be breaking live dump for systems with > > CONFIG_TEE_BNXT_FW=n > Yes, we are supporting set_dump only if crash dump is supported. It's wrong. > > > + if (dump->flag > BNXT_DUMP_CRASH) { > > > + netdev_err(dev, "Supports only Live(0) and Crash(1) dumps.\n"); > > > > more of an _info than _err, if at all > I made this err, as we are returning error on invalid flag value. I > can modify the log to > something like "Invalid dump flag. Supports only Live(0) and Crash(1) > dumps.\n" to make > it more like error log. Not an error.