lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BYAPR18MB2791C29DA828893C9B9A1F5FA0A31@BYAPR18MB2791.namprd18.prod.outlook.com>
Date:   Tue, 19 Jan 2021 08:57:10 +0000
From:   Srujana Challa <schalla@...vell.com>
To:     Saeed Mahameed <saeed@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
        Suheil Chandran <schandran@...vell.com>,
        "Narayana Prasad Raju Athreya" <pathreya@...vell.com>,
        Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
        Mahipal Challa <mchalla@...vell.com>
Subject: RE: [EXT] Re: [PATCH net-next,2/3] octeontx2-af: Add support for CPT1
 in debugfs

> On Wed, 2021-01-13 at 20:50 +0530, Srujana Challa wrote:
> > Adds support to display block CPT1 stats at
> > "/sys/kernel/debug/octeontx2/cpt1".
> >
> > Signed-off-by: Mahipal Challa <mchalla@...vell.com>
> > Signed-off-by: Srujana Challa <schalla@...vell.com>
> > ---
> >  .../marvell/octeontx2/af/rvu_debugfs.c        | 45 +++++++++++----
> > ----
> >  1 file changed, 26 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> > b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> > index d27543c1a166..158876366dd3 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> > @@ -1904,6 +1904,18 @@ static void rvu_dbg_npc_init(struct rvu *rvu)
> > }
> >
> >  /* CPT debugfs APIs */
> > +static int cpt_get_blkaddr(struct seq_file *filp) {
> > +	struct dentry *current_dir;
> > +	int blkaddr;
> > +
> > +	current_dir = filp->file->f_path.dentry->d_parent;
> > +	blkaddr = (!strcmp(current_dir->d_name.name, "cpt1") ?
> > +			   BLKADDR_CPT1 : BLKADDR_CPT0);
> > +
> 
> This is very fragile piece of code! it assumes static debugfs directory structure
> and naming, why don't you store the CPT context in the sqe_file private ? as
> you already have in rvu_dbg_nix_init  for nix_hw type
> 
Okay, I will do the changes accordingly and submit next version.
Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ