From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [PATCH v2 bpf-next 1/2] lib/scatterlist: add sg_init_marker() helper Date: Thu, 29 Mar 2018 20:38:36 -0700 Message-ID: References: <20180330002100.5724-1-bhole_prashant_q7@lab.ntt.co.jp> <20180330002100.5724-2-bhole_prashant_q7@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Prashant Bhole , Daniel Borkmann , Alexei Starovoitov , "David S . Miller" Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:41534 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbeC3Dir (ORCPT ); Thu, 29 Mar 2018 23:38:47 -0400 Received: by mail-pg0-f68.google.com with SMTP id t10so4339052pgv.8 for ; Thu, 29 Mar 2018 20:38:47 -0700 (PDT) In-Reply-To: <20180330002100.5724-2-bhole_prashant_q7@lab.ntt.co.jp> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 03/29/2018 05:20 PM, Prashant Bhole wrote: > sg_init_marker initializes sg_magic in the sg table and calls > sg_mark_end() on the last entry of the table. This can be useful to > avoid memset in sg_init_table() when scatterlist is already zeroed out > > For example: when scatterlist is embedded inside other struct and that > container struct is zeroed out > > Suggested-by: Daniel Borkmann > Signed-off-by: Prashant Bhole > --- Acked-by: John Fastabend