-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add raweth transport (implementation) #283
Add raweth transport (implementation) #283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not to consider each raweth
as a new Zenoh link
, and each keyexpr
mapping to a multicast ethernet address to be the instantiation of a new link?
It seems to me that it would imply less code replication and less cross-layer dependencies between code components.
Can't reply directly to your comment @cguimaraes, so answering here. Truly, the major offender of this PR is breaking the transport/link separation but at the same time it's completely isolated from the rest of Zenoh and can be easily removed, which alleviates the code replication. Currently a session can only have one transport and one link |
@jean-roland that in indeed a current limitation. But, eventually, we need to extend it to support It seems that now would be the time to support multiple links given the constraints you are having. I would like to avoid shortcuts now that could become headaches in the future. Also, in Zenoh there are only two types of transports: |
The main goals of the
Based on the above, I believe in this particular case moving to
|
@Mallets: Some update on the PR:
|
eefdcd3
to
79ecd1d
Compare
src/transport/raweth/config.c
Outdated
const _zp_raweth_cfg_entry _ZP_RAWETH_CFG_ARRAY[] = { | ||
{{0, {0}, ""}, 0x00, {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}, false}, // Default mac addr | ||
{{0, {0}, "some/key/expr"}, 0x8c, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}, true}, // entry1 | ||
{{0, {0}, "another/keyexpr"}, 0x43, {0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, true}, // entry2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config should also include a list of allowed MAC addresses in RX.
@@ -0,0 +1,208 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file really needed? From what I see there is nothing really specific to raweth
but rather a code duplication from a generic multicast transport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For lease/read/join the only differences is the send_t function if I'm not mistaken, so there certainly is a way to mutualize the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. In the meanwhile I'd like to the raweth
being validated. My proposal is the following:
- We keep this PR open (and not merging it yet)
- You can work on an additional PR (based on this one - or directly on this one) that implements the actual logic and code glue
- Once
raweth
is validated, we can think about merging into master
Does it sound like a plan?
Alright so moving from the draft to testing phase some modifications needed to be made:
|
d2a2e94
to
55cc05e
Compare
We had a request to send data on an Ethernet link with VLAN support on multicast addresses. This should have been a multicast transport with Ethernet link but we needed to map each
keyexpr
to a multicast address, from a specific configuration file.This is not possible to do from the link layer since links don't deal with
keyexpr
, so we went the route of an ad hoc multicast transport that only deal with raw Ethernet frames and VLAN.This PR only include the transport implementation, not the code binding the transport to the rest of Zenoh to focus the review on the transport itself.
Here is what's included:
reth
, everything else is given by the configkeyexpr
mapping information