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 0B604C54EED for ; Mon, 30 Jan 2023 11:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235680AbjA3L1u (ORCPT ); Mon, 30 Jan 2023 06:27:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235265AbjA3L1t (ORCPT ); Mon, 30 Jan 2023 06:27:49 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF231ADE5 for ; Mon, 30 Jan 2023 03:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675078024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NB1REK3IXWn/B3d981a1uXPcnJOYW+xUQQxZJwONvuw=; b=cYXT9G+ZEPsq6DP/tNoEDHaCHZw2kI0slaXDdNRNhobqBn1ftU9qjOvX84peoSQz2ca/wv BXorw/PIQ5SIsg9hp9T/65kQu7IbWwv5VI90qSCCIG9i0F8GcxMUYTJ4LpNP0Vb5X14YjI CrUVQYGGfG35Wc4W9aD09t4fzzVCGYU= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-663-XKQtxuVdOVqPv3nHO1hraQ-1; Mon, 30 Jan 2023 06:27:03 -0500 X-MC-Unique: XKQtxuVdOVqPv3nHO1hraQ-1 Received: by mail-ed1-f69.google.com with SMTP id w3-20020a056402268300b00487e0d9b53fso8031795edd.10 for ; Mon, 30 Jan 2023 03:27:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NB1REK3IXWn/B3d981a1uXPcnJOYW+xUQQxZJwONvuw=; b=lJ8FXuffcLy0oOXfxF+Sq1xNfEqCRm4gohh5mEXuGOvjug7R0JFyfVud0dtSkG4BQG nOogTC2QNetDKhOfyHMdw/TY7McG7ffHRQnUt7Ngnt0JBhKE1vv3ApNaPBPMFmYQypZW RbmaQ7JodoZDCWHY7g7xtdor+gAKLYpf3/WwDMYVzBibU5zAfPzHhPl+5UGSLqa4n/pv ugzbNfpJlNZBv1MRNq1cYxcFWdpfPlVJVSwagU5LBqZMEoZoQvQuHpptjk4m8rpWWuxd 3Ogu2KIsijufnlNSUHVUiTcKlwQ3FIT6boowzGDP/PiQN1VU+OQ0OuH5XH00OXVYihoe Ibhg== X-Gm-Message-State: AO0yUKUQiffEEvxU6xTlZKmIdwYC4DnTcJ+8QQNpcJEhe6oZ8+0oK80O leLVedVknl65DmVWOno4ThQjo1UVmihTg1eLsfAIQqUWisUh/A3tA6UaW1BAq8VNjQwcFBdiql4 5+AhT8PR9wVNzDJYY X-Received: by 2002:a05:6402:381a:b0:4a2:3633:952d with SMTP id es26-20020a056402381a00b004a23633952dmr6275419edb.41.1675078021253; Mon, 30 Jan 2023 03:27:01 -0800 (PST) X-Google-Smtp-Source: AK7set/HaIbC3Z2/0DRZM1tedokxMLQsbjTqoRq2WMRHiseS2vlhq5haqzsuFaKc+vowi0jLCeMIaw== X-Received: by 2002:a05:6402:381a:b0:4a2:3633:952d with SMTP id es26-20020a056402381a00b004a23633952dmr6275342edb.41.1675078020464; Mon, 30 Jan 2023 03:27:00 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id c10-20020a056402100a00b00483dd234ac6sm6628861edu.96.2023.01.30.03.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 03:27:00 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 8780E972681; Mon, 30 Jan 2023 12:26:58 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jiri Pirko , John Fastabend Cc: Jamal Hadi Salim , Willem de Bruijn , Stanislav Fomichev , Jamal Hadi Salim , Jakub Kicinski , netdev@vger.kernel.org, kernel@mojatatu.com, deb.chatterjee@intel.com, anjali.singhai@intel.com, namrata.limaye@intel.com, 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, dan.daly@intel.com, john.andy.fingerhut@intel.com Subject: Re: [PATCH net-next RFC 00/20] Introducing P4TC In-Reply-To: References: <63d6069f31bab_2c3eb20844@john.notmuch> <63d747d91add9_3367c208f1@john.notmuch> X-Clacks-Overhead: GNU Terry Pratchett Date: Mon, 30 Jan 2023 12:26:58 +0100 Message-ID: <87pmawxny5.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jiri Pirko writes: >>P4TC as SW/HW running same P4: >> >>1. This doesn't need to be done in kernel. If one compiler runs >> P4 into XDP or TC-BPF that is good and another compiler runs >> it into hw specific backend. This satisifies having both >> software and hardware implementation. >> >>Extra commentary: I agree we've been chatting about this for a long >>time but until some vendor (Intel?) will OSS and support a linux >>driver and hardware with open programmable parser and MAT. I'm not >>sure how we get P4 for Linux users. Does it exist and I missed it? > > > John, I think that your summary is quite accurate. Regarding SW > implementation, I have to admit I also fail to see motivation to have P4 > specific datapath instead of having XDP/eBPF one, that could run P4 > compiled program. The only motivation would be that if somehow helps to > offload to HW. But can it? According to the slides from the netdev talk[0], it seems that offloading will have to have a component that goes outside of TC anyway (see "Model 3: Joint loading" where it says "this is impossible"). So I don't really see why having this interpreter in TC help any. Also, any control plane management feature specific to managing P4 state in hardware could just as well manage a BPF-based software path on the kernel side instead of the P4 interpreter stuff... -Toke [0] https://netdevconf.info/0x16/session.html?Your-Network-Datapath-Will-Be-P4-Scripted