Skip to content

OS-6768 overlays should be capable of L3 routing#341

Open
jasonbking wants to merge 17 commits into
masterfrom
vpc2
Open

OS-6768 overlays should be capable of L3 routing#341
jasonbking wants to merge 17 commits into
masterfrom
vpc2

Conversation

@jasonbking

Copy link
Copy Markdown

No description provided.

@jasonbking

Copy link
Copy Markdown
Author

I don't plan to integrate this until the other bits are also ready, but just to get a start on things..

@danmcd danmcd left a comment

Copy link
Copy Markdown

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

Comment thread usr/src/cmd/mdb/common/modules/genunix/qqcache.c Outdated
};

static inline void
net_addr(in_addr_t *dest, const in_addr_t *src, uint8_t prefixlen)

Copy link
Copy Markdown

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...)

Comment thread usr/src/cmd/ovroute/ovroute.c
* We require at least one address, as well as the parameters in
* req_params.
*
* XXX: Error message could probably be made better.

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate bug?

Copy link
Copy Markdown
Author

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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding bsearch().

Comment thread usr/src/man/man1m/ovroute.1m Outdated
Comment thread usr/src/man/man1m/ovroute.1m Outdated
Comment thread usr/src/uts/common/io/overlay/overlay_router.c
if (ret > 0)
return (-1);

/*

Copy link
Copy Markdown

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 */

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Please note that?

@danmcd danmcd left a comment

Copy link
Copy Markdown

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.

Comment thread usr/src/uts/common/io/overlay/overlay_router.c
Comment thread usr/src/uts/common/io/overlay/overlay_router.c Outdated
Comment thread usr/src/uts/common/io/overlay/overlay_router.c
const overlay_net_t *r = b;
const struct in6_addr *laddr = &l->ont_netv6;
const struct in6_addr *raddr = &r->ont_netv6;

Copy link
Copy Markdown

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?

@jasonbking jasonbking Feb 9, 2021

Copy link
Copy Markdown
Author

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,

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Author

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.

Comment thread usr/src/uts/common/io/overlay/overlay_target.c Outdated
Comment thread usr/src/uts/common/qqcache/qqcache.c
Comment thread usr/src/man/man1m/ovroute.1m Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants