Re: [Coin] P4 runtime etc.

<> Sun, 21 July 2019 13:26 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id F37EF1200B1 for <>; Sun, 21 Jul 2019 06:26:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Z9yPQHn_ev2V for <>; Sun, 21 Jul 2019 06:26:36 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 791C712004E for <>; Sun, 21 Jul 2019 06:26:36 -0700 (PDT)
Received: from ([]:54571 helo=hemantPC) by with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.92) (envelope-from <>) id 1hpBr7-00E5Bj-Gb; Sun, 21 Jul 2019 08:26:32 -0500
Reply-To: <>
From: <>
To: "'Andrew Alston'" <>, <>
References: <> <01fc01d53fc4$191a46b0$4b4ed410$> <>
In-Reply-To: <>
Date: Sun, 21 Jul 2019 09:26:43 -0400
Organization: MNK Consulting
Message-ID: <021501d53fc7$f0639ec0$d12adc40$>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0216_01D53FA6.6955F660"
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIjBljv1BzS9dacH9UC+gfhXLULTgDqDpB3AergtcmmIttigA==
Content-Language: en-us
X-OutGoing-Spam-Status: No, score=-0.2
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname -
X-AntiAbuse: Original Domain -
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain -
X-Get-Message-Sender-Via: authenticated_id:
X-From-Rewrite: unmodified, already matched
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:26:39 -0000

Yes, since the p44runtime server uses gRPC, the client will also use gRPC.  Changing client to Golang sounds good.


Good luck,




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


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 < <> >, " <> " < <> >
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
To: <> 
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