Mercurial > illumos > illumos-gate
changeset 4114:030ce6b4ca65
6508808 T2000 GLDv3 network interface suffers performance regression when VLANs configured
author | ja97890 |
---|---|
date | Thu, 26 Apr 2007 03:26:34 -0700 |
parents | 36b60d5d9fa3 |
children | 1b21b0c74f1d |
files | usr/src/uts/common/io/dld/dld.conf usr/src/uts/common/io/dld/dld_drv.c usr/src/uts/common/io/dld/dld_proto.c usr/src/uts/common/sys/dld.h usr/src/uts/common/sys/dld_impl.h |
diffstat | 5 files changed, 24 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/dld/dld.conf Wed Apr 25 20:51:59 2007 -0700 +++ b/usr/src/uts/common/io/dld/dld.conf Thu Apr 26 03:26:34 2007 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -35,3 +34,6 @@ # Prevent use of the IP polling interface #no-poll=1; + +# Prevent use of soft rings +#no-softring=1;
--- a/usr/src/uts/common/io/dld/dld_drv.c Wed Apr 25 20:51:59 2007 -0700 +++ b/usr/src/uts/common/io/dld/dld_drv.c Thu Apr 26 03:26:34 2007 -0700 @@ -244,6 +244,11 @@ DLD_PROP_NO_ZEROCOPY, 0) != 0) { dld_opt |= DLD_OPT_NO_ZEROCOPY; } + + if (ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, + DLD_PROP_NO_SOFTRING, 0) != 0) { + dld_opt |= DLD_OPT_NO_SOFTRING; + } } /*
--- a/usr/src/uts/common/io/dld/dld_proto.c Wed Apr 25 20:51:59 2007 -0700 +++ b/usr/src/uts/common/io/dld/dld_proto.c Thu Apr 26 03:26:34 2007 -0700 @@ -1324,6 +1324,7 @@ break; case SOFT_RING_ENABLE: + ASSERT(!(dld_opt & DLD_OPT_NO_SOFTRING)); /* * Make sure soft_ring is disabled. */ @@ -1728,12 +1729,13 @@ subsize = 0; /* - * Advertize soft ring capability if - * VLAN_ID_NONE for GLDv3 drivers + * Advertize soft ring capability unless it has been explicitly + * disabled. */ - if (dsp->ds_vid == VLAN_ID_NONE) + if (!(dld_opt & DLD_OPT_NO_SOFTRING)) { subsize += sizeof (dl_capability_sub_t) + sizeof (dl_capab_dls_t); + } /* * Check if polling can be enabled on this interface. @@ -1852,7 +1854,7 @@ ASSERT(RW_READ_HELD(&dsp->ds_lock)); - if (dsp->ds_vid == VLAN_ID_NONE) { + if (!(dld_opt & DLD_OPT_NO_SOFTRING)) { dlsp = (dl_capability_sub_t *)ptr; dlsp->dl_cap = DL_CAPAB_SOFT_RING;
--- a/usr/src/uts/common/sys/dld.h Wed Apr 25 20:51:59 2007 -0700 +++ b/usr/src/uts/common/sys/dld.h Thu Apr 26 03:26:34 2007 -0700 @@ -71,6 +71,11 @@ #define DLD_PROP_NO_ZEROCOPY "no-zerocopy" /* + * Prevent advertising of the DL_CAPAB_SOFTRING capability. + */ +#define DLD_PROP_NO_SOFTRING "no-softring" + +/* * The name of the driver. */ #define DLD_DRIVER_NAME "dld"
--- a/usr/src/uts/common/sys/dld_impl.h Wed Apr 25 20:51:59 2007 -0700 +++ b/usr/src/uts/common/sys/dld_impl.h Thu Apr 26 03:26:34 2007 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -251,6 +251,7 @@ #define DLD_OPT_NO_FASTPATH 0x00000001 #define DLD_OPT_NO_POLL 0x00000002 #define DLD_OPT_NO_ZEROCOPY 0x00000004 +#define DLD_OPT_NO_SOFTRING 0x00000008 extern uint32_t dld_opt;