Skip to content

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

};

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

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

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.

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.

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.

4 participants