Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751435AbdLIRtq (ORCPT ); Sat, 9 Dec 2017 12:49:46 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:34253 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbdLIRtm (ORCPT ); Sat, 9 Dec 2017 12:49:42 -0500 X-Google-Smtp-Source: AGs4zMYeTwet19ntNs3aiiptcQiTUtI+GcoIZGFTfYfPHBn0SmvjDCuxhExmYIPbjab5Ax4OIZmLKw== Date: Sat, 9 Dec 2017 09:49:38 -0800 From: Alexei Starovoitov To: David Ahern Cc: Eric Leblond , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net Subject: Re: [PATCH net-next] libbpf: add function to setup XDP Message-ID: <20171209174936.o7jpoptuwisvjx3n@ast-mbp> References: <20171209144315.25890-1-eric@regit.org> <446f0215-542c-d482-109b-20149a7ff28f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <446f0215-542c-d482-109b-20149a7ff28f@gmail.com> 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: 741 Lines: 17 On Sat, Dec 09, 2017 at 09:34:46AM -0700, David Ahern wrote: > On 12/9/17 7:43 AM, Eric Leblond wrote: > > + /* started nested attribute for XDP */ > > + nla = (struct nlattr *)(((char *)&req) > > + + NLMSG_ALIGN(req.nh.nlmsg_len)); > > + nla->nla_type = NLA_F_NESTED | 43/*IFLA_XDP*/; > > as a part of the move into libbpf can the magic numbers be replaced by > the names directly and there as a comment? In general it would be nice to use names instead of numbers, but it's much bigger change then this patch, since it would require copying and syncing a bunch of headers into tools/ which may not be such a good idea in the end. Only removal of min() looks a bit suspicious to me. Eric, is it because it now comes from some header?