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

Haoyu Song <haoyu.song@futurewei.com> Thu, 18 May 2023 19:30 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 783FEC15155B for <coin@ietfa.amsl.com>; Thu, 18 May 2023 12:30:15 -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, RCVD_IN_DNSWL_BLOCKED=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 212SaHS6ofnR for <coin@ietfa.amsl.com>; Thu, 18 May 2023 12:30:11 -0700 (PDT)
Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::705]) (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 69A0FC151098 for <coin@irtf.org>; Thu, 18 May 2023 12:30:11 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAslmLEt0SkTAkeuLCDoU/2cUgLbJ24IIXfwWScl+fMF5Z6PmGuMqYCtVxP5DIkz4WlQggoAX9+keVcSnPub7tC4Lb9W8hxpSCgUKu8aGM1W7VIYIyxQnZDeSu5uArnQqiF6Q8CcKexbgXMSS1P/xEGf2EdOKYXQt+T2Wg0J/flD6m4pDeYq62vIJ3dUNsyk+H7fBs1OaNwKRfrjYjQzOSn8WLW6z0Yy2iKdH77cHf2HirA4AxTpfYFz7bWcU1JtAhCH98ht4eWFgk0mMut83SUXJr6u1eSOF/FPitM0zSZJvArIWdz/LDReZXQHQNjf9k1Aczet+hUG8JFuDN+pIA==
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=5r9hEYUclkEdV/oiXNfkJk6+GOz5n8zkpMduvT9liPE=; b=ec34QdeHmpavc6iaHJqEWvdLKqFs7BgeBWAWGXsSLwxrGn08KF5HdZB6QfKZ3LMa6wKXG1PYkRV+bK0RR/2AUISboxbVYX5dQgLIiBliV2CdLjYhC6cffwS/h0oAC8PIZkDS/5Ije3HD2G5+cUCQBmLbQoCCOSrp7s6e0vK8DzU/bEZ1BKNkFgqiNPffS0XE/QEpRxooXQQ+EeAiepBmzLr/DYOQYZRszqK/kjSP01MX178hIZEJjT08Fs+UtDFFCSBLAIMczAzBT0Jlq7eEzbikPBnmE78pxfL7UfHJ0r1km1t9TL7DXZK8avWB2FwIDC1Vs/zO8QGLObbCwHVa1Q==
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=5r9hEYUclkEdV/oiXNfkJk6+GOz5n8zkpMduvT9liPE=; b=T4rfxmavr5howbRfwG/8VwIJ1/wdzn6cXtshIZrLpmzWLen6vddGOWVJ7d+4X7S55ObSHmJchKZp46lpUAdRGO7wY3JFFviq7lDXyP8ubwxOzMZBWh2mPQFQ7O+nXw4bZQvxAzlkvP27qpBfVUBiZ76TGnMeMvX5NUwjNFqay6w=
Received: from BY3PR13MB4787.namprd13.prod.outlook.com (2603:10b6:a03:357::13) by DM4PR13MB5977.namprd13.prod.outlook.com (2603:10b6:8:46::7) 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 19:30:05 +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 19:30:05 +0000
From: Haoyu Song <haoyu.song@futurewei.com>
To: 'Toerless Eckert' <tte@cs.fau.de>, "hemant@mnkcg.com" <hemant@mnkcg.com>
CC: 'Hesham ElBakoury' <helbakoury@gmail.com>, "ehalep@mojatatu.com" <ehalep@mojatatu.com>, "'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+KbJNrrt4LNK9bkESAgAARAQCAABdGAIAADoAAgAFujwCAAGSUgIAADYUAgAEfkACAAFKggIAALzCAgADpVQCAAANqUIAAEGIAgAACPECAAAmCgIAAASKwgAAJOACAAA+SAIAAA2Ug
Date: Thu, 18 May 2023 19:30:05 +0000
Message-ID: <BY3PR13MB47871414A1B9BB37A197C3A99A7F9@BY3PR13MB4787.namprd13.prod.outlook.com>
References: <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> <009f01d989b5$3f0a5d30$bd1f1790$@mnkcg.com> <ZGZ5MEal+NPtfDvg@faui48e.informatik.uni-erlangen.de>
In-Reply-To: <ZGZ5MEal+NPtfDvg@faui48e.informatik.uni-erlangen.de>
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_|DM4PR13MB5977:EE_
x-ms-office365-filtering-correlation-id: 53e4901b-5608-4c1e-da7b-08db57d648b4
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: XbA2tvtKGLBbEepx3ik04fK4GbRCchTpnZCo4/bNMSEdtJZQwk3XO8YNIlnS0MOOqbeEwuIHtmYhct0FaXoImdcy2aGbNrF6QLDqc8F9j1Kz995BOPWO/wYaolnnW9hjQt0Yb0jAx2Q9YMQkSbWEVdQXt2d1V6VsGom+A2l8IhajDuxZ3ZtvpBL13P9gqU5fRRoBos0UC5qF4Rjnm7J8ahfsdKzpwds8EvW+G7AlRHnbeWMFdQqrP+q0vJiDjVkL2QJ7PUT4kagyw/otapxGQcbjpG3ucwMRYlDfOYAAIggu8XG0Jg0lIyZkMApnC/QNn+HK51qoi6lZjtRlKu8EqWiwt4NOGOjHnJSHxzh8oHlkNzKPNnfW15RBawH77bOEGbLN77jw0vkIO87huNHYXTvFzwAKzLOYIGCayk+nCy4CToDfOpAC8lV8yaU/hmz1ao8MdDtxEDoUl/78bT54SWbjPWIuigWkwd8ismDX1w5Hk5En7FITI6X3Bmtxjw8n+Z8hB3t9w4KeCLG9/WVJMZ1xue05VMqVW3L85FNeW71JXl463etZBzIqjngrvZNicDAiq2Rc4IGG9c0iz7lWiGLI/OJDVmwLj0mcKCRv5+mMizT8odF9T2tfZxh+iwQsdQUuDHLYzjMvuShL3z6n1j4BF2UKnQOhWkyyfTbPz+s=
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)(376002)(346002)(136003)(366004)(39850400004)(396003)(451199021)(41300700001)(66899021)(8936002)(38070700005)(2906002)(8676002)(7696005)(6506007)(26005)(55016003)(53546011)(71200400001)(38100700002)(66556008)(66946007)(54906003)(110136005)(33656002)(83380400001)(9686003)(76116006)(316002)(186003)(478600001)(44832011)(4326008)(5660300002)(86362001)(122000001)(52536014)(64756008)(66476007)(66446008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: rQR0QjvXZ37uhdE1CZMEy/V1+F+MCwPu5Quo3eYU+2Qpzq5WP10VTPeqGMA2ZOXwlbUstH8l5w4NXVx9u71lAMKN/XFa3TDrV6LZjZbI6czJHyNbaUUX2bwab4KGsZxj1BF9oESK/oqmwP5L01KnGn+G+x8Tqf0DmJF86bX+2qCcR9B4VTmUQYg6X46qnBZyS6IHS/V5H+ee6WPcnu2qI2zaelIeVoigQM7hqWblqODo2POwGu1j29Uy+PyCW6RPLec1PjTFo8w4WbJh2CEya/5vHL+2iLTO1/Pj2c3WK+sgGyuFVW4vnZ7QJCNe3XY8nziC+eBp/WrI4UVKL5+U9mR7VLQh8KDaf9qdVCvlrN5mNGPARl78iUCW2oKQMpjfStSTNASYtbFRuINUmTFG2SQV8ScnDSmK94yY1Ypm7OhnLfkb7f2sEIVsF/so5Ra/47pOI0OteFqsJetfq6W0o1wNLD4tbvCT8HU/BVJM/x064UU4sn+rhc17ocYP9ABUWHDySsSj1lnL+5kozN/65A4hXk3OXZKaYFxGrwbqrE7Ob6BGYGJE1+0lsSyzyJjfhFLE+kVxLTxnYWgXJOlYn+imBtaYIDgIsI2a3X3aMaGeO2kzGm0oMnm1vTkxcby0M9IwrpS68tn6T3j9CzJew69MwYnbIi6Wh/1xI+hGKQeqBfgxMeFs+L87cNFrx3mhLvzMxywkWAvlt8PgJZLzqnllMGERxPpJMSz0O0MU7pDnNmU7M9ysrmTxQX9lQ/siSx2/F6FvglBp2UhUZnYwAVAuMASlDeGtuEkwY/KK+2Ge84SOyu1BEjK+pRh6Cn+264SQH8mcwtxtS3OdSrf7MQzQXNyHCXTyIs2VH5NsS+tZ6r9I2lJaEeRv0XRlGvoan1CWv1cT/RXqUVST8ni1rNcvG39vxU5yqFJYo9awKotm6tBngk1AbN/W5Q2cM7QcpAnwMfIJlG+0KBd9GWBE9MIiWPbGQB9TrrTRX+5286PDm/4MIyY1Gk70txP9/W8TjxCg0G2RBbE6+IlM+TwcY1iX6w9LpF9PViGCrg7jE9uvQHwPRZe6Yvi48SJV/MJ6Jx/+nZDfNau8suusGVKAKDY/2YwpDSORjxkt0mH2di4/ePh7jb94HmwgueLAK4Ipo+NGOMAXFWTWCxGBCB5qq4UYTk6RDU6jJWqRON5S0HG3WDCMU8eaGp39wSdHvekKJzKK4SCfyo29Kr5Iv4EB9VkrdHBAoGtWq9TLWh6T2ywH1JdrNhwGFTOgSfYff1ZWZYhDJ2yUZnf7hQI8GJi2SuUI4zLpGRphBDlAc9VXB9Op1LkN9hI+J/0sNGVv4IECt9oJyEq6BsAc6C6/GusRblB7cCsjaw1eeq7X13pVxCrM06eJwJ4OnfzOMdZjN2zLMd5L/FTQ3nETpofXWfRCVmDIvGDLGBxRh5bCLf3f7iM6G7ZIr3tmUX0b83570anWPNCFmgestRuYQzdc5Mj9l3EEqe44rlUgnRs2KDsyYZ8vDCIIlxB+XSOhQDD3s79zWpXeLYVsW85eRvgK9EKy1lXDbqUpJSyizRCKHTL5a38=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
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: 53e4901b-5608-4c1e-da7b-08db57d648b4
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2023 19:30:05.7342 (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: 0lnJVUjg3t7yPD7klfoRBVy68BE7BjMrGArMs2IcxZaZJ6Eky3jjZ15SNeEilsIhChWHJBLcZVsjnvZ/CyTPJg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR13MB5977
Archived-At: <https://mailarchive.ietf.org/arch/msg/coin/8yUL3kICNjWyCR_Eag4AkpUf6Mw>
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 19:30:15 -0000

Toerless,

This is exactly the problem: you can't use the core language to describe an arbitrary dataplane function. 
"Extern" can be a blackbox but what need is the spec for what's in the blackbox.

For P4 spec: " Extern objects are architecture-specific constructs that can be manipulated by P4 programs through well-defined APIs, but whose internal behavior is hard-wired (e.g., checksum units) and hence not programmable using P4"

Haoyu

-----Original Message-----
From: 'Toerless Eckert' <tte@cs.fau.de> 
Sent: Thursday, May 18, 2023 12:15 PM
To: hemant@mnkcg.com
Cc: Haoyu Song <haoyu.song@futurewei.com>; 'Hesham ElBakoury' <helbakoury@gmail.com>; ehalep@mojatatu.com; '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

On Thu, May 18, 2023 at 02:19:12PM -0400, hemant@mnkcg.com wrote:
> 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.

So far, my limited experience has been, that the language itself has rather evolved over its series of spec to further reduce the base language functionality and move any improvemenets into implementation extensions ("extern") calls, so that no possible hardware would not be able to not support any base language feature. 

This is a good strategy to gain more acceptance in the industry, but not to get to the easiest to use forwarding plane behavioral definition language

For exmple, i would need axtual syntactical language extensions to define a good way to parse andd deparsing variable length header fields. This can not just be done with extern calls.

Has P4 adopted the approach to have optional language feature extensions ?
Sorry. Did not have time to follow the spec evolution in detail.

Cheers
    Toerless
> Hemant
> 
>  
> 
> From: Haoyu Song <haoyu.song@futurewei.com>
> Sent: Thursday, May 18, 2023 1:56 PM
> To: Hesham ElBakoury <helbakoury@gmail.com>
> Cc: ehalep@mojatatu.com; Toerless Eckert <tte@cs.fau.de>; 
> hemant=40mnkcg.com@dmarc.ietf.org <hemant@mnkcg.com>; 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
> 
>  
> 
> 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. 
> 



--
---
tte@cs.fau.de