[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180113162439.jfsxlotivq3wncmu@ast-mbp>
Date: Sat, 13 Jan 2018 08:24:41 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Karim Eshapa <karim.eshapa@...il.com>
Cc: ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: bpf: Change structure passing and assignment
On Sat, Jan 13, 2018 at 02:42:19PM +0200, Karim Eshapa wrote:
> I noticed that most of functions here have structure arguements and return structure, all these structures passed and returned are delt in passing and assignment like memcpy a structure.In addition it takes size in stack while passing. so why not we use pointers to structure as argumentsor there is actual need to do such things and you intentionaly want to deal with copies of strucuteres.
> ex:
> struct tnum tnum_add(struct tnum a, struct tnum b)
and how an alternative for the above would look like with pointers ?
Powered by blists - more mailing lists