Skip to content

LDWG meeting minutes, April 15, 2019

Nate Foster edited this page Apr 15, 2019 · 2 revisions

Attendees

  • Antonin Bas (Barefoot)
  • Mihai Budiu (VMware)
  • Calin Cascaval (Barefoot)
  • Andy Fingerhut (Cisco)
  • Nate Foster (Cornell)
  • Hemant Singh (MNK Consulting)

Mark-to-drop

  • Issue: https://github.com/p4lang/p4c/issues/1828

  • PR: https://github.com/p4lang/p4c/pull/1835

  • Initially mark_to_drop had no argument, but it had an effect on standard_metadata.egress_spec.

  • The proposal makes the old mark_to_drop extern deprecated, which will affect some programs in the short term.

  • There are also some extra copies of the standard metadata struct.

  • A good project could be to document v1model.p4 and write a better documented architecture spec.

  • Action Item: the p4c committers can merge when appropriate.

Static Computation of Header Sizes

Nested Structures

  • PR: https://github.com/p4lang/p4c/pull/719

  • This proposal already has been approved and small suggestions have been addressed.

  • Action Item: this will be merged in about a day, unless there are objections.

Structure Initializers

  • PR: https://github.com/p4lang/p4c/pull/717

  • This proposal allows initializing structures using a list of key-value pairs.

  • To disambiguate types, the programmer can supply a type before the list.

  • Type inference has not been implemented.

  • Perhaps we can split into two? One for struct initializers and another for struct literals.

  • Action Item: @mbudiu-vmw will split the proposal in favor of having the simpler version now.

One-Bit Integers

  • PR: https://github.com/p4lang/p4c/pull/701

  • We had previously agreed to allow one-bit signed integers, int<1>, and to treat slices of signed integers as signed.

  • Action Item: @mbudiu-vmw will revise and we'll merge.

Int types

Intrinsic Metadata and Recirculate/Resubmit

  • Issue: https://github.com/p4lang/p4c/issues/1704

  • Related PR: https://github.com/p4lang/p4c/pull/1852

  • This problem is really a P4_14 and compiler issue. In particular, the program switch.p4 uses these fields.

  • The related PR removes several old intrinsic metadata fields.

  • The broader principle going forward is that all intrinsic and queueing metadata must be in V1Model standard_metadata to work with recirculate and resubmit, and the P4_14 to P4_16 compiler, will need to translate references to these fields appropriately.

  • Action Item: Let's merge #1852 and revisit #1704.

Overlays

  • PR: https://github.com/p4lang/p4-spec/pull/656

  • Provides safe access to C-style unions.

  • Aside: we should also have a general union.

  • Semantics is that write operations are propagated to underlying storage (so unlike the analogous functions.)

  • Some assignment operations require an extra copy.

  • Copy-in/copy-out semantics handles aliasing issues.

  • It would be nice to have an implementation before merging.

  • Action Item: Work on an implementation in p4c. Clarify how casts can be used.

Externs as constructor parameters

Module System

namespace foo {
  a = 
  b = 
  c = 
}

/* option 1 */
import foo

foo.a
foo.b
foo.c

/* option 2 */
import foo as f
f.a
f.b
f.c

/* option 3 */
from foo import a,b,c
a
b
c

/* not allowed */
from foo import *
  • Where do namespaces come from?
  • How are ambiguities resolved?
  • What operations do we have on them?
  • In particular, how do we do conditional operations?

Next Meeting

  • Let's continue next Monday!
Clone this wiki locally