Re: [Coin] P4 runtime etc.

Andrew Alston <> Sun, 21 July 2019 13:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6AD8512004E for <>; Sun, 21 Jul 2019 06:14:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id aa06uC8Ep9QS for <>; Sun, 21 Jul 2019 06:14:56 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 5F279120020 for <>; Sun, 21 Jul 2019 06:14:55 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=dXkwBAWdzkU6R9C81JeJcpZO+05iHav9VoLl4WQWqglW25CZdSX5Pui0UqQd5EtUsi7YJvMznr0Sgl7wlZSsYqdHvCc2c7n3aHO6duS+iGuA8uZIYjnbsLwG7xPvESbBwDj9GQ9s7RsArRkZfEfm3p5AtMkwadrIctvSzKzWoTYIsO7ybf56T5H8yuioLgrL3+8eiHLe+TFtR/Z+kQchmgFS0keFZfZZ0MvoS2vaeQ4dwP0cVKzYEZGc5YSeqvf3a5MXBf8lpoNkodbcccd/4saqsp/7ISQBVMCwARJI3IcCDMntiVHacmZ/H6NVyS0RVhB69uGxL3ztlek0zPF9nw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ff1f1BtCimZomPu8sS6mpwU23L/UZASt8N1C5JtLRiE=; b=DfDQRvik6AgYbRQQvCm7uXQGdOf0CP2ZEozBagH2Ae6Zmk+7lw/Lb3itegEYIA/FEoLqeURX59oP8PSHCg7aX2Xien3epOkwSy0u197emkx5nym93m8ORRGRTNWk7upV0hP4CKTZeCkh46Reb9lMDq5pFy9SqE9xQ5oR99AC2b20FM4ICAvTfGZY2/+dQkJScjGJxqSTjFEgAbdRhXU7OPcaE0a07hXMq95NMIcx+6J+csfw4BSOvqvfyJ3l/zFlOdtOmfTZ9iBL6Kshcn9ayv0dAHPOv4zLd7F0WSC2eqdSyNnzfry/LeLWsTJTjGCMoJBMrhJjNMGBaC90WJI64A==
ARC-Authentication-Results: i=1; 1;spf=pass;dmarc=pass action=none;dkim=pass;arc=none
Received: from ( []) (Using TLS) by with ESMTP id uk-mta-20-GEk-QtqHOD-qNLTpHkzjrw-1; Sun, 21 Jul 2019 14:14:51 +0100
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.12; Sun, 21 Jul 2019 13:14:49 +0000
Received: from ([fe80::1d9:7dfd:bd2f:6ef4]) by ([fe80::1d9:7dfd:bd2f:6ef4%6]) with mapi id 15.20.2094.013; Sun, 21 Jul 2019 13:14:49 +0000
From: Andrew Alston <>
To: "" <>, "" <>
Thread-Topic: [Coin] P4 runtime etc.
Thread-Index: AQHVP7yZIOBjAtO1GUiUcugnjEMdwKbVCLeA///BTAA=
Date: Sun, 21 Jul 2019 13:14:49 +0000
Message-ID: <>
References: <> <01fc01d53fc4$191a46b0$4b4ed410$>
In-Reply-To: <01fc01d53fc4$191a46b0$4b4ed410$>
Accept-Language: en-US
Content-Language: en-GB
user-agent: Microsoft-MacOutlook/10.1b.0.190715
x-originating-ip: []
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c04e4c1a-8951-4cd0-8bad-08d70ddd6900
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR03MB5438;
x-ms-traffictypediagnostic: VE1PR03MB5438:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0105DAA385
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(346002)(39860400002)(366004)(396003)(136003)(376002)(189003)(199004)(53754006)(2501003)(102836004)(7736002)(229853002)(14444005)(256004)(6436002)(68736007)(966005)(25786009)(53936002)(8936002)(53546011)(6506007)(6486002)(186003)(486006)(71200400001)(71190400001)(2906002)(33656002)(66556008)(478600001)(14454004)(446003)(6512007)(76116006)(110136005)(54896002)(5660300002)(58126008)(91956017)(76176011)(606006)(26005)(476003)(9326002)(66066001)(2616005)(81156014)(6246003)(36756003)(3846002)(6116002)(66446008)(64756008)(66946007)(11346002)(81166006)(6306002)(8676002)(316002)(86362001)(236005)(99286004)(66476007)(574754004); DIR:OUT; SFP:1102; SCL:1; SRVR:VE1PR03MB5438;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: /OnTmN6FnWlsFDjfPS0h69sQU1dBnSnzzXb9tLR/owlXFDe5VLx/ywB2D0PRxE5eah5eLo/0o063MgBOXFIX63uWVlY9tOX5RY8Jp18n4bN+w7Zqfm1yZQGMEGBYYihMRFHR6FhEAKnyNW+sA/LYpJUEN/0gyno2vyCjCoL/ty0Wpqw8gqxT25JoduXilJPTgxkcXxUCq9afZp6A3GNGOK6kTSpxmcVHzC42tvDqDkaujVcby1RfZ5pjKeBOKLlsD8XPCtYslhcKsfrMLgSoLE//R1FXKKTgTOLXI75NgHL29z6XoBUJW8TZyQeX73bnf4xA1J3LJlSQ8PPXsyzYOmZFlnDARxmnFiAQUcF1uxmDY9YAgBNMVgOoBzV6L3DCviS6ibolRTO+PdfsmVLTDrdlLdElITm32nWC2KcYthU=
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: c04e4c1a-8951-4cd0-8bad-08d70ddd6900
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2019 13:14:49.6011 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 68792612-0f0e-46cb-b16a-fcb82fd80cb1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR03MB5438
X-MC-Unique: GEk-QtqHOD-qNLTpHkzjrw-1
X-Mimecast-Spam-Score: 0
Content-Type: multipart/alternative; boundary="_000_9B93433B7D734327B80EB8F200FF1A97liquidtelecomcom_"
Archived-At: <>
Subject: Re: [Coin] P4 runtime etc.
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "COIN: Computing in the Network" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 21 Jul 2019 13:15:00 -0000

Hi Hemant,

I was looking explicitly at the client base.  That uses GRPC at the moment – with protocol buffers from what I can see.

Now – the code to populate those grpc protocol buffers and the rest of is is what I’m aiming at getting  a port of – effectively if you look at the tutorials – they import p4 config and they import a p4runtime library – its that library that I’m working on porting over into something transparent and easy


From: "" <>
Organisation: MNK Consulting
Reply to: "" <>
Date: Sunday, 21 July 2019 at 08:59
To: Andrew Alston <>om>, "" <>
Subject: RE: [Coin] P4 runtime etc.


Are you talking about p4runtime server or client?  The client is part of the ONOS controller.  The server,  which runs on the switch, at this open repo, uses mostly C++ for implementation.  The test scripts use Python.<>

The PI code integrates with switch asic SDK. If the p4runtime implementation moves from C++ to GoLang, please look into how to call SDK API from GoLang.


From: Coin <> On Behalf Of Andrew Alston
Sent: Sunday, July 21, 2019 8:06 AM
Subject: [Coin] P4 runtime etc.

Hi All,

So after yesterday’s hackathon session and a brief bit of sleep – I decided to take a look at implementing other code we had using a p4 data plane – now that was interesting – because when I started looking at the p4runtime implementations etc. – as stated, they use grpc – but there is actually a fair bit in there in the python libraries.

So – What I’ve started – and am in the very very early stages of doing – is creating a Golang port of the p4 runtime libraries – this will let me handle the Protobufs and GRPC calls correctly from Golang.  As I move on this – I’ll happily opensource this code and share it as it comes – and I’ll request some of my team to get involved in this as well.

If there are any golang coders out there interested in assisting with this project – I’d be happy to discuss.  I’ll also get details this morning about where we can commit code to a public repo so we can check the code in etc as we go in case anyone else has a use case for it