public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: stephen@networkplumber.org (Stephen Hemminger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] xdp: Sample xdp program implementing ip forward
Date: Tue, 10 Oct 2017 10:21:22 -0700	[thread overview]
Message-ID: <20171010102122.6ca1e756@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1507620532-25804-2-git-send-email-Christina.Jacob@cavium.com>

On Tue, 10 Oct 2017 12:58:52 +0530
Christina Jacob <christina.jacob.koikara@gmail.com> wrote:

> +		bzero(&route, sizeof(route));
> +		bzero(dsts, sizeof(dsts));
> +		bzero(dsts_len, sizeof(dsts_len));
> +		bzero(gws, sizeof(gws));
> +		bzero(ifs, sizeof(ifs));
> +		bzero(&route, sizeof(route));

This is all unnecessary.
It looks like you write OpenBSD security code.
Only a security person would zero stack variables before return
and only BSD people use bzero(), Linux style is to use memset.

  parent reply	other threads:[~2017-10-10 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10  7:28 [PATCH v2] XDP Program for Ip forward Christina Jacob
2017-10-10  7:28 ` [PATCH v2] xdp: Sample xdp program implementing ip forward Christina Jacob
2017-10-10 17:19   ` Stephen Hemminger
2017-10-10 21:37     ` David Daney
2017-10-28 13:37       ` Christina Jacob
2017-10-10 17:21   ` Stephen Hemminger [this message]
2017-10-10 19:06   ` Jesper Dangaard Brouer
2017-10-11 10:08     ` David Laight
2017-10-10 13:12 ` [PATCH v2] XDP Program for Ip forward Jesper Dangaard Brouer
2017-10-10 14:00   ` Jesper Dangaard Brouer
2017-10-11 17:06     ` Christina Jacob

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=20171010102122.6ca1e756@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=linux-arm-kernel@lists.infradead.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