[P4-dev] Modifying behavioral-model codebase to be more general

Antonin Bas antonin at barefootnetworks.com
Mon Feb 22 17:09:15 EST 2016


Hi Gordon,

Thanks to your interest in P4 and the behavioral model.
I am of course open to new contributions to the code base, as long as they
meet certain criteria:
- they adhere to the coding guidelines and come with sufficient code
coverage
- they are general enough that they can benefit to other people and are
easy to use
- they do not slow down packet processing (for example in your use case,
adding a new implementation to a virtual interface is perfectly fine)
- they do not make the code base significantly more difficult to understand
You should also be open to comments during code review and be ready to
modify your pull request.

For your specific use case, I would start looking at the match unit
interface (
https://github.com/p4lang/behavioral-model/blob/master/modules/bm_sim/include/bm_sim/match_units.h)
and how you can provide new implementations for it.

Looking forward to your contribution.

Thanks,

Antonin

On Mon, Feb 22, 2016 at 11:17 AM, Gordon Bailey <gb at gordonbailey.net> wrote:

> Hello,
>
> I'm currently working on a project modelling network devices in SystemC,
> and we are interested in using P4 (specifically the behavioral-model
> codebase) for the behavioral component of our simulation models. To
> implement all of the features which we are interested in, some
> modifications to behavioral-model would be required. One example is that we
> are interested in modelling memory performance, and so we need to use our
> own trie and hashtable structures which interact with our memory model, but
> the current behavioral-model does not allow specifying the implementations
> of the various data structures. For this particular problem I would be
> interested in modifying the code to allow the user to provide a factory
> class (or something similar) for creating the datastructures.
>
> My question is if the maintainers would be open to these types of
> contributions, and if so, what would be the process to propose and discuss
> new features?
>
> Thanks for your time,
>
> Gordon
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20160222/0a61282e/attachment-0002.html>


More information about the P4-dev mailing list