From: John Fastabend <john.fastabend@gmail.com>
To: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
"David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next 0/2] sockmap: fix sg api usage
Date: Thu, 29 Mar 2018 20:39:01 -0700 [thread overview]
Message-ID: <c6a67c22-cf2f-1669-d22e-5e237afd6f6e@gmail.com> (raw)
In-Reply-To: <20180330002100.5724-1-bhole_prashant_q7@lab.ntt.co.jp>
On 03/29/2018 05:20 PM, Prashant Bhole wrote:
> These patches fix sg api usage in sockmap. Previously sockmap didn't
> use sg_init_table(), which caused hitting BUG_ON in sg api, when
> CONFIG_DEBUG_SG is enabled
>
> v1: added sg_init_table() calls wherever needed.
>
> v2:
> - Patch1 adds new helper function in sg api. sg_init_marker()
> - Patch2 sg_init_marker() and sg_init_table() in appropriate places
>
> Backgroud:
> While reviewing v1, John Fastabend raised a valid point about
> unnecessary memset in sg_init_table() because sockmap uses sg table
> which embedded in a struct. As enclosing struct is zeroed out, there
> is unnecessary memset in sg_init_table.
>
> So Daniel Borkmann suggested to define another static inline function
> in scatterlist.h which only initializes sg_magic. Also this function
> will be called from sg_init_table. From this suggestion I defined a
> function sg_init_marker() which sets sg_magic and calls sg_mark_end()
>
Series looks good to me thanks for finding and fixing this!
next prev parent reply other threads:[~2018-03-30 3:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 0:20 [PATCH v2 bpf-next 0/2] sockmap: fix sg api usage Prashant Bhole
2018-03-30 0:20 ` [PATCH v2 bpf-next 1/2] lib/scatterlist: add sg_init_marker() helper Prashant Bhole
2018-03-30 3:38 ` John Fastabend
2018-03-30 0:21 ` [PATCH v2 bpf-next 2/2] bpf: sockmap: initialize sg table entries properly Prashant Bhole
2018-03-30 3:37 ` John Fastabend
2018-03-30 3:39 ` John Fastabend [this message]
2018-03-30 20:52 ` [PATCH v2 bpf-next 0/2] sockmap: fix sg api usage Daniel Borkmann
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=c6a67c22-cf2f-1669-d22e-5e237afd6f6e@gmail.com \
--to=john.fastabend@gmail.com \
--cc=ast@kernel.org \
--cc=bhole_prashant_q7@lab.ntt.co.jp \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--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