diff options
author | Rajagopal Kunhappan <Rajagopal.Kunhappan@Sun.COM> | 2010-04-01 17:02:15 -0700 |
---|---|---|
committer | Rajagopal Kunhappan <Rajagopal.Kunhappan@Sun.COM> | 2010-04-01 17:02:15 -0700 |
commit | 5adf34bd96da7c794241c78b641902875edb690a (patch) | |
tree | 258a78b84b4490b75a9ec7297821a77a9e593eb1 /usr/src | |
parent | 3cd8a1a62a3a0a1219f9dd12e5700e1dff5ca79f (diff) | |
download | illumos-gate-5adf34bd96da7c794241c78b641902875edb690a.tar.gz |
6932656 "dladm set-linkprop -p cpus" can't take more than 32 CPUs
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/libdladm/common/libdladm.h | 5 | ||||
-rw-r--r-- | usr/src/uts/common/io/mac/mac_client.c | 5 | ||||
-rw-r--r-- | usr/src/uts/common/io/mac/mac_datapath_setup.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/lib/libdladm/common/libdladm.h b/usr/src/lib/libdladm/common/libdladm.h index 4e7cb32ba5..3c0adea5ff 100644 --- a/usr/src/lib/libdladm/common/libdladm.h +++ b/usr/src/lib/libdladm/common/libdladm.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _LIBDLADM_H @@ -86,7 +85,7 @@ extern "C" { #define DLADM_WALK_CONTINUE -1 #define DLADM_MAX_ARG_CNT 32 -#define DLADM_MAX_ARG_VALS 32 +#define DLADM_MAX_ARG_VALS 64 typedef enum { DLADM_STATUS_OK = 0, diff --git a/usr/src/uts/common/io/mac/mac_client.c b/usr/src/uts/common/io/mac/mac_client.c index 2f8962f67a..58680d7bbf 100644 --- a/usr/src/uts/common/io/mac/mac_client.c +++ b/usr/src/uts/common/io/mac/mac_client.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -4886,7 +4885,7 @@ mac_validate_props(mac_impl_t *mip, mac_resource_props_t *mrp) int i, j; mac_cpu_mode_t fanout; - if (mrp->mrp_ncpus > ncpus || mrp->mrp_ncpus > MAX_SR_FANOUT) + if (mrp->mrp_ncpus > ncpus) return (EINVAL); for (i = 0; i < mrp->mrp_ncpus; i++) { diff --git a/usr/src/uts/common/io/mac/mac_datapath_setup.c b/usr/src/uts/common/io/mac/mac_datapath_setup.c index 6f1661d5f2..647b876172 100644 --- a/usr/src/uts/common/io/mac/mac_datapath_setup.c +++ b/usr/src/uts/common/io/mac/mac_datapath_setup.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -819,7 +818,7 @@ mac_flow_user_cpu_init(flow_entry_t *flent, mac_resource_props_t *mrp) * not within limits, an error would have been * returned to the user. */ - ASSERT(mrp->mrp_ncpus > 0 && mrp->mrp_ncpus <= MAX_SR_FANOUT); + ASSERT(mrp->mrp_ncpus > 0); no_of_cpus = mrp->mrp_ncpus; @@ -887,6 +886,9 @@ mac_flow_user_cpu_init(flow_entry_t *flent, mac_resource_props_t *mrp) */ fanout_cnt_per_srs = fanout_cpu_cnt/rx_srs_cnt; + /* fanout_cnt_per_srs should not be > MAX_SR_FANOUT */ + fanout_cnt_per_srs = min(fanout_cnt_per_srs, MAX_SR_FANOUT); + /* Do the assignment for the default Rx ring */ cpu_cnt = 0; rx_srs = flent->fe_rx_srs[0]; |