Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3781515ybg; Sun, 20 Oct 2019 21:43:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxL8QLSe9HzoYomUaPxwHD3AoNgrfiwzEknaY0n0GD4J2RJHHGhBySlT1euFSXAsEE4qpDu X-Received: by 2002:aa7:d8c6:: with SMTP id k6mr22954707eds.87.1571633009382; Sun, 20 Oct 2019 21:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571633009; cv=none; d=google.com; s=arc-20160816; b=YzNnwV39XhzyXeC5Z6s/lOyypSfZOkdMaTflLaaMw0/UpnZGUoeKhM3N5/msmDJ3Hr L3Uphl4FlMeMRwB6pgpjGWHG4Bi3718/rcNT7m/JsK6dQO+aD+TkDUewrVicFRRSk2R3 4KjaJyNhQIl4TOq8Se72mS9AGD74vwH9PiIMuWrAL+kmmNAKixtfh0V8xNgSSsfT4+2Y k5IWLnrkF1TyRIoVHjLYot4KIMuJu70gQNZA1E61jUP8l5B0Em89eEVgQfZc7S6UXbYJ V42+Jl4KGOIRVt9ILEbyx1xmgCmp3mbNzQC8pxB/C7SiJUg//JEy+n7EvFgb7q5C1yzQ A4lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QQNBrejSIfQot1yvJ+CXYvqpFeva493kmEcK/FmvoDg=; b=L/UM0k6Hyhr3T7kaA51rxiV67ce3qtshiXcPrI0iz1tEuluWus90T8rypAZR5ec/gb NRwilI4XWCqQhbiaEE1+dlr+0Cw/9r+USCKfqaQxxnPxU1dKDj+NGA9bp0npLzKrod6/ cV7smRmOhRRPT6OjMVltSsuYhh6I33uVrWhdhtYOVptxKxqQ6PDfwOivJ4qt+5Mw0gBD UbPVYMgXkce+k2dSelVlxrKFrW+DEROUPLUQdGXQ9DNfhxmBk7kOzkJoE4jFiVj9Hbpe p84jmrs/7FqNSfBNRHH7bN/ufWKw2s1GK36kQ06osh5XHZ4Y9x7xargq0ev67tKT8V2P zMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Lxe3V4zw; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20si8552838edb.218.2019.10.20.21.42.54; Sun, 20 Oct 2019 21:43:29 -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=@broadcom.com header.s=google header.b=Lxe3V4zw; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbfJUEff (ORCPT + 99 others); Mon, 21 Oct 2019 00:35:35 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39920 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbfJUEfe (ORCPT ); Mon, 21 Oct 2019 00:35:34 -0400 Received: by mail-lj1-f196.google.com with SMTP id y3so11727237ljj.6 for ; Sun, 20 Oct 2019 21:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QQNBrejSIfQot1yvJ+CXYvqpFeva493kmEcK/FmvoDg=; b=Lxe3V4zwPgql6DdVfOuGdemoN+iTyWUFJnNUZSjTdmoNQjUtvBndjhx5Rdj4/DP/Dn 4z1dCVwOAa6V8CYqKP/3oWo7ve+o5f+Qtc1jdxgfpXkIeuRIPOFHPql1RbabNN2N0bOA KrA9Gd8YoyxUxwQ4bbDHN4daiPvi8CYU5SYtg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QQNBrejSIfQot1yvJ+CXYvqpFeva493kmEcK/FmvoDg=; b=s/tY5WzmQzcneTjZA45k8NBp7VcxMd1K3WHAB8QkKS4OMGzMZMfIn1uhMWvM85cSLO IXZBlJ8giajzDE1dm1dLC+jqdiE6zLp1IQn3HPbWciAOyBmg/2rVtr82OZLquFT2Ciys Ay+onHDaCnrulhV8Av2nfgjykDmRe22RQYKwodhS04/N6iN4EgHwScfcd9FAO9tWJt+Z AaRFm+Kmpv7yzSqXezrQ0Kjx+6NVjaf6RW6jKVk9F8MCouTQslD2gG1xMqWQjJ4RLrWL SA+pbWFe14rqKrrY85BEAZ8x/gr2QTDVFsqtIidG0D/D0L1oygOcoKe8ZgteXUBqyRGz CFXA== X-Gm-Message-State: APjAAAXETcdCHS+Gollw5QDq6x9u8XwpEJHkjXjyD3pNi2UKJ9gdsFFZ PuNe8RZmO8CMVr8N86lV0FZ2rFtDh9X/Di+HzicDxw== X-Received: by 2002:a2e:990c:: with SMTP id v12mr11977368lji.58.1571632530840; Sun, 20 Oct 2019 21:35:30 -0700 (PDT) MIME-Version: 1.0 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> <20191018100122.4cf12967@cakuba.netronome.com> In-Reply-To: <20191018100122.4cf12967@cakuba.netronome.com> From: Vasundhara Volam Date: Mon, 21 Oct 2019 10:05:18 +0530 Message-ID: Subject: Re: [PATCH V2 3/3] bnxt_en: Add support to collect crash dump via ethtool To: Jakub Kicinski Cc: Sheetal Tigadoli , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 18, 2019 at 10:31 PM Jakub Kicinski wrote: > > 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. Sorry not very clear. You are saying that support set_dump all the time and return error, if the config option is not enabled? If yes, I will modify the same way as it makes sense. > > > > > + 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. Okay.