linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bpf: Change structure passing and assignment
@ 2018-01-13 12:42 Karim Eshapa
  2018-01-13 16:24 ` Alexei Starovoitov
  0 siblings, 1 reply; 2+ messages in thread
From: Karim Eshapa @ 2018-01-13 12:42 UTC (permalink / raw)
  To: ast; +Cc: daniel, netdev, linux-kernel

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)
{

}

Thanks,
Karim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-13 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 12:42 bpf: Change structure passing and assignment Karim Eshapa
2018-01-13 16:24 ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).