Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751748AbdL0C1g (ORCPT ); Tue, 26 Dec 2017 21:27:36 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:36962 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdL0C1f (ORCPT ); Tue, 26 Dec 2017 21:27:35 -0500 X-Google-Smtp-Source: ACJfBouZOb+IkjMdGBhHOLhxFIrDcW1fiBYb2UzNgPdAexhbzxjH1eEqqHEaxNY+5+1w54RaBBRxGw== Date: Tue, 26 Dec 2017 18:27:31 -0800 From: Alexei Starovoitov To: Eric Leblond Cc: netdev@vger.kernel.org, daniel@iogearbox.net, linux-kernel@vger.kernel.org, ast@kernel.org Subject: Re: [PATCH bpf-next 2/3] libbpf: add error reporting in XDP Message-ID: <20171227022730.y27gwva2u2ilyrul@ast-mbp> References: <20171225221325.9680-1-eric@regit.org> <20171225221325.9680-3-eric@regit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171225221325.9680-3-eric@regit.org> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 33 On Mon, Dec 25, 2017 at 11:13:24PM +0100, Eric Leblond wrote: > Parse netlink ext attribute to get the error message returned by > the card. > > Signed-off-by: Eric Leblond ... > diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c > new file mode 100644 > index 000000000000..962de14f74e3 > --- /dev/null > +++ b/tools/lib/bpf/nlattr.c > @@ -0,0 +1,188 @@ > + > +/* > + * NETLINK Netlink attributes > + * > + * Authors: Thomas Graf > + * Alexey Kuznetsov > + */ ... > diff --git a/tools/lib/bpf/nlattr.h b/tools/lib/bpf/nlattr.h > new file mode 100644 > index 000000000000..b95f3e64c14d > --- /dev/null > +++ b/tools/lib/bpf/nlattr.h > @@ -0,0 +1,164 @@ > +#ifndef __NLATTR_H > +#define __NLATTR_H Every file in kernel repo has to have SPDX license identifier. Also note that tools/lib/bpf is LGPL whereas _if_ you're copying these functions from kernel lib/nlattr.c then it's GPL which we cannot mix. Probably easier to copy from libnl instead which is LGPL.