On Fri, 2020-06-26 at 17:34 +0000, Brady, Alan wrote: > > -----Original Message----- > > From: Joe Perches <j...@perches.com> > > Sent: Thursday, June 25, 2020 7:24 PM > > To: Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>; da...@davemloft.net > > Cc: Michael, Alice <alice.mich...@intel.com>; netdev@vger.kernel.org; > > nhor...@redhat.com; sassm...@redhat.com; Brady, Alan > > <alan.br...@intel.com>; Burra, Phani R <phani.r.bu...@intel.com>; Hay, > > Joshua A <joshua.a....@intel.com>; Chittim, Madhu > > <madhu.chit...@intel.com>; Linga, Pavan Kumar > > <pavan.kumar.li...@intel.com>; Skidmore, Donald C > > <donald.c.skidm...@intel.com>; Brandeburg, Jesse > > <jesse.brandeb...@intel.com>; Samudrala, Sridhar > > <sridhar.samudr...@intel.com> > > Subject: Re: [net-next v3 04/15] iecm: Common module introduction and > > function stubs > > > > On Thu, 2020-06-25 at 19:07 -0700, Jeff Kirsher wrote: > > > From: Alice Michael <alice.mich...@intel.com> > > > > > > This introduces function stubs for the framework of the common module. > > > > trivia: > > > > > diff --git a/drivers/net/ethernet/intel/iecm/iecm_lib.c > > > b/drivers/net/ethernet/intel/iecm/iecm_lib.c > > [] > > > @@ -0,0 +1,407 @@ > > > +// SPDX-License-Identifier: GPL-2.0-only > > > +/* Copyright (C) 2020 Intel Corporation */ > > > + > > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > + > > > +#include <linux/net/intel/iecm.h> > > > + > > > +static const struct net_device_ops iecm_netdev_ops_splitq; static > > > +const struct net_device_ops iecm_netdev_ops_singleq; extern int > > > +debug; > > > > extern int debug doesn't seem like a good global name. > > > > extern int iecm_debug? > > > > Agreed, will fix. > > > > diff --git a/drivers/net/ethernet/intel/iecm/iecm_main.c > > > b/drivers/net/ethernet/intel/iecm/iecm_main.c > > [] > > > @@ -0,0 +1,47 @@ > > > +// SPDX-License-Identifier: GPL-2.0-only > > > +/* Copyright (C) 2020 Intel Corporation */ > > > + > > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > + > > > +#include <linux/net/intel/iecm.h> > > > + > > > +char iecm_drv_name[] = "iecm"; > > > +#define DRV_SUMMARY "Intel(R) Data Plane Function Linux Driver" > > > +static const char iecm_driver_string[] = DRV_SUMMARY; static const > > > +char iecm_copyright[] = "Copyright (c) 2020, Intel Corporation."; > > > + > > > +MODULE_AUTHOR("Intel Corporation, <linux.n...@intel.com>"); > > > +MODULE_DESCRIPTION(DRV_SUMMARY); MODULE_LICENSE("GPL v2"); > > > + > > > +int debug = -1; > > > > iecm_debug? > > > > Yes will fix. > > > > +module_param(debug, int, 0644); > > > +#ifndef CONFIG_DYNAMIC_DEBUG > > > +MODULE_PARM_DESC(debug, "netif level (0=none,...,16=all), hw > > > +debug_mask (0x8XXXXXXX)"); #else MODULE_PARM_DESC(debug, "netif level > > > +(0=none,...,16=all)"); #endif /* !CONFIG_DYNAMIC_DEBUG */ > > > > Are debugging levels described? > > > > > > I'm not confident I know what's being asked here. We use this module > parameter to pass into netif_msg_init for adapter->msg_enable similar to how > other Intel NIC drivers do.
Some drivers use this as a debugging "level", where the level is tested against increasing verbosity Others use a bitmap. If this is for netif_dbg, the NETIF_MSG_<FOO>_BIT enum is used.