Re: [Coin] Fwd: The Future of P4, Revisited

Haoyu Song <haoyu.song@futurewei.com> Thu, 18 May 2023 23:17 UTC

Return-Path: <haoyu.song@futurewei.com>
X-Original-To: coin@ietfa.amsl.com
Delivered-To: coin@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 09057C14CEFC for <coin@ietfa.amsl.com>; Thu, 18 May 2023 16:17:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=futurewei.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S55LgR8UDog9 for <coin@ietfa.amsl.com>; Thu, 18 May 2023 16:17:47 -0700 (PDT)
Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2070a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::70a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 662E2C14F73F for <coin@irtf.org>; Thu, 18 May 2023 16:17:46 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oZgHO6qxFmi8UirdrAI5nn7CgbHxt4maBK3xtMUh2HL1jUUk1GggZL/sIxR5uxSFnxdU/10FEuct10b/TnzoyvMAecc2XGIykYzW7geOzLXHibD3PQGPuo+d3OjMFiqsAYhyDxVfar8jeAKpp9m2sBjwS4M5Fwov02PXvh+kIucNDLIwgdJHdZXf8lzgXOvh0rOYAIR4brwc/xI/NVN1ejyXXgDKVYIXhw/GrjPgY5hDgYNcyE2tJUo/3u2P+92fKylBklttvC+S1AEMzQ4iF+X7Z9viU+2vc81p7Cf0Cde/g04YcauiVqR5eZlIRldf85qOR6t7G8qseKfYIoz9hA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4H8KL+ZSV9Uc5htu8iZckqTj2qQ5HRyqsf1gbBF9ykw=; b=moCnb5vbCupoD+UIo2Na32dOXpyTdDIk29EnUsOt4O9vQJb/MXX9+w+d3MZpaB5MCtx3D4umcasSVrIwX2Nu3B7EFYIQlvnhJNJrJKBhAE53F656mUrzR83ETBTZCk+v6vGQz3bqOGwhQwqeGnyKt6Vpl2RlEtD/dJWnGljQNZYASy7jZ8JR1r+Qr5rfYeWZ7qQJXQwvMreIG6ZPh5Me0jJtbxbc3EDJYA4lbbD3anabEqv1BHvP8jP0HZjFhldDd1BNwlt3+CxqEoPwDylTbA11xlgRliPIJooc6cJVbm37OLVP9wMmcPOue+q8MphUKjOXplkutn9aVU20Kq0ykA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=futurewei.com; dmarc=pass action=none header.from=futurewei.com; dkim=pass header.d=futurewei.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Futurewei.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4H8KL+ZSV9Uc5htu8iZckqTj2qQ5HRyqsf1gbBF9ykw=; b=X/WcUUlWsLBfotP8u1pELYonNyeIIug4G0YWTOmWPOANvwgtowF9csaHKWNwA35SfT/M6X+TQKrNYUkLYA3vfFIWpAvBEomqYtCAVCsUYgxeUDlp34pTgVFmYY23QzzT5DkZeeW7QB1KIM1AH1IcunrJZ7cjN2TWEsMHz1YC3Ak=
Received: from BY3PR13MB4787.namprd13.prod.outlook.com (2603:10b6:a03:357::13) by MN2PR13MB3959.namprd13.prod.outlook.com (2603:10b6:208:24f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 23:17:41 +0000
Received: from BY3PR13MB4787.namprd13.prod.outlook.com ([fe80::9313:611:c939:f9d7]) by BY3PR13MB4787.namprd13.prod.outlook.com ([fe80::9313:611:c939:f9d7%7]) with mapi id 15.20.6411.019; Thu, 18 May 2023 23:17:41 +0000
From: Haoyu Song <haoyu.song@futurewei.com>
To: "hemant@mnkcg.com" <hemant@mnkcg.com>, 'Hesham ElBakoury' <helbakoury@gmail.com>
CC: "ehalep@mojatatu.com" <ehalep@mojatatu.com>, 'Toerless Eckert' <tte@cs.fau.de>, "'Bernier, Daniel'" <daniel.bernier@bell.ca>, 'Marie-Jose Montpetit' <marie@mjmontpetit.com>, 'coin' <coin@irtf.org>, 'coinrg-chairs' <coinrg-chairs@ietf.org>
Thread-Topic: [Coin] Fwd: The Future of P4, Revisited
Thread-Index: AQHZhxjBWBKzoPPX0k+KbJNrrt4LNK9bkESAgAARAQCAABdGAIAADoAAgAFujwCAAGSUgIAADYUAgAEfkACAAFKggIAALzCAgADpVQCAAANqUIAAEGIAgAACPECAAAmCgIAAASKwgAAJOACAAA5AQIAAIsWAgAAfRTA=
Date: Thu, 18 May 2023 23:17:40 +0000
Message-ID: <BY3PR13MB478741185F249EE346BE81659A7F9@BY3PR13MB4787.namprd13.prod.outlook.com>
References: <CAPjWiCT2ipu=yiZFr8hBGF2wy-Y_Dmze=8j+PgeDFyN7KNZR6w@mail.gmail.com> <ZGJl+6YPQarlDSTr@faui48e.informatik.uni-erlangen.de> <034201d98757$bbd87550$33895ff0$@mnkcg.com> <c98c172c-a483-5f69-9bff-dedd4b6a78bb@gmail.com> <044101d9876a$9f0490e0$dd0db2a0$@mnkcg.com> <c9b9a119-27ba-88db-2f08-18e8ff2c6337@gmail.com> <ZGQbyzRW5d1vkgVV@faui48e.informatik.uni-erlangen.de> <9EABD595-552E-4775-B69C-72BE49BD5C93@bell.ca> <00c501d988ea$bbd16f50$33744df0$@mnkcg.com> <095d01d98914$0bba99f0$232fcdd0$@mojatatu.com> <ZGWFQRGI0hmc3g5O@faui48e.informatik.uni-erlangen.de> <001101d989a0$4e180530$ea480f90$@mojatatu.com> <BY3PR13MB47877D31EC3B4511C8095D329A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <CAFvDQ9ogV5f-Nh9faKxANXV=ORHJVQQPjUH5qAAJb9uvP0KGMA@mail.gmail.com> <BY3PR13MB47876236862ABECD69BF97679A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <CAFvDQ9q2_5-msxeHYgbZfy3RJB6he3kEQheRe=1qfEdUwP3HxQ@mail.gmail.com> <BY3PR13MB47879D6486069FDA49D6252C9A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <00 9f01d989b5$3f0 a5d30$bd1f1790$@mnkcg.com> <BY3PR13MB478745FF99AFE954559F1D5C9A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <003b01d989cd$c1f7e510$45e7af30$@mnkcg.com>
In-Reply-To: <003b01d989cd$c1f7e510$45e7af30$@mnkcg.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=futurewei.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BY3PR13MB4787:EE_|MN2PR13MB3959:EE_
x-ms-office365-filtering-correlation-id: b0e5bad3-9314-4fdd-78fd-08db57f613d3
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: dGyC1gDeLeKzufkb4USDhAhJdk7ailASq6H0e09OjPBvPVccz9PftLgi/aJ6Uyf+kiyJLD7rAnPRoxh5GisCYpFopIREbLIwKsGvgx6L/bqSgK+HKPBpLrHGOSk/bha7rFhnft3WPLsaimOTFc9qsScxRohM6ykUODyOCdDs/gArASCTwMITBAfgIzo1iUsFaxkxitJuJLrqnH7vFfwwBMFtbtKI1OfmnKo0Y+BnN/MbZkStJBu4jyE/nK+/Yh9vkWGvHzq2EAE+VvLcajHx9ItdbE9Je01j9pl14h3vFuo2VnqyoprsyKhVLzYTUapjsfFeCkLs7srKdqRafeUfsE6Ln8lwfhplJizuii6FgRjqekRlAYfQNhwt7V1zjAl/ilwv9YVrADz3BDL+1LYlAcpXhk7agkjomFPuOAT+wMGi6PS4wOqFxFhOUvE7cR4LdPKqJ2c0Y9ZQEBUftFjSJa7yjZ3ruEVQk5qdWhFKcyNwUQE4qOFsjBgY+3X1KOhkRrG6qwln9w+V2KQAmQEdZpbkRuO0a4jGWmrC6M/vIjBAcR3gJX81QamY8fdNL+Vn7e4Nvcs7WJyPr90taPfPDv0MCF9800kZWenYSXSdFa5p7atno9vzn28p9Gv8kP6SrkHM2EiimDSjvkUXTRWjcbaORjH6mXxzBQNOgRGP6ik=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR13MB4787.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39850400004)(396003)(136003)(366004)(346002)(376002)(451199021)(86362001)(316002)(110136005)(8676002)(4326008)(8936002)(41300700001)(5660300002)(52536014)(44832011)(38070700005)(33656002)(54906003)(38100700002)(122000001)(478600001)(2906002)(64756008)(66476007)(66446008)(66946007)(76116006)(66556008)(66899021)(71200400001)(7696005)(6506007)(83380400001)(9686003)(53546011)(186003)(55016003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: bk1IZnC8O2UxIT+QpLW02a+92STVQYwGbGcL0r5JIhZPMwGqvc7rAn2ye1sLMUESSBZW9z4y0RXcRS5yAvufnKlCzYCGZyl6cr4EFZ/yISApx6wRRQLl8abQOR3MA9d/0OHNqob5C+9fO3Z5rniZD+i5PX9PP7bBFW7IgYt0Gxqo0EE8CIGWndbTPx2Wp+lqTAIQHaKA7RwlpEb8SDbIsYopqidW1Er+ULyaD7uD9rsfCiB9aH2btIf5TxOODlvMVE8yFNez0EbpTcJpkoeTTXSFNO/OJU1xzOkNr95j3VU2UD9+ZQnmhdX/+/AZFbCtV4DVFMy7dn/TKXrOAUkdYkBskAlsblkv2pzs3qGnUjcIPC4UHW3mI7p4XDXqtW+auoHRIK+v5EnUStWB/CSy65hBnRdqYktxU1sztUN2t29qVAx4/a3KYBBsCBhrCe+umdbkZW+HdUTa2Aid5XNGv8LEbK6nWtf5bwepMWJgdAnkmsMWKHS/eTQwknCBRXj4DSkohDrECgTq0OaUjWSQkKeS4Xjoxh29xenJjGZznIA6jrYI8WjZ6E79rNWXBf9rRJ+6BJrR1n946l1q2BKusvAPC2FWLruuCCoyWkElyycImIMvRob8pflRx/+tSJEdv8xe88wMGhIFsX6I3Is0IVAZVGQRufR4YPkRX8g4B02CykomiXx0B5G1a4xxeiU5CT8QxHv/lzY8KINdqWpfpeUQ0Hr4VyjlSdmy7eHSYg0TuyrycJcJE7Qdhn9sKNCGPK8t8HhTe/fQbSLPVveZKLntY37gS4/QQB+7OpQASyrtHCeutc+klpQVNfYQBBqHiScV7UPGnZteFgrcemhe/01Syeliaa6+mWNzhLKXSr8DDlZjBKuRCFDlXO3T0vnDabuvYCJ7FYlqqRH6bm1kfYnGkYYdraXvPDa2M6bA7y4zjclLVd0VGippO1ag2Ur/TOafAHkQyoBFkpuQ8ZCi2k0pHlHqgI9OXH+TyMiehMY6foUvQgKFXOCJ5sFiYs986r8Tl48VYIF1FlqA47zf6RmnEX25MtwGy9HNPg/e/qIUeRcmQoeUxpuzA01PGDbftHaXdqG/4z2qO6KYcbFAm76fi2ADsWB/ilsHjSPY9Ju6RlBYTpLOyVQOhhah8BRYjnnMpqYsoCvEHA/tLdfFLM0ZDLCanvUtVq4Qb0bDKQ01zjj241sCr0XXLR+WWVzk9RBpGSEhvvcQeL3qneFmuhEGsasCaQ6kJ2oHt+/OUGMrIWIpgzJ2+Ik9yYbvY6/4/Okn5LwCGK52XswgOnCu5JNrZESzIupbQ345As/2kFUMDBQpVrRv6jveHXsThUh400IGsIyLsYBG6yH94w5moow8dWgnF9cS4VPEjUgMw9Y6GYOtLC0LmsxN/OsmN7sLnylVDrzmci+2IV7RoLxRi97uI1/ngmZz+Msvk3WSlEK2aDodtmNRzs1yhPCWpuPhvTyVVLHYz87PBsi82Qi06FCtNKHEP0oSfuOizfsBJcHLWhw10pEoRhggEv4+6uqLle8P+Plnw/win7WL3wXsefccFEt37lHjTbbuwZl9gD4AuVmzj6xvlLwm6zvvd+pW919U78VfVNPDTNhc1pMi7ZGp05blRCjA49N+TeIZyN65GCdNeHVd/Od05nq/P8cQ
Content-Type: multipart/alternative; boundary="_000_BY3PR13MB478741185F249EE346BE81659A7F9BY3PR13MB4787namp_"
MIME-Version: 1.0
X-OriginatorOrg: Futurewei.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BY3PR13MB4787.namprd13.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b0e5bad3-9314-4fdd-78fd-08db57f613d3
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2023 23:17:40.8784 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 0fee8ff2-a3b2-4018-9c75-3a1d5591fedc
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 3s+tlUG8u8PZackuAzKNXTzLG6/DIgN2wxYb5avVaN/82SaFW7oyvWpbKWaJxhRxGr/3S80YYUioGl9iTyUJbg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3959
Archived-At: <https://mailarchive.ietf.org/arch/msg/coin/nI_GRKSIpzksidjt8WVc2nVn_o0>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited
X-BeenThere: coin@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "COIN: Computing in the Network" <coin.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/coin>, <mailto:coin-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/coin/>
List-Post: <mailto:coin@irtf.org>
List-Help: <mailto:coin-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/coin>, <mailto:coin-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 May 2023 23:17:53 -0000

I think we need a language to describe the dataplane behavior independent of architecture. We’d like to use the same language to describe the “extern functions” instead of treating them as black boxes.  Also, queue management, congestion control, scheduling etc. are all important dataplane functions. If a language can’t do this or that, it’s handicapped. Just claiming it is very extensible is not enough. We need to wait until it has been actually extended to be capable of doing what we want it to do now.  It’s yet to see if P4 can live up to this goal.

Haoyu

From: hemant@mnkcg.com <hemant@mnkcg.com>
Sent: Thursday, May 18, 2023 2:15 PM
To: Haoyu Song <haoyu.song@futurewei.com>; 'Hesham ElBakoury' <helbakoury@gmail.com>
Cc: ehalep@mojatatu.com; 'Toerless Eckert' <tte@cs.fau.de>; 'Bernier, Daniel' <daniel.bernier@bell.ca>; 'Marie-Jose Montpetit' <marie@mjmontpetit.com>; 'coin' <coin@irtf.org>; 'coinrg-chairs' <coinrg-chairs@ietf.org>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

No. P4 is designed as a core language which is extensible to any architecture. The architecture defines a model file in which you add architectural externs and functions to.

Traffic management, even before P4, is not exposed to user for switching asics. Anyway, one asic supports WRED, but another supports HQF. How you program each is very different.

Hemant


From: Coin <coin-bounces@irtf.org<mailto:coin-bounces@irtf.org>> On Behalf Of Haoyu Song
Sent: Thursday, May 18, 2023 3:25 PM
To: hemant@mnkcg.com<mailto:hemant@mnkcg.com>; 'Hesham ElBakoury' <helbakoury@gmail.com<mailto:helbakoury@gmail.com>>
Cc: ehalep@mojatatu.com<mailto:ehalep@mojatatu.com>; 'Toerless Eckert' <tte@cs.fau.de<mailto:tte@cs.fau.de>>; 'Bernier, Daniel' <daniel.bernier@bell.ca<mailto:daniel.bernier@bell.ca>>; 'Marie-Jose Montpetit' <marie@mjmontpetit.com<mailto:marie@mjmontpetit.com>>; 'coin' <coin@irtf.org<mailto:coin@irtf.org>>; 'coinrg-chairs' <coinrg-chairs@ietf.org<mailto:coinrg-chairs@ietf.org>>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited

Hi Hemant,

If P4 is to be used as a generic language for dataplane function specification, the language itself needs to be updated and made free of architectural assumptions. As Toerless said, using C can be much more succinct in describing a function and it’s free of any architectural assumptions. Then why P4?

There are proposals for more powerful dataplane architectures and P4 can be improved to support the new architecture and therefore becomes more expressive. But some fundamental assumptions remain (e.g., parser, deparser, MAT,…). These seem too restrictive for general usage.  Moreover, P4 is still lack of support for traffic management description which is a critical part of dataplane functions…

Haoyu

From: hemant@mnkcg.com<mailto:hemant@mnkcg.com> <hemant@mnkcg.com<mailto:hemant@mnkcg.com>>
Sent: Thursday, May 18, 2023 11:19 AM
To: Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>>; 'Hesham ElBakoury' <helbakoury@gmail.com<mailto:helbakoury@gmail.com>>
Cc: ehalep@mojatatu.com<mailto:ehalep@mojatatu.com>; 'Toerless Eckert' <tte@cs.fau.de<mailto:tte@cs.fau.de>>; 'Bernier, Daniel' <daniel.bernier@bell.ca<mailto:daniel.bernier@bell.ca>>; 'Marie-Jose Montpetit' <marie@mjmontpetit.com<mailto:marie@mjmontpetit.com>>; 'coin' <coin@irtf.org<mailto:coin@irtf.org>>; 'coinrg-chairs' <coinrg-chairs@ietf.org<mailto:coinrg-chairs@ietf.org>>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

A specific P4 architecture, e.g., PNA, may override the base P4 spec. PNA supports writing table entry by data plane. Using registers in P4 is a bit clunky but state can be maintained. Anyone is welcome to present a better solution to the P4 forums.

Hemant

From: Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>>
Sent: Thursday, May 18, 2023 1:56 PM
To: Hesham ElBakoury <helbakoury@gmail.com<mailto:helbakoury@gmail.com>>
Cc: ehalep@mojatatu.com<mailto:ehalep@mojatatu.com>; Toerless Eckert <tte@cs.fau.de<mailto:tte@cs.fau.de>>; hemant=40mnkcg.com@dmarc.ietf.org<mailto:hemant=40mnkcg.com@dmarc.ietf.org> <hemant@mnkcg.com<mailto:hemant@mnkcg.com>>; Bernier, Daniel <daniel.bernier@bell.ca<mailto:daniel.bernier@bell.ca>>; Marie-Jose Montpetit <marie@mjmontpetit.com<mailto:marie@mjmontpetit.com>>; coin <coin@irtf.org<mailto:coin@irtf.org>>; coinrg-chairs <coinrg-chairs@ietf.org<mailto:coinrg-chairs@ietf.org>>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

Hi Hesham,

Please see P4 spec section 6.5.2 for the current “stateful” support. So far the “table” element, which is the most important construct for a P4 program,  is not stateful (i.e., dataplane writable)
I think it’s a direction to extend P4 for better stateful support (part of my recent research). At least now it’s unnatural and difficult to describe many stateful functions.

Haoyu

From: Coin <coin-bounces@irtf.org<mailto:coin-bounces@irtf.org>> On Behalf Of Hesham ElBakoury
Sent: Thursday, May 18, 2023 10:42 AM
To: Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>>
Cc: ehalep@mojatatu.com<mailto:ehalep@mojatatu.com>; Toerless Eckert <tte@cs.fau.de<mailto:tte@cs.fau.de>>; hemant=40mnkcg.com@dmarc.ietf.org<mailto:hemant=40mnkcg.com@dmarc.ietf.org>; Bernier, Daniel <daniel.bernier@bell.ca<mailto:daniel.bernier@bell.ca>>; Marie-Jose Montpetit <marie@mjmontpetit.com<mailto:marie@mjmontpetit.com>>; coin <coin@irtf.org<mailto:coin@irtf.org>>; coinrg-chairs <coinrg-chairs@ietf.org<mailto:coinrg-chairs@ietf.org>>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited

Hi Haoyu,
Actually, P4 supports dataplane-modifiable tables -- see PNA.

More generally, the *language* is fully extensible. You can have whatever architecture and state externs you want. So one needs to be careful to separate language (non) limitations from target limitations.

Hesham

On Thu, May 18, 2023, 10:15 AM Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>> wrote:
Hi Hesham,

I said “it’s very limited”. P4 table is only readable (i.e., not writable) by dataplane, so it basically eliminates any dataplane stateful function that need to use tables. The stateful function can only use register arrays but unfortunately registers are local to a pipeline stage so the state update logic must be very simple and can be finish in a single stage. What you said “event” must be something very simple. Use case such as stateful load balancer can’t be implemented by P4.

There are some works addressing the issue. FlowBlaze is the most recent one, which needs a new chip architecture but it is still limited to simple stateful functions which can be realized in a single pipeline stage.

Haoyu

From: Hesham ElBakoury <helbakoury@gmail.com<mailto:helbakoury@gmail.com>>
Sent: Thursday, May 18, 2023 10:00 AM
To: Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>>
Cc: ehalep@mojatatu.com<mailto:ehalep@mojatatu.com>; Toerless Eckert <tte@cs.fau.de<mailto:tte@cs.fau.de>>; hemant=40mnkcg.com@dmarc.ietf.org<mailto:40mnkcg.com@dmarc.ietf.org>; Bernier, Daniel <daniel.bernier@bell.ca<mailto:daniel.bernier@bell.ca>>; Marie-Jose Montpetit <marie@mjmontpetit.com<mailto:marie@mjmontpetit.com>>; coin <coin@irtf.org<mailto:coin@irtf.org>>; coinrg-chairs <coinrg-chairs@ietf.org<mailto:coinrg-chairs@ietf.org>>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited

Hi Haoyu,
You say: "P4 has very limited support for stateful processing"

I am not sure I can agree with your characterization of P4. Perhaps can you elaborate on this.

Thanks
Hesham

On Thu, May 18, 2023, 9:19 AM Haoyu Song <haoyu.song@futurewei.com<mailto:haoyu.song@futurewei.com>> wrote:
Interesting discussion. See my comments below  [HS]

Haoyu

> For example, in the multicast drafts i write, we use C-pseudocode
> to specify behavior, but we do attempt to implemnt on Tofino in P4. Should we really
> use P4 code for the RFC specs... ? (much longer than C Pseudocode). Aka: quite selfish
> (but IETF relevant ;-) reason to highlight this point.

[EH]: This is an area I'm very interested in. Having a standardized and formal language to describe protocols and behavior can bring a lot of functionality and benefits to the IETF.
My initial thinking is that having such a blueprint, the IETF could generate tools to create a reference implementation that can be used for interoperability purposes therefore decreasing time to test and implement protocols and therefore RFC publications.

[HS] P4 can only describe dataplane behaviors, so any control plane stuff is out of scope. For dataplane, if it's used to describe header format, it's not better than the "struct" in C. The language uses the match-action table abstraction with an implication of pipeline implementation which may make it cumbersome or even impossible to describe the  behavior (e.g.,  P4 has very limited support for stateful processing). In general, I don't think P4 at its current form can undertake the role for formal protocol specification.