Comments (5)
According to the P4 spec, the first parameter of generate_digest
is an opaque value which identifies the receiver of the learning notification. In bmv1, this parameter has to be equal to 1024
in order for learning to happen (let's say this is the identifier of the bmv1 learning channel, and that all other receiver values will lead to the generate_digest
call being ignored). In bmv2, this first parameter will completely be ignored (you can set it to whatever you want) and all learning notifications go to the same channel (they are broadcast on an IPC socket).
from p4factory.
Thanks for you reply. So it means 1024 is the learning channel for bmv1.Will the mac learning can automatically happen or we should write the channel handler via an IPC socket?
from p4factory.
On bmv1: it depends on whether 1) you write a C application and link it with the bmv1 binary, or 2) do learning through the Thrift RPC server. For 1), the PD library lets you register a callback that will be called every time a new value is learned. For 2) you have to periodically poll the RPC sever to check for new samples learned. I found an old email I sent about this: https://gist.github.com/antoninbas/490676675388c25d6de9
On bmv2: learning notifications are published on a nanomsg IPC socket. There is an example C++ application which does learning checked in the bmv2 repository: https://github.com/p4lang/behavioral-model/blob/master/targets/l2_switch/learn_client/learn_client.cpp
I would advise using bmv2, as bmv1 is likely to be be officially deprecated soon.
Noe that in both cases, populating the mac tables is the responsibility of the application. The switch generates learning notifications, but it is up to the application to act on them.
from p4factory.
I see. Thanks for your reply.
from p4factory.
@antoninbas How can I implement several applications outside of P4, not just mac learning?
from p4factory.
Related Issues (20)
- Connection reset by Peer (error 104) - When INT configuring SPINE HOT 3
- install_deps.sh error HOT 1
- install error HOT 2
- add table entries for multiple switches. HOT 6
- Configure two different switches in mininet simple_routing HOT 3
- installation is onerous - multiple issues
- int_ref_topology.py failed at docker_node.py self.pid = int(ps_out[0])
- app int mininet cannot ping between hosts due to wrong config for leaf/spine
- App INT error:Tsocket read 0 bytes error HOT 2
- run simple_router target error :No handlers could be found for logger "thrift.transport.TSocket" HOT 2
- Installation help on mininet?
- Ip fragmentation in p4 switch or host HOT 1
- Is the INT demo in p4 working? HOT 1
- Ubuntu 16.04 seems not supported
- Getting INT counters values from INT sinks
- Error while running : int_ref_topology.py
- Some questions about webclient?
- make bm error HOT 1
- saithrift cases are failing
- issues with creating docker image,vxlan driver HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p4factory.