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]
Date:	Thu, 15 Jan 2015 10:39:20 -0800
From:	Martin Lau <kafai@...com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<netdev@...r.kernel.org>, <kernel-team@...com>
Subject: Re: [PATCH RFC v2 net-next 2/2] ip_tunnel: Remove struct gro_cells

On Wed, Jan 14, 2015 at 02:53:59PM -0800, Eric Dumazet wrote:
> On Tue, 2015-01-13 at 15:42 -0800, Martin KaFai Lau wrote:
> > After adding percpu gro_cells, struct gro_cells can be removed.
> > 
> > Signed-off-by: Martin KaFai Lau <kafai@...com>
> > ---
> >  include/net/gro_cells.h  | 34 ++++++++++++++++------------------
> >  include/net/ip_tunnels.h |  2 +-
> >  net/ipv4/ip_tunnel.c     | 11 +++++------
> >  3 files changed, 22 insertions(+), 25 deletions(-)
> > 
> > diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
> > index 0f712c0..b1aeea1 100644
> > --- a/include/net/gro_cells.h
> > +++ b/include/net/gro_cells.h
> > @@ -10,21 +10,18 @@ struct gro_cell {
> >  	struct napi_struct	napi;
> >  };
> >  
> > -struct gro_cells {
> > -	struct gro_cell __percpu	*cells;
> > -};
> > -
> 
> This seems a lot of code churn for no runtime difference ?
> 
> If we ever want to add an additional 'field', we likely have to revert
> this patch.
It seems cleaning up an one item struct is unnecessary.  I
will repost without patch 2/2.

> 
> -static inline void gro_cells_destroy(struct gro_cells *gcells)
> +static inline void gro_cell_free_percpu(struct gro_cell __percpu *gcells)
>  {
>         int i;
>  
> -       if (!gcells->cells)
> +       if (IS_ERR_OR_NULL(gcells))
>                 return;
> 
> For example, I have no idea why this part is needed.
For this change:
-       err = gro_cells_init(&tunnel->gro_cells, dev);
-       if (err) {
+       tunnel->gro_cells = gro_cell_alloc_percpu(dev);
+       if (IS_ERR(tunnel->gro_cells)) {

Thanks,
--Martin
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ