DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	John Griffin <john.griffin@intel.com>,
	"Deepak Kumar Jain" <deepak.k.jain@intel.com>,
	"John Daley (johndale)" <johndale@cisco.com>,
	Alfredo Cardigliano <cardigliano@ntop.org>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	"Viacheslav Ovsiienko" <viacheslavo@mellanox.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	David Marchand <david.marchand@redhat.com>,
	 Thomas Monjalon <thomas@monjalon.net>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH v2] log: add API to check if a logtype can log in a given level
Date: Wed, 4 Mar 2020 07:50:24 +0000	[thread overview]
Message-ID: <DM6PR11MB2745E6729C33CE137CB7BF83BFE50@DM6PR11MB2745.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200303181817.3448334-1-ferruh.yigit@intel.com>

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, March 4, 2020 3:18 AM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>; Sachin Saxena
> <sachin.saxena@nxp.com>; Fiona Trahe <fiona.trahe@intel.com>; John
> Griffin <john.griffin@intel.com>; Deepak Kumar Jain
> <deepak.k.jain@intel.com>; John Daley (johndale) <johndale@cisco.com>;
> Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>; Alfredo Cardigliano
> <cardigliano@ntop.org>; Matan Azrad <matan@mellanox.com>; Shahaf
> Shuler <shahafs@mellanox.com>; Viacheslav Ovsiienko
> <viacheslavo@mellanox.com>; Bernard Iremonger
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@intel.com>; David Marchand
> <david.marchand@redhat.com>; Thomas Monjalon
> <thomas@monjalon.net>; Stephen Hemminger
> <stephen@networkplumber.org>
> Subject: [PATCH v2] log: add API to check if a logtype can log in a given level
> 
> This is a helper function in case components would like to do more work
> than just logging a message based on log level, like for example
> collecting some stats if the log type is DEBUG etc..
> 
> A few existing relevant usage converted to this new API.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: David Marchand <david.marchand@redhat.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> 
> v2:
> * Convert API return type to 'bool'. Removed custom definitions from
>   'ionic' PMD for this.
> ---
>  drivers/bus/fslmc/fslmc_bus.c                |  7 +------
>  drivers/common/qat/qat_logs.c                |  7 ++-----
>  drivers/net/enic/enic_fm_flow.c              |  2 +-
>  drivers/net/ionic/ionic_osdep.h              |  6 ------
>  drivers/net/mlx5/mlx5_mr.c                   |  2 +-
>  lib/librte_eal/common/eal_common_log.c       | 18 ++++++++++++++++++
>  lib/librte_eal/common/include/rte_log.h      | 14 ++++++++++++++
>  lib/librte_eal/rte_eal_version.map           |  3 +++
>  lib/librte_flow_classify/rte_flow_classify.c |  7 ++-----
>  9 files changed, 42 insertions(+), 24 deletions(-)
> 
[...]
> diff --git a/drivers/net/enic/enic_fm_flow.c
> b/drivers/net/enic/enic_fm_flow.c
> index c0ddfe9ba..d815f369e 100644
> --- a/drivers/net/enic/enic_fm_flow.c
> +++ b/drivers/net/enic/enic_fm_flow.c
> @@ -1504,7 +1504,7 @@ enic_fm_dump_tcam_entry(const struct
> fm_tcam_match_entry *fm_match,
>  			const struct fm_action *fm_action,
>  			uint8_t ingress)
>  {
> -	if (rte_log_get_level(enic_pmd_logtype) < (int)RTE_LOG_DEBUG)
> +	if (!rte_log_can_log(enic_pmd_logtype, RTE_LOG_DEBUG))
>  		return;
>  	enic_fm_dump_tcam_match(fm_match, ingress);
>  	enic_fm_dump_tcam_actions(fm_action);

For enic,

Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Thanks..
-Hyong


  reply	other threads:[~2020-03-04  7:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 13:25 [dpdk-dev] [PATCH] " Ferruh Yigit
2020-03-03 16:02 ` Stephen Hemminger
2020-03-03 16:15   ` Ferruh Yigit
2020-03-03 18:18 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-03-04  7:50   ` Hyong Youb Kim (hyonkim) [this message]
2020-03-04  8:41   ` Hemant Agrawal (OSS)
2020-03-12 13:41   ` David Marchand
2020-03-12 14:52     ` Ferruh Yigit
2020-03-13 14:51   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-03-26 14:04     ` Andrzej Ostruszka
2020-03-27 10:23     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB2745E6729C33CE137CB7BF83BFE50@DM6PR11MB2745.namprd11.prod.outlook.com \
    --to=hyonkim@cisco.com \
    --cc=bernard.iremonger@intel.com \
    --cc=cardigliano@ntop.org \
    --cc=david.marchand@redhat.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=fiona.trahe@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=john.griffin@intel.com \
    --cc=johndale@cisco.com \
    --cc=matan@mellanox.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shahafs@mellanox.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).