diff options
author | neel <neel@FreeBSD.org> | 2014-10-20 02:57:30 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-10-20 02:57:30 +0000 |
commit | dd2febd6f26be95c4b3f1f67b23f53a28885082f (patch) | |
tree | b2c78a90b3492af4d40dfeb9faedeb6bb82208c4 /sys | |
parent | 53c23ba9a2104ef3682a2b22cb1ab9269ca0745d (diff) | |
download | FreeBSD-src-dd2febd6f26be95c4b3f1f67b23f53a28885082f.zip FreeBSD-src-dd2febd6f26be95c4b3f1f67b23f53a28885082f.tar.gz |
IFC @r273214
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/vmm/amd/svm_support.S | 2 | ||||
-rw-r--r-- | sys/amd64/vmm/intel/vmx_support.S | 2 | ||||
-rw-r--r-- | sys/conf/files | 5 | ||||
-rw-r--r-- | sys/fs/autofs/autofs.c | 1 | ||||
-rw-r--r-- | sys/geom/geom_dump.c | 5 | ||||
-rw-r--r-- | sys/modules/vmm/Makefile | 24 | ||||
-rw-r--r-- | sys/net/if_lagg.c | 88 |
7 files changed, 61 insertions, 66 deletions
diff --git a/sys/amd64/vmm/amd/svm_support.S b/sys/amd64/vmm/amd/svm_support.S index 11da759..72327bd 100644 --- a/sys/amd64/vmm/amd/svm_support.S +++ b/sys/amd64/vmm/amd/svm_support.S @@ -25,7 +25,7 @@ */ #include <machine/asmacros.h> -#include "svm_assym.s" +#include "svm_assym.h" /* * Be friendly to DTrace FBT's prologue/epilogue pattern matching. diff --git a/sys/amd64/vmm/intel/vmx_support.S b/sys/amd64/vmm/intel/vmx_support.S index 840b7e0..84fb5b0 100644 --- a/sys/amd64/vmm/intel/vmx_support.S +++ b/sys/amd64/vmm/intel/vmx_support.S @@ -29,7 +29,7 @@ #include <machine/asmacros.h> -#include "vmx_assym.s" +#include "vmx_assym.h" #ifdef SMP #define LK lock ; diff --git a/sys/conf/files b/sys/conf/files index 13150f4..80755fc 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3231,7 +3231,8 @@ net/if_ethersubr.c optional ether net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif inet | gif inet6 | netgraph_gif +net/if_gif.c optional gif inet | gif inet6 | \ + netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg @@ -3357,7 +3358,7 @@ netgraph/ng_eiface.c optional netgraph_eiface netgraph/ng_ether.c optional netgraph_ether netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_frame_relay.c optional netgraph_frame_relay -netgraph/ng_gif.c optional netgraph_gif +netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface diff --git a/sys/fs/autofs/autofs.c b/sys/fs/autofs/autofs.c index 029d254..6a9c0bf 100644 --- a/sys/fs/autofs/autofs.c +++ b/sys/fs/autofs/autofs.c @@ -550,7 +550,6 @@ autofs_ioctl_request(struct autofs_daemon_request *adr) &autofs_softc->sc_lock); if (error != 0) { sx_xunlock(&autofs_softc->sc_lock); - AUTOFS_DEBUG("failed with error %d", error); return (error); } } diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c index 8aaab0f..8ce237f 100644 --- a/sys/geom/geom_dump.c +++ b/sys/geom/geom_dump.c @@ -61,8 +61,9 @@ static void g_confdot_provider(struct sbuf *sb, struct g_provider *pp) { - sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\"];\n", - pp, pp->name, pp->acr, pp->acw, pp->ace, pp->error); + sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\\n" + "sector=%u\\nstripe=%u\"];\n", pp, pp->name, pp->acr, pp->acw, + pp->ace, pp->error, pp->sectorsize, pp->stripesize); } static void diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 5bb31f5..45025a8 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -3,6 +3,7 @@ KMOD= vmm SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h +SRCS+= vmx_assym.h svm_assym.h CFLAGS+= -DVMM_KEEP_STATS -DSMP CFLAGS+= -I${.CURDIR}/../../amd64/vmm @@ -39,6 +40,7 @@ SRCS+= iommu.c \ SRCS+= ept.c \ vmcs.c \ vmx_msr.c \ + vmx_support.S \ vmx.c \ vtd.c @@ -46,37 +48,37 @@ SRCS+= ept.c \ .PATH: ${.CURDIR}/../../amd64/vmm/amd SRCS+= vmcb.c \ svm.c \ + svm_support.S \ npt.c \ amdv.c \ svm_msr.c -OBJS= vmx_support.o svm_support.o +CLEANFILES= vmx_assym.h vmx_genassym.o svm_assym.h svm_genassym.o -CLEANFILES= vmx_assym.s vmx_genassym.o svm_assym.s svm_genassym.o - -vmx_assym.s: vmx_genassym.o +vmx_assym.h: vmx_genassym.o .if exists(@) -vmx_assym.s: @/kern/genassym.sh +vmx_assym.h: @/kern/genassym.sh .endif sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET} -svm_assym.s: svm_genassym.o +svm_assym.h: svm_genassym.o .if exists(@) -svm_assym.s: @/kern/genassym.sh +svm_assym.h: @/kern/genassym.sh .endif sh @/kern/genassym.sh svm_genassym.o > ${.TARGET} -vmx_support.o: vmx_support.S vmx_assym.s +vmx_support.o: ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -svm_support.o: svm_support.S svm_assym.s +svm_support.o: ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -vmx_genassym.o: vmx_genassym.c @ machine x86 +vmx_genassym.o: ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} -svm_genassym.o: svm_genassym.c @ machine x86 +svm_genassym.o: ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + .include <bsd.kmod.mk> diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 7f7e4b5..5c8b2e1 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -569,9 +569,22 @@ lagg_clone_destroy(struct ifnet *ifp) static void lagg_lladdr(struct lagg_softc *sc, uint8_t *lladdr) { + struct ifnet *ifp = sc->sc_ifp; struct lagg_port lp; + if (memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) + return; + LAGG_WLOCK_ASSERT(sc); + /* + * Set the link layer address on the lagg interface. + * lagg_proto_lladdr() notifies the MAC change to + * the aggregation protocol. iflladdr_event handler which + * may trigger gratuitous ARPs for INET will be handled in + * a taskqueue. + */ + bcopy(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); bzero(&lp, sizeof(lp)); lp.lp_ifp = sc->sc_ifp; @@ -625,11 +638,13 @@ lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr) struct ifnet *ifp = lp->lp_ifp; struct lagg_llq *llq; int pending = 0; + int primary; LAGG_WLOCK_ASSERT(sc); - if (lp->lp_detaching || - memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) + primary = (sc->sc_primary->lp_ifp == ifp) ? 1 : 0; + if (primary == 0 && (lp->lp_detaching || + memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0)) return; /* Check to make sure its not already queued to be changed */ @@ -648,7 +663,7 @@ lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr) /* Update the lladdr even if pending, it may have changed */ llq->llq_ifp = ifp; - llq->llq_primary = (sc->sc_primary->lp_ifp == ifp) ? 1 : 0; + llq->llq_primary = primary; bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); if (!pending) @@ -692,23 +707,8 @@ lagg_port_setlladdr(void *arg, int pending) if (error) printf("%s: setlladdr failed on %s\n", __func__, ifp->if_xname); - } else { - /* - * Set the link layer address on the lagg interface. - * lagg_proto_lladdr() notifies the MAC change to - * the aggregation protocol. iflladdr_event handler - * may trigger gratuitous ARPs for INET. - */ - if (memcmp(llq->llq_lladdr, IF_LLADDR(ifp), - ETHER_ADDR_LEN) != 0) { - bcopy(llq->llq_lladdr, IF_LLADDR(ifp), - ETHER_ADDR_LEN); - LAGG_WLOCK(sc); - lagg_proto_lladdr(sc); - LAGG_WUNLOCK(sc); - EVENTHANDLER_INVOKE(iflladdr_event, ifp); - } - } + } else + EVENTHANDLER_INVOKE(iflladdr_event, ifp); CURVNET_RESTORE(); head = SLIST_NEXT(llq, llq_entries); free(llq, M_DEVBUF); @@ -742,34 +742,6 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) if (ifp->if_type != IFT_ETHER) return (EPROTONOSUPPORT); -#ifdef INET6 - /* - * The member interface should not have inet6 address because - * two interfaces with a valid link-local scope zone must not be - * merged in any form. This restriction is needed to - * prevent violation of link-local scope zone. Attempts to - * add a member interface which has inet6 addresses triggers - * removal of all inet6 addresses on the member interface. - */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { - if (in6ifa_llaonifp(lp->lp_ifp)) { - in6_ifdetach(lp->lp_ifp); - if_printf(sc->sc_ifp, - "IPv6 addresses on %s have been removed " - "before adding it as a member to prevent " - "IPv6 address scope violation.\n", - lp->lp_ifp->if_xname); - } - } - if (in6ifa_llaonifp(ifp)) { - in6_ifdetach(ifp); - if_printf(sc->sc_ifp, - "IPv6 addresses on %s have been removed " - "before adding it as a member to prevent " - "IPv6 address scope violation.\n", - ifp->if_xname); - } -#endif /* Allow the first Ethernet member to define the MTU */ if (SLIST_EMPTY(&sc->sc_ports)) sc->sc_ifp->if_mtu = ifp->if_mtu; @@ -1414,6 +1386,26 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = EINVAL; break; } +#ifdef INET6 + /* + * A laggport interface should not have inet6 address + * because two interfaces with a valid link-local + * scope zone must not be merged in any form. This + * restriction is needed to prevent violation of + * link-local scope zone. Attempts to add a laggport + * interface which has inet6 addresses triggers + * removal of all inet6 addresses on the member + * interface. + */ + if (in6ifa_llaonifp(tpif)) { + in6_ifdetach(tpif); + if_printf(sc->sc_ifp, + "IPv6 addresses on %s have been removed " + "before adding it as a member to prevent " + "IPv6 address scope violation.\n", + tpif->if_xname); + } +#endif LAGG_WLOCK(sc); error = lagg_port_create(sc, tpif); LAGG_WUNLOCK(sc); |