From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [bpf-next PATCH v3 2/2] bpf: bpftool, add flag to allow non-compat map definitions Date: Mon, 15 Oct 2018 11:26:35 -0700 Message-ID: <20181015112635.0e70a3ac@cakuba.netronome.com> References: <20181015181857.8673.46183.stgit@john-Precision-Tower-5810> <20181015181955.8673.75006.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-f193.google.com ([209.85.160.193]:44338 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbeJPCNC (ORCPT ); Mon, 15 Oct 2018 22:13:02 -0400 Received: by mail-qt1-f193.google.com with SMTP id c56-v6so22604557qtd.11 for ; Mon, 15 Oct 2018 11:26:39 -0700 (PDT) In-Reply-To: <20181015181955.8673.75006.stgit@john-Precision-Tower-5810> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 15 Oct 2018 11:19:55 -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 Acked-by: Jakub Kicinski Thank you!