-
Notifications
You must be signed in to change notification settings - Fork 111
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
OS-6768 overlays should be capable of L3 routing #341
base: master
Are you sure you want to change the base?
Conversation
I don't plan to integrate this until the other bits are also ready, but just to get a start on things.. |
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.
Pass 0 checkpoint mid-way through overlay_router.c
}; | ||
|
||
static inline void | ||
net_addr(in_addr_t *dest, const in_addr_t *src, uint8_t prefixlen) |
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.
You think this would be something in libnsl or libsocket.
(This also reminds me we need to fold most/all of libnsl & libsocket into libc...)
* We require at least one address, as well as the parameters in | ||
* req_params. | ||
* | ||
* XXX: Error message could probably be made better. |
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.
Split the missing-addresses out from the req_params.
#if !defined(_BOOT) && !defined(_KMDB) | ||
#include "lint.h" | ||
#endif /* !_BOOT && !_KMDB */ | ||
#ifndef _KERNEL |
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.
Separate bug?
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.
Which? Adding bsearch()
to genunix or the #ifndef
bits?
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.
Adding bsearch().
if (ret > 0) | ||
return (-1); | ||
|
||
/* |
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.
AHA! My question is answered!
strlen(rnet->oin_routetbl) != 0) | ||
return (EINVAL); | ||
|
||
/* TODO */ |
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.
XXX KEBE ASKS what's the plan for this?
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 idea is to add a 'flush' command, similar to route flush
. Just ran out of time.
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.
Ack. Please note that?
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.
Pass 0 finished.
I don't see a lot that triggers my obvious-problem detectors. I'll provide pass 1 after responses and when both TRITON-2188 goes back and the Triton 20210131 release drops.
const overlay_net_t *r = b; | ||
const struct in6_addr *laddr = &l->ont_netv6; | ||
const struct in6_addr *raddr = &r->ont_netv6; | ||
|
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.
Don't you need to ntohl() these 4-byte components as well, like you do in the IPv4 case?
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.
It's doing a per-byte (instead of per 32-bit integer) comparison, so it shouldn't be necessary. If we want to compare 32 or 64 bits at a time, then I believe it would.
bcopy(&otc->otc_entry.otce_dest.otp_ip, | ||
&ote->ote_key.otk_ip, sizeof (struct in6_addr)); | ||
} else { | ||
bcopy(otc->otc_entry.otce_mac, ote->ote_key.otk_mac, |
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 take it zeroing-out isn't going to matter here.
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 kmem cache constructor zeros out the entry, and we also zero out the fields when we free the entry (prior to returning it to the cache), so it should already be zeroed.
No description provided.