Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1240170imw; Wed, 13 Jul 2022 16:28:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vH/PDrjBXnoeOGMVOZy2VssxU4ufoRDwMu9MLbT5wPmGsoaTgm0Bp021v27XUYRqid1vea X-Received: by 2002:a05:6402:d05:b0:425:b7ab:776e with SMTP id eb5-20020a0564020d0500b00425b7ab776emr8726681edb.142.1657754883612; Wed, 13 Jul 2022 16:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657754883; cv=none; d=google.com; s=arc-20160816; b=uqFfPxCat0SQOyA0yDsajW3+HFbvD/T1OHJ9gsl5QJyIc1uYFGSwa+PwxUpdTyBRRa bQMOz1jZm4LgARGhKZz9ffjEt50RCYE5h0E6TLAZdktsaTnHYLgmoSGxg7MpGkqyp6Up wQ7sO6Yi+D22517Qep/T8Kf+Bxzh98mIkracUNXsTYpW0dgNzvR4kZOKTDF73V2X2MGt nZiTAcQ31e2OgXZ9iJS0R9ANGw3VulfxrX+ss0xVFSPAoxY3MKJWwKyht/UVQNRoUM4f 9J209UpMqhvofnc5ao1Ts4GLmL17C3L99a+MZu/MRV+DP3j1ehD7WBCqBsioHMadmVbC r3dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7OSuSJ52wcTOUMRocdLRtm5methg8M/tEQfwjrfRjyU=; b=r/nAKYzPjtFGWZe2ZRrhnmHAzXRpKYHYosEpOoJMMQ/SlBGYifMpXPzicOlFd3RT5a 5/G9ITkarq5KGS+i8yE08SvRLXQcub4M7qW0298ANQaO9tewea4jIc9MA0zP8V7mS6sK r8dTgo16SglJkxYpO+ImJcQEwXjTTwESvGaTOP0/krKtmrGxmiQPnvePw1HlZIzhynAv t8GKWQmhS9a4NbUDu8pC3Ji8YaMx5rUgmLnJ9eFkSpH9xU2MLC+aLXBzNQA5zq33f0U8 j9medKLDH1nTwdqLMDKPHYzsV33tDGikKl4X0N8p/eccnj12QuXKEr5MC7O7FKyCY2Qd h0sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EX0eIDTD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a05640235d200b0043a6f623f9dsi41810edc.376.2022.07.13.16.27.35; Wed, 13 Jul 2022 16:28:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EX0eIDTD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbiGMXCL (ORCPT + 99 others); Wed, 13 Jul 2022 19:02:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbiGMXCI (ORCPT ); Wed, 13 Jul 2022 19:02:08 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD17F2B1AD for ; Wed, 13 Jul 2022 16:02:06 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id r3so344776ybr.6 for ; Wed, 13 Jul 2022 16:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7OSuSJ52wcTOUMRocdLRtm5methg8M/tEQfwjrfRjyU=; b=EX0eIDTDv6Op2NFyQjnDuL3ygkxwpxc10ZsVRZ9ZEnjSS6oiGUeLDkvI1GSJwQt9Ch KPAhOHA0QidwpyzycO4aCctC/tsY2FchXz8+5pM/yMBZjW8fQlx4utnOpkeGfwz4OkXi raDunL8HcgKouLi8O/KOdqAMJZpKWT/cgMkEeQmZlfNyZ+rr9hBfcS4NLKzjkNW2WDcQ +UH4Gbx75sWaNPaH5WRQUkyZ8qWVipA8wMUwZU9rFL29p3LxFIeyLQM6XFojw1/LZIEg ed1XNXEmtuC5zb0JmErjZWEAtz92nWbpJh//plAe1ba+irJa35poeGnhpFc5N0LE1Lkc z5FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7OSuSJ52wcTOUMRocdLRtm5methg8M/tEQfwjrfRjyU=; b=h6OHwJZOqQm8f0o+81Y2SMgOha5Rd+JmLnUNQEhYNfHGtuxVVMkdfYOZYTLucbFG7r Y6eKTk0CM4I7sS/SyBcoS1yg1SfoH+Ieg+PsIGtzoV5AKAWWwr/RhUV5UeJrM5JJ3utT M1Ka2G3PNPTpVH7HXQBsDX+fK9CRPVTdz60g6CicxEGFX8h+EwCVyh9uHVFDIaFCNa7I MaqszCFDQuRNpOWZFbTZ+ctHjaY2Di+uOKe3UiXIqimijpZwRq+zku/wmmQijea89jrZ kfOuQRaqLaoSg8tOVFvCMnlTz7dOiHMJlaaOvrBcGU9IXQdzJeXZNO8GpTYB5QvXWbkH RGUQ== X-Gm-Message-State: AJIora/CZd9KdJ+GFKo4ta2f8sEL6o2C7KtkjW+DdCX27v97HDyXHAzc ps+IWLmRJU4XpcuzOb1EES0fIzQb+n/9bOg25QKKEQ== X-Received: by 2002:a25:8b02:0:b0:66e:239a:8f69 with SMTP id i2-20020a258b02000000b0066e239a8f69mr6060934ybl.4.1657753325788; Wed, 13 Jul 2022 16:02:05 -0700 (PDT) MIME-Version: 1.0 References: <20220713214246.2545204-1-jevburton.kernel@gmail.com> In-Reply-To: From: Stanislav Fomichev Date: Wed, 13 Jul 2022 16:01:55 -0700 Message-ID: Subject: Re: [PATCH bpf-next] libbpf: Add bpf_map__set_name() To: Joe Burton Cc: Joe Burton , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 13, 2022 at 3:32 PM Joe Burton wrote: > > > Asked you internally, but not sure I follow. Can you share more on why > > the following won't fix it for us: > > > > https://lore.kernel.org/bpf/OSZP286MB1725CEA1C95C5CB8E7CCC53FB8869@OSZP286MB1725.JPNP286.PROD.OUTLOOK.COM/ > > > > ? > > > > The idea seems to be to get the supplied map name (from the obj) > > instead of using pin name? So why is it not enough? > > You're correct, this approach also resolves the issue. No need for this > new API. SG! New helper might still be useful, but I'm not sure how safe that is, given how much we use the name internally in libbpf (name/pin_path). So it might be safer to use Anquan's approach for now. Andrii, any concerns with [1] ? Should we pull that in? [1] https://lore.kernel.org/bpf/OSZP286MB1725CEA1C95C5CB8E7CCC53FB8869@OSZP286MB1725.JPNP286.PROD.OUTLOOK.COM/