linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Karim Eshapa <karim.eshapa@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: bpf: Change structure passing and assignment
Date: Sat, 13 Jan 2018 08:24:41 -0800	[thread overview]
Message-ID: <20180113162439.jfsxlotivq3wncmu@ast-mbp> (raw)
In-Reply-To: <1515847339-4712-1-git-send-email-karim.eshapa@gmail.com>

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 ?

      reply	other threads:[~2018-01-13 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-13 12:42 bpf: Change structure passing and assignment Karim Eshapa
2018-01-13 16:24 ` Alexei Starovoitov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180113162439.jfsxlotivq3wncmu@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=karim.eshapa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).