From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29431C61DA4 for ; Tue, 31 Jan 2023 00:06:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjAaAGq (ORCPT ); Mon, 30 Jan 2023 19:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjAaAGp (ORCPT ); Mon, 30 Jan 2023 19:06:45 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4D982693 for ; Mon, 30 Jan 2023 16:06:44 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id r8so6543877pls.2 for ; Mon, 30 Jan 2023 16:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=kIqsJLtgi1QoB5xi755afXKVgL09KTFlhyw/V69RD8k=; b=S8+gABX5M4lAX7eqetzDmbbHjXgMlA+sfa9/iOca0NwVF8D6sXkq0dZtAYGJgPhxc6 tuDYj80y04WarGHCpn6XkdINzY2AZMVqfQpIoxKdlwDsj8cXzRIjmIK/KF3uIsIX+MAL DLUpv90MwOa+XsMwqqHSM68xnYNgwu3yDzj4N2wt6/IHSQRL/nxM4VNT7lbOcZtJZXZ4 m2ZP3EtwI4rm8dH+tpn+G1orDR7HpTDBBa8PdBXum63HLCUCDPZU/2IOihvGt86p1MY/ vPbr6Iyl5To2kO/9R7S7LQYuIYAz9WNPTaWgPjzRG6QvfkD3eDOtkMQAbY1sgN7DFzy3 /Wtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kIqsJLtgi1QoB5xi755afXKVgL09KTFlhyw/V69RD8k=; b=0gIL9WaDK82ya+PvQGW/qv2nS9lYGPINxw2RPqNgCbj7Jz9Llvkj66FtA/bwUYqmr5 XUNp3Zaq/WPnAF+gC5zlTVKI6yDCM8QOQp6V9PjeHU3evmiFpGMwU8J/bvys9J0/UqIv 5FjG7bpS3NPRCRLkjsMENO4Y/DfSAFtn7bB6fAqhY/S64QoXvkuofued+vAIk9olVUXk 6IoXquQbuIWhObiB5LE1e293Plqhaqlxh6fu7Qn+8CkPf/2aLtTs5LcTF40tbF72wA/W ZZ7MQUraZIPDSq7DE4U7K8Ac/DmVu9Rp5n5wNz7XXdckA4D6Nr45J6R0N8RMS0jaj62y jcbA== X-Gm-Message-State: AO0yUKURbtu5fVD4mCoVQ+iRn8hFKCyM+7e4DqjMg8NhsVS6Hda/iFqf U2d125kgm9QVWZH0KgybA64= X-Google-Smtp-Source: AK7set/VOmtB9fy9DwqWdaX/SddKrmICTvbBmw2ecidN56jm1AXxi1/Fs6kbHns7RSoZtdRUQS7U9Q== X-Received: by 2002:a17:903:124a:b0:192:ad82:dc98 with SMTP id u10-20020a170903124a00b00192ad82dc98mr12465992plh.34.1675123604164; Mon, 30 Jan 2023 16:06:44 -0800 (PST) Received: from localhost ([98.97.45.87]) by smtp.gmail.com with ESMTPSA id jc17-20020a17090325d100b001949b92f8a8sm5583050plb.279.2023.01.30.16.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 16:06:43 -0800 (PST) Date: Mon, 30 Jan 2023 16:06:41 -0800 From: John Fastabend To: "Singhai, Anjali" , Jamal Hadi Salim , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: John Fastabend , Jamal Hadi Salim , Jiri Pirko , Willem de Bruijn , Stanislav Fomichev , Jakub Kicinski , "netdev@vger.kernel.org" , "kernel@mojatatu.com" , "Chatterjee, Deb" , "Limaye, Namrata" , "khalidm@nvidia.com" , "tom@sipanda.io" , "pratyush@sipanda.io" , "xiyou.wangcong@gmail.com" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "vladbu@nvidia.com" , "simon.horman@corigine.com" , "stefanc@marvell.com" , "seong.kim@amd.com" , "mattyk@nvidia.com" , "Daly, Dan" , "Fingerhut, John Andy" Message-ID: <63d85b9191319_3d8642086a@john.notmuch> In-Reply-To: References: <63d6069f31bab_2c3eb20844@john.notmuch> <63d747d91add9_3367c208f1@john.notmuch> <87pmawxny5.fsf@toke.dk> <878rhkx8bd.fsf@toke.dk> <87wn53wz77.fsf@toke.dk> <63d8325819298_3985f20824@john.notmuch> <87leljwwg7.fsf@toke.dk> Subject: RE: [PATCH net-next RFC 00/20] Introducing P4TC Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Singhai, Anjali wrote: > Devlink is only for downloading the vendor specific compiler output for a P4 program and for teaching the driver about the names of runtime P4 object as to how they map onto the HW. This helps with the Initial definition of the Dataplane. > > Devlink is NOT for the runtime programming of the Dataplane, that has to go through the P4TC block for anybody to deploy a programmable dataplane between the HW and the SW and have some flows that are in HW and some in SW or some processing HW and some in SW. ndo_setup_tc framework and support in the drivers will give us the hooks to program the HW match-action entries. > Please explain through ebpf model how do I program the HW at runtime? > > Thanks > Anjali > Didn't see this as it was top posted but, the answer is you don't program hardware the ebpf when your underlying target is a MAT. Use devlink for the runtime programming as well, its there to program hardware. This "Devlink is NOT for the runtime programming" is just an artificate of the design here which I disagree with and it feels like many other folks also disagree. Also if you have some flows going to SW you want to use the most performant option you have which would be XDP-BPF at the moment in a standard linux box or maybe af-xdp. So in these cases you should look to divide your P4 pipeline between XDP and HW. Sure you can say performance doesn't matter for my use case, but surely it does for some things and anyways you have the performant thing already built so just use it. Thanks, John