Re: [Coin] P4 Hackathon tools

Marc LeClerc <marc.leclerc@noviflow.com> Mon, 17 June 2019 13:15 UTC

Return-Path: <marc.leclerc@noviflow.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 43ABA120125 for <coin@ietfa.amsl.com>; Mon, 17 Jun 2019 06:15:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.233
X-Spam-Level:
X-Spam-Status: No, score=-1.233 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=noviflow-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M7Ish3IHMxWv for <coin@ietfa.amsl.com>; Mon, 17 Jun 2019 06:15:04 -0700 (PDT)
Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BFA63120091 for <coin@irtf.org>; Mon, 17 Jun 2019 06:15:03 -0700 (PDT)
Received: by mail-qt1-x82e.google.com with SMTP id h21so10527822qtn.13 for <coin@irtf.org>; Mon, 17 Jun 2019 06:15:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noviflow-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=TASjuTrqVpglIeOmFbpveCHtZ3cYAi0DNhE30uNpbUk=; b=hvMaHcUVbsqTSwnXK4NMuNwo/8hBmJuwtTnCmubvqejALCb6tbKvK5/zYJKzAGNseN J44mldZAkrTFS08TRjAi0ay2+tUBIJDa3UZIzryqZAlDQbPJh6H6RbdEplDS68GEx4ld vo0H/Srm6Vq1TQtv0102QJuzQFlZ0PDEc1zWM9pi0e1fey0szLdhLR6f9G/GMsWsGa7Q q0WGGO7++bOaDsbZUEWeLyyXvKvt2AYAbIYzwiiiKwH600RYAiwvlnGL8j41im2fyWtu sQV46HOA6PqhDQH8OQJaJQ44E/GJLEgbcl37cRp0IeZ2+rNN/eV0oCI2F2lG3U3hfuA7 YIhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=TASjuTrqVpglIeOmFbpveCHtZ3cYAi0DNhE30uNpbUk=; b=PTjq2E7VgrMYGNcgM8i5clhTi91/9Qj6CzLIcUytSZUm8hh2M0yMq42YrHGaSS5eeT Sk+EFhLkr2FQE9V+D9kCRyNwkVHieDFWgnPWgjkRZbUosLzsibrDSTC2i2PFk7Ys5EhN x3LfJQiQvJ3quF2vq+Idu3f0pEJ6TP69V23BL+6M47yebSk8qMy2105/DJGMa6z1o74f k5ZSRd+u4NYsT/9a0/TYVIfHIm4qLuOm8a8LPuFr7exOG0HxY9zl9Vmbu0hBVp+PveMp OUQTX+3em2Uh1xIdwBrcojt3fTa7XikeAxAJQaQfmI0Z/nXLmeGw2g8VT2hNSq4tY+j+ yK6Q==
X-Gm-Message-State: APjAAAXOO7XOrxL6mRv+PmkP8hjniRufzwEHIdciJiW6BWNlgHXefHD3 YGnHr9UolKzdVqyKBSAD52B21g==
X-Google-Smtp-Source: APXvYqwWXKj36XzK2toCy7Uh4GEilcHkB5SbO/kXx6pJpbsqggOHmWvLWik8SVy3MX95ZHOd9xxXFg==
X-Received: by 2002:a0c:8102:: with SMTP id 2mr21080892qvc.239.1560777302567; Mon, 17 Jun 2019 06:15:02 -0700 (PDT)
Received: from [192.168.100.42] (modemcable045.254-131-66.mc.videotron.ca. [66.131.254.45]) by smtp.gmail.com with ESMTPSA id n93sm6602768qte.1.2019.06.17.06.15.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 06:15:01 -0700 (PDT)
From: Marc LeClerc <marc.leclerc@noviflow.com>
Message-Id: <6253A2B1-2610-4457-BD59-8DF6F5DC99FA@noviflow.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_71B96653-5DBB-4BA1-B851-128B83CC3489"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Mon, 17 Jun 2019 09:14:59 -0400
In-Reply-To: <mailman.351.1560773595.14616.coin@irtf.org>
Cc: coin@irtf.org, Marie-Jose Montpetit <marie@mjmontpetit.com>, jeffrey.he@huawei.com, eve.m.schooler@intel.com
To: hemant@mnkcg.com
References: <mailman.351.1560773595.14616.coin@irtf.org>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/coin/FCdOQwVXye8XXTKHRJ2GztfZHp4>
Subject: Re: [Coin] P4 Hackathon tools
X-BeenThere: coin@irtf.org
X-Mailman-Version: 2.1.29
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: Mon, 17 Jun 2019 13:15:07 -0000

Hello all,

Just to be clear we are proposing the use of P4-16 tools, not p4-14. Our development team is well versed in both environments if P4-16 isn’t acceptable.

VBR/Marc

 
Marc LeClerc
VP Strategy and Marketing
NoviFlow Inc.
Tel: +1-438-807-4363
Mob: +1-514-402-5948
marc.leclerc@noviflow.com

www.noviflow.com



> On Jun 17, 2019, at 8:13 AM, coin-request@irtf.org wrote:
> 
> Send Coin mailing list submissions to
> 	coin@irtf.org <mailto:coin@irtf.org>
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://www.irtf.org/mailman/listinfo/coin <https://www.irtf.org/mailman/listinfo/coin>
> or, via email, send a message with subject or body 'help' to
> 	coin-request@irtf.org <mailto:coin-request@irtf.org>
> 
> You can reach the person managing the list at
> 	coin-owner@irtf.org <mailto:coin-owner@irtf.org>
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Coin digest..."
> Today's Topics:
> 
>   1. Re: Draft minutes - COINRG interim meeting - 2019-06-07
>      (hemant@mnkcg.com <mailto:hemant@mnkcg.com>)
> 
> From: <hemant@mnkcg.com <mailto:hemant@mnkcg.com>>
> Subject: Re: [Coin] Draft minutes - COINRG interim meeting - 2019-06-07
> Date: June 17, 2019 at 8:13:09 AM GMT-4
> To: "'Hejianfei \(Jeffrey\)'" <jeffrey.he@huawei.com <mailto:jeffrey.he@huawei.com>>, "'Marie-Jose Montpetit'" <marie@mjmontpetit.com <mailto:marie@mjmontpetit.com>>
> Cc: "'Schooler, Eve M'" <eve.m.schooler@intel.com <mailto:eve.m.schooler@intel.com>>, <coin@irtf.org <mailto:coin@irtf.org>>
> Reply-To: <hemant@mnkcg.com <mailto:hemant@mnkcg.com>>
> 
> 
> There could be another pitfall with using Tofino tools chain.  Switch companies, e.g., Cisco have shipped p4-14 code with their Tofino switch.  I suspect, even Arista switch using Tofino shipped with p4-14.   What if NoviFlow brings Tofino switches and p4-14 tools chain to the hackathon?  Nobody in the research community works with older p4-14.  Folks are using p4-16.
>  
> Regarding Jeffrey’s notes, below, item 1 is totally possible.  Just use a Windows laptop with Ubuntu running in a virtual machine.  I’d give 20G-30G disk space to Ubuntu and 4G of RAM.  P4lang/p4c does not use much disk space.  P4lang/p4c also supports MacOS.  
>  
> See P4 code I checked in.  The code was tested using STF packets and virtual bmv2 simple_switch from p4lang/p4c.
>  
> https://github.com/IETF-Hackathon/p4-ipv6-switch-ml/blob/master/ipv6-switch-ml-bmv2.stf#L52 <https://github.com/IETF-Hackathon/p4-ipv6-switch-ml/blob/master/ipv6-switch-ml-bmv2.stf#L52>                                                                             
>  
> A STF (Simple Test Framework) file uses “packet” to send and “expected” packet to test received packet from the virtual simple_switch.  I do generate my packets using Scapy and use a small Python program to convert Scapy packet to STF byte format.  See https://github.com/jafingerhut/p4-guide/blob/master/README-scapy.md <https://github.com/jafingerhut/p4-guide/blob/master/README-scapy.md> and a function called bytes_to_hex.  STF also allows commands to program data plane tables.   If you see the wiki (https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon <https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon>), I have added more notes to the IPv6 Switch ML project.  The notes list one script that downloads p4lang/p4c and behavioral-model software and dependencies.  Just build both software and then one is ready to use p4c and STF packets with bmv2 and simple_switch.  If have also provided a link to MacOS users.   p4lang/p4c is the P4 compiler and p4lang/behavioral-model includes the virtual simple_switch software to run packets thru.  
>  
> Regarding item 2, I agree it’s good work and also challenging.  P4 is not the best language to maintain state.  After all, P4 was designed for forwarding packets over 6 Tbps.  P4 uses registers to maintain state.  I will add notes to the wiki for how to maintain state using P4 registers with example of p4-16 code. 
>  
> Thanks,
>  
> Hemant
>  
> From: Hejianfei (Jeffrey) <jeffrey.he@huawei.com <mailto:jeffrey.he@huawei.com>> 
> Sent: Sunday, June 16, 2019 10:23 PM
> To: Marie-Jose Montpetit <marie@mjmontpetit.com <mailto:marie@mjmontpetit.com>>; hemant@mnkcg.com <mailto:hemant@mnkcg.com>
> Cc: Schooler, Eve M <eve.m.schooler@intel.com <mailto:eve.m.schooler@intel.com>>; coin@irtf.org <mailto:coin@irtf.org>
> Subject: 答复: [Coin] Draft minutes - COINRG interim meeting - 2019-06-07
>  
> A few suggestions for the P4 hackathon in Montreal ( chair hat off):
> Tool kit: I tend to agree with Hemant to use P4C compiler and bmv2 as the behavioral model for the P4 software switch.  We can generate virtual ports from Linux, connect these ports to this P4 software switch, use tools(e.g scapy + wireshark) to send and check the in/out packets of the switch to test if it works correctly. Then, every team in this hackathon only need a server or Virtual machine to run these software?
> We also need some tasks for the teams to select and challenge, right? The attractive part of P4 and programmable switches to me is essentially to process packets in a “stateful”/correlated way. then, according to 
> 1) these correlated packets are in the same flow or from different flows 
> 2) the objective for processing is for better forwarding/transport or non traditional forwarding(e.g cache/compute), 
> we may have 4 quadrants: 
> 1) single-flow processing for better forwarding: e.g FEC, re-ordering, flowlet-based load balancing etc. 
> 2) co-flow processing for better forwarding: e.g new scheduling or AQM? (I am not sure how we can control the queue management part in the BVM2, need to check). 
> 3) single-flow 4) co-flow processing for non-traditional forwarding function: Quite a few research projects has been listed in the draft(https://datatracker.ietf.org/doc/draft-he-coin-managed-networks/ <https://datatracker.ietf.org/doc/draft-he-coin-managed-networks/>), but maybe the simplest use case is the ConvergeCast(http://www.cs.yale.edu/homes/aspnes/pinewiki/ConvergeCast.html?highlight=%28CategoryDistributedComputingNotes%29 <http://www.cs.yale.edu/homes/aspnes/pinewiki/ConvergeCast.html?highlight=%28CategoryDistributedComputingNotes%29>)?
> My two cents,
> Jianfei(Jeffrey)
>  
> 发件人: Marie-Jose Montpetit [mailto:marie@mjmontpetit.com <mailto:marie@mjmontpetit.com>] 
> 发送时间: 2019年6月14日 22:40
> 收件人: hemant@mnkcg.com <mailto:hemant@mnkcg.com>
> 抄送: Schooler, Eve M <eve.m.schooler@intel.com <mailto:eve.m.schooler@intel.com>>; coin@irtf.org <mailto:coin@irtf.org>; Hejianfei (Jeffrey) <jeffrey.he@huawei.com <mailto:jeffrey.he@huawei.com>>
> 主题: Re: [Coin] Draft minutes - COINRG interim meeting - 2019-06-07
>  
> Thanks for this.
>  
> I plan to work on the hackaton next week. I was and still am in all day meetings all week in Montreal.
>  
>  
> mjm
>  
>  
>  
>  
>  
> 
> On Jun 14, 2019, at 10:24 AM, <hemant@mnkcg.com <mailto:hemant@mnkcg.com>> <hemant@mnkcg.com <mailto:hemant@mnkcg.com>> wrote:
>  
>  
> From: Coin <coin-bounces@irtf.org <mailto:coin-bounces@irtf.org>> On Behalf Of Schooler, Eve M
> Sent: Friday, June 14, 2019 3:29 AM
> To: coin@irtf.org <mailto:coin@irtf.org>
> Cc: Schooler, Eve M <eve.m.schooler@intel.com <mailto:eve.m.schooler@intel.com>>; Marie-Jose Montpetit <marie@mjmontpetit.com <mailto:marie@mjmontpetit.com>>; Hejianfei (Jeffrey) <jeffrey.he@huawei.com <mailto:jeffrey.he@huawei.com>>
> Subject: [Coin] Draft minutes - COINRG interim meeting - 2019-06-07
>  
> 
> P4 Hackathon
> -----------------
> 
> 
> Marc: As a marketing person, sees a hackathon as having two objectives: 1) promote ideas and 2) attract people to participate in the execution of those ideas. Could call it a hackathon focused on a programmable forwarding plane.
> However, need to make it interesting, yet the technology should not be too broad. In the case of Noviflow, we’ve been developing programmable forwarding planes for 7 years. We have a lot of experienced engineers who know how to use the Barefoot development tools. Therefore the hackathon could basically use Barefoot's toolkit to do the exercises. In contrast to what was done in Boston, have a suggestion on areas for things to look into. Example: take a look at the intimate connection between forwarding plane and application and services, e.g., ask the students to accurately test the latency of services, which would be a specific target so can be delivered within the scope of 2 days. Contrary to the Boston P4 hackathon, have more of a unified environment, have experts from NoviFlow provide assistance so they can focus on the idea creation, not on the tools.
>  
> <hs> Boston hackathon, which I attended for the whole day, did have a unified environment – all of us used p4lang/p4c (open-source P4 compiler).  All of us in Boston who wrote P4 programs hit the ground running with p4lang/p4c.  Thus, even, we spent time on ideas, not tools.   We had over 19 years of data plane programming experience at Boston.  MNK Consulting (http://mnkcg.com <http://mnkcg.com/> ) with > 13 years of Cisco pxf, Cisco QFP,  Cavium Xpliant data planes, and P4 experience since Fall 1996.  Juniper was there with 6 years data plane programming.  Now, MNK Consulting has Barefoot Tofino experience as well – I am working remotely on Saturday and available for help  via the P4 Slack channel (userid: Hemant).
>  
> I see a problem with Barefoot’s Tofino tools chain.  For example, there are 20 of us at the P4 hackathon.  Each one of us would like the Tofino tools chains installed on our laptops.  How would NoviFlow help with that before the hackathon?  Or will NoviFlow provide 20 machines with Tofino tools chain built and ready for use?  Sharing machines slows down productivity.  What if some of us are remote – how do we login to the machines remotely?  I have already asked about NDA issues with Barefoot.
>  
> In contrast, if one uses the p4lang/p4c, we have no external dependency and start writing P4 programs immediately. P4lang/p4c also includes a tools chain to test using packets.   I suggest to use either environment and crank out P4 code.  
>  
> We should get more ideas – please add them to the wiki: https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon <https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon>  
>  
> Hemant
>  
> 
> 
> Coin mailing list
> Coin@irtf.org <mailto:Coin@irtf.org>
> https://www.irtf.org/mailman/listinfo/coin <https://www.irtf.org/mailman/listinfo/coin>