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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170629081457.GC29453@vergenet.net>
Date:   Thu, 29 Jun 2017 10:14:58 +0200
From:   Simon Horman <simon.horman@...ronome.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        oss-drivers@...ronome.com,
        Pieter Jansen van Vuuren 
        <pieter.jansenvanvuuren@...ronome.com>
Subject: Re: [oss-drivers] Re: [PATCH net-next v2 8/9] nfp: add a stats
 handler for flower offloads

On Wed, Jun 28, 2017 at 06:28:17PM -0700, Jakub Kicinski wrote:
> On Wed, 28 Jun 2017 22:30:01 +0200, Simon Horman wrote:
> > @@ -288,7 +292,21 @@ nfp_flower_del_offload(struct nfp_app *app, struct net_device *netdev,
> >  static int
> >  nfp_flower_get_stats(struct nfp_app *app, struct tc_cls_flower_offload *flow)
> >  {
> > -	return -EOPNOTSUPP;
> > +	struct nfp_fl_payload *nfp_flow;
> > +
> > +	nfp_flow = nfp_flower_find_in_fl_table(app, flow->cookie);
> > +	if (!nfp_flow)
> > +		return -EINVAL;
> > +
> > +	spin_lock(&nfp_flow->lock);
> > +	tcf_exts_stats_update(flow->exts, nfp_flow->stats.bytes,
> > +			      nfp_flow->stats.pkts, nfp_flow->stats.used);
> > +
> > +	nfp_flow->stats.pkts = 0;
> > +	nfp_flow->stats.bytes = 0;
> > +	spin_unlock(&nfp_flow->lock);
> > +
> > +	return 0;
> >  }
> 
> This needs to take spin_lock_bh() to lock out the RX path safely :(

Sorry about that, will fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ