From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [bpf-next PATCH v2 2/2] bpf: bpftool, add flag to allow non-compat map definitions Date: Mon, 15 Oct 2018 09:06:38 -0700 Message-ID: <20181015090638.3eca671b@cakuba.netronome.com> References: <20181015151336.9258.37606.stgit@john-Precision-Tower-5810> <20181015151753.9258.75330.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org To: John Fastabend Return-path: Received: from mail-qt1-f196.google.com ([209.85.160.196]:34536 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726525AbeJOXwf (ORCPT ); Mon, 15 Oct 2018 19:52:35 -0400 Received: by mail-qt1-f196.google.com with SMTP id o17-v6so22089819qtr.1 for ; Mon, 15 Oct 2018 09:06:43 -0700 (PDT) In-Reply-To: <20181015151753.9258.75330.stgit@john-Precision-Tower-5810> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 15 Oct 2018 08:17:53 -0700, John Fastabend wrote: > Multiple map definition structures exist and user may have non-zero > fields in their definition that are not recognized by bpftool and > libbpf. The normal behavior is to then fail loading the map. Although > this is a good default behavior users may still want to load the map > for debugging or other reasons. This patch adds a --mapcompat flag > that can be used to override the default behavior and allow loading > the map even when it has additional non-zero fields. > > For now the only user is 'bpftool prog' we can switch over other > subcommands as needed. The library exposes an API that consumes > a flags field now but I kept the original API around also in case > users of the API don't want to expose this. The flags field is an > int in case we need more control over how the API call handles > errors/features/etc in the future. > > Signed-off-by: John Fastabend No strong opinion on the functionality, but may I be a grump and again request adding the new option to completions and the man page? :)