Skip to content

Commit

Permalink
OS-3000 I for one, welcome my overlay network overlords
Browse files Browse the repository at this point in the history
OS-3080 Need direct callbacks from socket upcalls via ksocket
OS-3943 want vxlan support
OS-3944 snoop should support vxlan
OS-3945 want varpd direct plugin
OS-3946 want varpd files plugin
OS-3947 want varpd svp plugin
OS-3948 refhash could be used outside of mpt_sas
OS-3949 want string property ranges for mac
  • Loading branch information
rmustacc committed Feb 28, 2015
1 parent bcb20d3 commit 2817066
Show file tree
Hide file tree
Showing 124 changed files with 19,929 additions and 49 deletions.
25 changes: 25 additions & 0 deletions manifest
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ f kernel/drv/amd64/oce 0755 root sys
f kernel/drv/amd64/ohci 0755 root sys
f kernel/drv/amd64/openeepr 0755 root sys
f kernel/drv/amd64/options 0755 root sys
f kernel/drv/amd64/overlay 0755 root sys
f kernel/drv/amd64/pci_pci 0755 root sys
f kernel/drv/amd64/pcieb 0755 root sys
f kernel/drv/amd64/physmem 0755 root sys
Expand Down Expand Up @@ -796,6 +797,7 @@ f kernel/drv/nxge.conf 0644 root sys
f kernel/drv/ohci.conf 0644 root sys
f kernel/drv/openeepr.conf 0644 root sys
f kernel/drv/options.conf 0644 root sys
f kernel/drv/overlay.conf 0644 root sys
f kernel/drv/pcieb.conf 0644 root sys
f kernel/drv/physmem.conf 0644 root sys
f kernel/drv/pmcs.conf 0644 root sys
Expand Down Expand Up @@ -1048,6 +1050,9 @@ f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_sym_hds 0755 root sys
f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_tape 0755 root sys
f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_tpgs 0755 root sys
f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_tpgs_tape 0755 root sys
d kernel/overlay 0755 root sys
d kernel/overlay/amd64 0755 root sys
f kernel/overlay/amd64/vxlan 0755 root sys
d kernel/sched 0755 root sys
d kernel/sched/amd64 0755 root sys
f kernel/sched/amd64/SDC 0755 root sys
Expand Down Expand Up @@ -1558,6 +1563,7 @@ f lib/svc/manifest/network/smb/server.xml 0444 root sys
f lib/svc/manifest/network/smtp-sendmail.xml 0444 root sys
f lib/svc/manifest/network/ssh.xml 0444 root sys
f lib/svc/manifest/network/time.xml 0444 root sys
f lib/svc/manifest/network/varpd.xml 0444 root sys
f lib/svc/manifest/network/vrrp.xml 0444 root sys
d lib/svc/manifest/platform 0755 root sys
d lib/svc/manifest/platform/i86pc 0755 root sys
Expand Down Expand Up @@ -1711,6 +1717,7 @@ f lib/svc/method/svc-sv 0744 root sys
f lib/svc/method/svc-syseventd 0555 root sys
f lib/svc/method/svc-tnd 0555 root sys
f lib/svc/method/svc-utmpd 0555 root bin
f lib/svc/method/svc-varpd 0555 root sys
f lib/svc/method/svc-vrrp 0555 root sys
f lib/svc/method/svc-wusb 0555 root sys
f lib/svc/method/svc-zones 0555 root sys
Expand Down Expand Up @@ -4987,6 +4994,7 @@ s usr/lib/amd64/libuuid.so.1=../../../lib/amd64/libuuid.so.1
s usr/lib/amd64/libuuid.so=../../../lib/amd64/libuuid.so.1
s usr/lib/amd64/libuutil.so.1=../../../lib/amd64/libuutil.so.1
s usr/lib/amd64/libuutil.so=../../../lib/amd64/libuutil.so.1
f usr/lib/amd64/libvarpd.so.1 0755 root bin
f usr/lib/amd64/libvnd.so.1 0755 root bin
s usr/lib/amd64/libvnd.so=libvnd.so.1
f usr/lib/amd64/libvolmgt.so.1 0755 root bin
Expand Down Expand Up @@ -6447,6 +6455,7 @@ s usr/lib/libuutil.so.1=../../lib/libuutil.so.1
s usr/lib/libuutil.so=../../lib/libuutil.so.1
f usr/lib/libvnd.so.1 0755 root bin
s usr/lib/libvnd.so=libvnd.so.1
f usr/lib/libvarpd.so.1 0755 root bin
f usr/lib/libvolmgt.so.1 0755 root bin
s usr/lib/libvolmgt.so=libvolmgt.so.1
f usr/lib/libvrrpadm.so.1 0755 root bin
Expand Down Expand Up @@ -10072,6 +10081,21 @@ f usr/lib/values-Xs.o 0644 root bin
f usr/lib/values-Xt.o 0644 root bin
f usr/lib/values-xpg4.o 0644 root bin
f usr/lib/values-xpg6.o 0644 root bin
d usr/lib/varpd 0755 root bin
s usr/lib/varpd/64=amd64
d usr/lib/varpd/amd64 0755 root bin
f usr/lib/varpd/amd64/libvarpd_direct.so.1 0555 root bin
s usr/lib/varpd/amd64/libvarpd_direct.so=libvarpd_direct.so.1
f usr/lib/varpd/amd64/libvarpd_files.so.1 0555 root bin
s usr/lib/varpd/amd64/libvarpd_files.so=libvarpd_files.so.1
f usr/lib/varpd/amd64/libvarpd_svp.so.1 0555 root bin
s usr/lib/varpd/amd64/libvarpd_svp.so=libvarpd_svp.so.1
f usr/lib/varpd/libvarpd_direct.so.1 0555 root bin
s usr/lib/varpd/libvarpd_direct.so=libvarpd_direct.so.1
f usr/lib/varpd/libvarpd_files.so.1 0555 root bin
s usr/lib/varpd/libvarpd_files.so=libvarpd_files.so.1
f usr/lib/varpd/libvarpd_svp.so.1 0555 root bin
s usr/lib/varpd/libvarpd_svp.so=libvarpd_svp.so.1
f usr/lib/vfontedpr 0555 root bin
f usr/lib/vgrindefs 0444 root bin
d usr/lib/vscan 0755 root bin
Expand Down Expand Up @@ -10522,6 +10546,7 @@ h usr/sbin/update_drv=usr/lib/isaexec
h usr/sbin/useradd=usr/sbin/roleadd
h usr/sbin/userdel=usr/sbin/roledel
h usr/sbin/usermod=usr/sbin/rolemod
f usr/sbin/varpd 0555 root bin
f usr/sbin/vndadm 0555 root bin
f usr/sbin/volcopy 0555 root bin
f usr/sbin/vrrpadm 0555 root bin
Expand Down
4 changes: 4 additions & 0 deletions usr/src/Targetdirs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ DIRS= \
/usr/lib/mdb/kvm \
/usr/lib/mdb/proc \
/usr/lib/nfs \
/usr/lib/varpd \
/usr/net \
/usr/net/servers \
/usr/lib/pool \
Expand Down Expand Up @@ -555,6 +556,7 @@ DIRS64= \
/usr/lib/security/$(MACH64) \
/usr/lib/smbsrv/$(MACH64) \
/usr/lib/abi/$(MACH64) \
/usr/lib/varpd/$(MACH64) \
/usr/sbin/$(MACH64) \
/usr/ucb/$(MACH64) \
/usr/ucblib/$(MACH64) \
Expand Down Expand Up @@ -618,6 +620,7 @@ SYM.DIRS64= \
/usr/lib/lwp/64 \
/usr/lib/secure/64 \
/usr/lib/security/64 \
/usr/lib/varpd/64 \
/usr/xpg4/lib/64 \
/var/ld/64 \
/usr/ucblib/64
Expand Down Expand Up @@ -727,6 +730,7 @@ $(BUILD64) $(ROOT)/usr/lib/lwp/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/lib/link_audit/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/lib/secure/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/lib/security/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/lib/varpd/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/xpg4/lib/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/var/ld/64:= LINKDEST=$(MACH64)
$(BUILD64) $(ROOT)/usr/ucblib/64:= LINKDEST=$(MACH64)
Expand Down
1 change: 1 addition & 0 deletions usr/src/cmd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ COMMON_SUBDIRS= \
utmp_update \
utmpd \
valtools \
varpd \
vgrind \
vi \
vndadm \
Expand Down
3 changes: 3 additions & 0 deletions usr/src/cmd/cmd-inet/etc/services
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright 2015 Joyent, Inc.
#
# CDDL HEADER START
#
Expand Down Expand Up @@ -215,6 +216,8 @@ krb5_prop 754/tcp # Kerberos V5 KDC propogation
swat 901/tcp # Samba Web Adm.Tool
ufsd 1008/tcp ufsd # UFS-aware server
ufsd 1008/udp ufsd
portolan 1296/tcp # Portolan
svp-underlay 1339/tcp # SDC VXLAN underlay invalidation
cvc 1495/tcp # Network Console
ingreslock 1524/tcp
www-ldap-gw 1760/tcp # HTTP to LDAP gateway
Expand Down
4 changes: 3 additions & 1 deletion usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright 2015 Joyent, Inc.
#

PROG= snoop
Expand All @@ -39,7 +40,8 @@ OBJS= nfs4_xdr.o snoop.o snoop_aarp.o snoop_adsp.o snoop_aecho.o \
snoop_pppoe.o snoop_rip.o snoop_rip6.o snoop_rpc.o snoop_rpcprint.o \
snoop_rpcsec.o snoop_rport.o snoop_rquota.o snoop_rstat.o snoop_rtmp.o \
snoop_sctp.o snoop_slp.o snoop_smb.o snoop_socks.o snoop_solarnet.o \
snoop_tcp.o snoop_tftp.o snoop_trill.o snoop_udp.o snoop_zip.o
snoop_tcp.o snoop_tftp.o snoop_trill.o snoop_udp.o snoop_vxlan.o \
snoop_zip.o

SRCS= $(OBJS:.o=.c)
HDRS= snoop.h snoop_mip.h at.h snoop_ospf.h snoop_ospf6.h
Expand Down
2 changes: 2 additions & 0 deletions usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Use is subject to license terms.
*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2015 Joyent, Inc.
*/

#ifndef _SNOOP_H
Expand Down Expand Up @@ -260,6 +261,7 @@ extern int interpret_socks_reply(int, char *, int);
extern int interpret_trill(int, struct ether_header **, char *, int *);
extern int interpret_isis(int, char *, int, boolean_t);
extern int interpret_bpdu(int, char *, int);
extern int interpret_vxlan(int, char *, int);
extern void init_ldap(void);
extern boolean_t arp_for_ether(char *, struct ether_addr *);
extern char *ether_ouiname(uint32_t);
Expand Down
4 changes: 3 additions & 1 deletion usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2015 Joyent, Inc.
*/

#include <stdio.h>
Expand Down Expand Up @@ -54,8 +55,9 @@

static headerlen_fn_t ether_header_len, fddi_header_len, tr_header_len,
ib_header_len, ipnet_header_len, ipv4_header_len, ipv6_header_len;
static interpreter_fn_t interpret_ether, interpret_fddi, interpret_tr,
static interpreter_fn_t interpret_fddi, interpret_tr,
interpret_ib, interpret_ipnet, interpret_iptun;
interpreter_fn_t interpret_ether;
static void addr_copy_swap(struct ether_addr *, struct ether_addr *);
static int tr_machdr_len(char *, int *, int *);

Expand Down
5 changes: 5 additions & 0 deletions usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2015, Joyent, Inc.
*/

#include <stdio.h>
Expand Down Expand Up @@ -76,6 +77,7 @@ static const struct porttable pt_udp[] = {
{ 560, "RMONITOR" },
{ 561, "MONITOR" },
{ IPPORT_SOCKS, "SOCKS" },
{ IPPORT_VXLAN, "VXLAN" },
{ 0, NULL }
};

Expand Down Expand Up @@ -428,6 +430,9 @@ interpret_reserved(int flags, int proto, in_port_t src, in_port_t dst,
(void) interpret_socks_reply(flags, data,
dlen);
return (1);
case IPPORT_VXLAN:
(void) interpret_vxlan(flags, data, dlen);
return (1);
}
}

Expand Down
68 changes: 68 additions & 0 deletions usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_vxlan.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/

/*
* Copyright 2015 Joyent, Inc. All rights reserved.
*/

/*
* Decode VXLAN encapsulated packets.
*/

#include <sys/vxlan.h>
#include "snoop.h"

int
interpret_vxlan(int flags, char *data, int fraglen)
{
vxlan_hdr_t *vxlan = (vxlan_hdr_t *)data;
uint32_t id, vxf;

if (fraglen < sizeof (vxlan_hdr_t)) {
if (flags & F_SUM)
(void) snprintf(get_sum_line(), MAXLINE,
"VXLAN RUNT");
if (flags & F_DTAIL)
show_header("VXLAN RUNT: ", "Short packet", fraglen);

return (fraglen);
}

id = ntohl(vxlan->vxlan_id) >> VXLAN_ID_SHIFT;
vxf = ntohl(vxlan->vxlan_flags);

if (flags & F_SUM) {
(void) snprintf(get_sum_line(), MAXLINE,
"VXLAN VNI=%d", id);
}

if (flags & F_DTAIL) {
show_header("VXLAN: ", "VXLAN Header", sizeof (vxlan_hdr_t));
show_space();
(void) snprintf(get_line(0, 0), get_line_remain(),
"Flags = 0x%08x", vxf);
(void) snprintf(get_line(0, 0), get_line_remain(), " %s",
getflag(vxf >> 24, VXLAN_F_VDI >> 24, "vni present",
"vni missing"));
(void) snprintf(get_line(0, 0), get_line_remain(),
"VXLAN network id (VNI) = %d", id);
show_space();
}

if (flags & (F_DTAIL | F_ALLSUM)) {
fraglen -= sizeof (vxlan_hdr_t);
data += sizeof (vxlan_hdr_t);

return (interpret_ether(flags, data, fraglen, fraglen));
}

return (0);
}
3 changes: 3 additions & 0 deletions usr/src/cmd/devfsadm/misc_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ static devfsadm_create_t misc_cbt[] = {
{ "pseudo", "ddi_pseudo", "tpm",
TYPE_EXACT | DRV_EXACT, ILEVEL_0, minor_name
},
{ "pseudo", "ddi_pseudo", "overlay",
TYPE_EXACT | DRV_EXACT, ILEVEL_0, minor_name
}
};

DEVFSADM_CREATE_INIT_V0(misc_cbt);
Expand Down
3 changes: 2 additions & 1 deletion usr/src/cmd/dladm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright 2015 Joyent, Inc.
#

PROG= dladm
Expand All @@ -35,7 +36,7 @@ include ../Makefile.cmd
XGETFLAGS += -a -x $(PROG).xcl
LDLIBS += -L$(ROOT)/lib -lsocket
LDLIBS += -ldladm -ldlpi -lkstat -lsecdb -lbsm -linetutil -ldevinfo
LDLIBS += $(ZLAZYLOAD) -lrstp $(ZNOLAZYLOAD)
LDLIBS += $(ZLAZYLOAD) -lrstp $(ZNOLAZYLOAD) -lnsl -lumem -lcmdutils

CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-unused-label
Expand Down
Loading

0 comments on commit 2817066

Please sign in to comment.