p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

List of links to previous answers to the question "How do I add X to open source P4 tools"?

AF
Andy Fingerhut
Tue, Nov 30, 2021 7:51 PM

I know that questions like these have come up before in p4lang
repositories, often as Github issues, some of which may have been answered
and are now closed (although still accessible in full as Github closed
issues, thankfully).

I'd like to collect a list of any existing answers to questions like those
shown below (or similar questions that they remind you of), even if the
answers are considered partial, or "see this earlier commit for an example".

The goal is to collect these together in one web page somewhere, and
improve upon them over time, e.g. turn some of them into checked-in
README/documentation files in the p4c and/or behavioral-model
repositories.  For now, simply reply-all to this message on the p4-dev list
with pointers to closed Github issues/comments, or any other links to
public web pages with at least partial answers, is good enough.  We can
find a volunteer or two in the every-2-weeks "P4.org open source developer
days" meetings that can help collect and organize these, I hope.

  • How do I add a new hash function to the hash extern function?  (i.e. not
    a new extern, but support for additional constructor parameter values to an
    existing extern)
  • How do I add a new extern function?  (one that needs additional
    definition in architecture include file, probably some additions to p4c
    back end for the target, and changes to bmv2)
  • How do I add support for a new P4 match kind?
  • How do I add support for a new table property?
  • How do I enable support for multiple queues per output port in bmv2?  How
    do I configure maximum packet/byte rates for each queue?  Maximum depths
    for each queue?  What is the scheduling algorithm used between the multiple
    queues per output port?  Can we make this a command line option for bmv2,
    instead of the current changing a #define/#undef in the code and
    recompiling?
  • Can we make using gettimeofday() in bmv2 to be the way to determine
    ingress and egress timestamps available through a bmv2 command line
    option?  This would give either perfect time sync when running multiple
    simple_switch processes in a single host, or NTP-quality time
    synchronization if they are running on different hosts with NTP configured.

Regards,
Andy Fingerhut

I know that questions like these have come up before in p4lang repositories, often as Github issues, some of which may have been answered and are now closed (although still accessible in full as Github closed issues, thankfully). I'd like to collect a list of any existing answers to questions like those shown below (or similar questions that they remind you of), even if the answers are considered partial, or "see this earlier commit for an example". The goal is to collect these together in one web page somewhere, and improve upon them over time, e.g. turn some of them into checked-in README/documentation files in the p4c and/or behavioral-model repositories. For now, simply reply-all to this message on the p4-dev list with pointers to closed Github issues/comments, or any other links to public web pages with at least partial answers, is good enough. We can find a volunteer or two in the every-2-weeks "P4.org open source developer days" meetings that can help collect and organize these, I hope. + How do I add a new hash function to the hash extern function? (i.e. not a new extern, but support for additional constructor parameter values to an existing extern) + How do I add a new extern function? (one that needs additional definition in architecture include file, probably some additions to p4c back end for the target, and changes to bmv2) + How do I add support for a new P4 match kind? + How do I add support for a new table property? + How do I enable support for multiple queues per output port in bmv2? How do I configure maximum packet/byte rates for each queue? Maximum depths for each queue? What is the scheduling algorithm used between the multiple queues per output port? Can we make this a command line option for bmv2, instead of the current changing a #define/#undef in the code and recompiling? + Can we make using gettimeofday() in bmv2 to be the way to determine ingress and egress timestamps available through a bmv2 command line option? This would give either perfect time sync when running multiple simple_switch processes in a single host, or NTP-quality time synchronization if they are running on different hosts with NTP configured. Regards, Andy Fingerhut