[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200930233817.GA3996795@lunn.ch>
Date: Thu, 1 Oct 2020 01:38:17 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Johannes Berg <johannes@...solutions.net>,
Jiri Pirko <jiri@...nulli.us>,
Michal Kubecek <mkubecek@...e.cz>, dsahern@...nel.org,
pablo@...filter.org, netdev@...r.kernel.org
Subject: Re: Genetlink per cmd policies
> > > +static void genl_op_from_full(const struct genl_family *family,
> > > + unsigned int i, struct genl_ops *op)
> > > +{
> > > + memcpy(op, &family->ops[i], sizeof(*op));
> >
> > What's wrong with struct assignment? :)
> >
> > *op = family->ops[i];
>
> Code size :)
>
> text data bss dec hex
> 22657 3590 64 26311 66c7 memcpy
> 23103 3590 64 26757 6885 struct
You might want to show that to the compiler people. Did you look at
the assembly?
Andrew
Powered by blists - more mailing lists