linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karim Eshapa <karim.eshapa@gmail.com>
To: ast@kernel.org
Cc: daniel@iogearbox.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: bpf: Change structure passing and assignment
Date: Sat, 13 Jan 2018 14:42:19 +0200	[thread overview]
Message-ID: <1515847339-4712-1-git-send-email-karim.eshapa@gmail.com> (raw)

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

             reply	other threads:[~2018-01-13 12:42 UTC|newest]

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

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=1515847339-4712-1-git-send-email-karim.eshapa@gmail.com \
    --to=karim.eshapa@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --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).