Skip to content
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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

jasonbking
Copy link

No description provided.

@jasonbking
Copy link
Author

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

Copy link

@danmcd danmcd left a 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

usr/src/cmd/mdb/common/modules/genunix/qqcache.c Outdated Show resolved Hide resolved
};

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

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

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

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

Choose a reason for hiding this comment

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

Separate bug?

Copy link
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

Choose a reason for hiding this comment

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

Adding bsearch().

usr/src/man/man1m/ovroute.1m Outdated Show resolved Hide resolved
usr/src/man/man1m/ovroute.1m Outdated Show resolved Hide resolved
if (ret > 0)
return (-1);

/*
Copy link

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

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

Choose a reason for hiding this comment

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

Ack. Please note that?

Copy link

@danmcd danmcd left a 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.

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

Copy link

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?

Copy link
Author

@jasonbking jasonbking Feb 9, 2021

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

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

usr/src/uts/common/io/overlay/overlay_target.c Outdated Show resolved Hide resolved
usr/src/uts/common/qqcache/qqcache.c Show resolved Hide resolved
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.

None yet

3 participants