Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2361200rwd; Mon, 15 May 2023 10:32:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mDAs5eRpuh21fSHCrz1XbeNjuwxLRgOv/6HhmdK+nsut0AGWFrA7pTqxCoovKD4VyCz7N X-Received: by 2002:a17:90a:bb0a:b0:250:9aee:563c with SMTP id u10-20020a17090abb0a00b002509aee563cmr24453665pjr.41.1684171928804; Mon, 15 May 2023 10:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684171928; cv=none; d=google.com; s=arc-20160816; b=vW3yvNswGCBYxNgf4KG0mhuc+kPoAj2NliIPpnSJLw43Bl7TfVH/Y+K+pSZOxenj8D EZUeqSU3dqZfpl043plJTcSTQ9ao5c/+akOy+UQuRVl+lzCN8990k0zbB6H4ZR1D0kpG 6jcv1UJynko4rtWdNqAYZDyFoHG9Rp6cU3lY2ZShv46BFvYFGRuTgrn7SC+dDPsWIjgF lTK7dRFL7qIXric4nPbHfGT1lyesoKDtxrDCF3wox557KfHeGxUyqw7ZvVicjZV356o/ F5jrKfAyZQlrk5Pzssat23xiIlaWJ5Wm7NfdXpL+MIzn4g++RDX9GQ7cC5aSRAFcsl9G 46kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ryd2XuUTtCTZE/0WdYTs96h3cJ4tdizQ3n9bS7GhAmI=; b=UsFFoMmzaKrOghJYfPKoPsbcUrZDXqCBPTefihw1vQN+zZ0f1r8SYo+5u5dmeOHqX4 3igQnrOQYwqHYZIEpXPPDxvODmD13AA6B2MxbbdRKj5+ARw+U2nms2MvSMtzSnfdJlyu zWoWIezb35KydfDlnCwoCZjniLJxz+NXRjP1/R4nXInjnwZ0FrfW4UnuRIpny4y/Z6oY aWCfbly8RC4ksfPUNoy5AtSDIN+LP7vdexI5Q7f5wmIhDp30cIUPnf5Q4d/dfNww0WZ2 OXLxvqjLtdxBQEJTL+NG+SPitCgIkX/Cw9N5arBaZmSShSLbHRSkm2tWlwY0K5XNeB8b Z8Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b=dlfa3ZGj; 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=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a17090a1a4800b0025014cb905esi33108pjl.126.2023.05.15.10.31.56; Mon, 15 May 2023 10:32:08 -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=@isovalent.com header.s=google header.b=dlfa3ZGj; 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=NONE sp=NONE dis=NONE) header.from=isovalent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243160AbjEOQzx (ORCPT + 99 others); Mon, 15 May 2023 12:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243143AbjEOQzw (ORCPT ); Mon, 15 May 2023 12:55:52 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12CF7280 for ; Mon, 15 May 2023 09:55:44 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-30771c68a9eso12284925f8f.2 for ; Mon, 15 May 2023 09:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent.com; s=google; t=1684169743; x=1686761743; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ryd2XuUTtCTZE/0WdYTs96h3cJ4tdizQ3n9bS7GhAmI=; b=dlfa3ZGjEGaCrxf907QCFTx1SXYssEwAqw6spdwq6uTfCnAOF+Mrvr+oTFwO6cR4g2 64ZgOhCESXHvSZY447Wy3MvM+2dfBejZCnS/6rVsE7tFX3/Rnq4n1bNQCi8Pth/hxrB0 +sKEU0fpR4kwVbciPBVh1Hp/T+RwJTovfUL83RK/PDO0PXSLJFfnYFZFxWeOzB5CSv/U IaMeYU2g2ARifC42ufQCiWUMs+81cB4ZjyeGrt+zjMV6sxXyEwstEV4cwX/IZ8AuI19a +M4zCCt1AqPXLmQAeMI7dxpybFcGTBitilkVa7A+9quYsmOf4QCC1SS3ajNMzQFa1D0N +z2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684169743; x=1686761743; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ryd2XuUTtCTZE/0WdYTs96h3cJ4tdizQ3n9bS7GhAmI=; b=DRCA8eSK7MdWp/VMnRfnPFpkaZInv5N6PC4cNOlzIIWP658JV5TIl6PxannYVy9sx2 YNwaXxNNkMvMTMmDFioTrZ82sazM5j/IwedQqiv47AUrrLgFop2wxVT2islfp6pzo4QE UanrA4fglKgoXPl71q+ox6cDRqXEbFp6v+eDOpHBgMHOxHBv4IKRnRQBXC2Zify1MoBJ tAqxVrSFxfsJadFJsU9RYJLFLGPe+U3uQLgE6SD0WuCdclWNETQpItD52WqcZQoasQ1Y tpBoTzwSq9EEUkVfiLLmtKNjm+sRX/byMcecmUHDRzT6ae4a/avALP+qQ+GeD53lopr4 CH5Q== X-Gm-Message-State: AC+VfDw9MCghcnsjidbVO68CWAEetb99V5hy2QYDOkHYqHgsECL8Xfur xsvU1Zdm2T3o/gqEXP5B0HIo5A== X-Received: by 2002:a5d:51c3:0:b0:2f6:bf04:c8cc with SMTP id n3-20020a5d51c3000000b002f6bf04c8ccmr21896932wrv.55.1684169743166; Mon, 15 May 2023 09:55:43 -0700 (PDT) Received: from ?IPV6:2a02:8011:e80c:0:9cdc:e9dc:864d:1455? ([2a02:8011:e80c:0:9cdc:e9dc:864d:1455]) by smtp.gmail.com with ESMTPSA id j17-20020adff551000000b003090cb7a9e6sm334293wrp.31.2023.05.15.09.55.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 09:55:42 -0700 (PDT) Message-ID: Date: Mon, 15 May 2023 17:55:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH bpf-next] bpftool: specify XDP Hints ifname when loading program Content-Language: en-GB To: =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Larysa Zaremba Cc: Stanislav Fomichev , 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 References: <20230511151345.7529-1-larysa.zaremba@intel.com> From: Quentin Monnet In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2023-05-15 18:30 UTC+0200 ~ Niklas Söderlund > On 2023-05-12 15:36:47 +0200, Larysa Zaremba wrote: >> [You don't often get email from larysa.zaremba@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] >> >> On Fri, May 12, 2023 at 11:23:00AM +0100, Quentin Monnet wrote: >>> 2023-05-11 17:13 UTC+0200 ~ Larysa Zaremba >>>> Add ability to specify a network interface used to resolve >>>> XDP Hints kfuncs when loading program through bpftool. >>>> >>>> Usage: >>>> bpftool prog load dev xdpmeta >>> >>> Thanks for this patch! >>> >>> Regarding the command-line syntax, I'm not a big fan of the optional >>> sub-keyword for the device for XDP hints. I must admit I had not >>> anticipated other another use for the "dev" keyword. Instead, have you >>> considered one of the following: >>> >>> 1) Adding a different keyword ("xdpmeta_dev"?) and making it >>> incompatible with "dev" >>> >>> 2) Another alternative would be adding a sub-keyword for offload too: >>> >>> bpftool p l [...] dev <[offload | xdpmeta ]> >>> >>> If the ifname is provided with no sub-keyword, we would consider it for >>> offload for legacy support, possibly warn that the syntax is deprecated. >>> >>> What do you think? >>> >> >> I think first option would look a little bit nicer, but I like the idea to >> deprecate "dev ". In my current version, forgetting to add "xdpmeta" >> resulted in not very descriptive errors, this may confuse new users. So what >> about: > > I agree the first option looks a little bit nicer, but I think both > options would work. > >> >> bpftool prog load [...] xdpmeta_dev/offload_dev >> >> "dev " syntax would still work, but with a big warning, like this: >> >> 'bpftool prog [...] dev ' syntax is deprecated. Going further, please >> use 'offload_dev ' to offload program to device. For XDP hints >> applications, use 'xdpmeta_dev '. OK let's go with this Thanks, Quentin