summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Speer <Michael.Speer@Sun.COM>2009-03-16 13:52:35 -0700
committerMichael Speer <Michael.Speer@Sun.COM>2009-03-16 13:52:35 -0700
commit4ba491f53199ecfd5a928fdce7dc8f8aa9de4b9e (patch)
tree61e79c6cd8e1e1a8d001a380cf2df06c3faf72b8
parenta4b239dfde5f1d873c730c047e87e5714ebddbb7 (diff)
downloadillumos-joyent-4ba491f53199ecfd5a928fdce7dc8f8aa9de4b9e.tar.gz
6816730 nxge does not build RX packet chains when operating in interrupt mode
6817424 rdc tables for nxge not programmed properly for hybrid IO operation
-rw-r--r--usr/src/uts/common/io/nxge/nxge_fzc.c15
-rw-r--r--usr/src/uts/common/io/nxge/nxge_hio.c14
-rw-r--r--usr/src/uts/common/io/nxge/nxge_main.c4
-rw-r--r--usr/src/uts/common/io/nxge/nxge_rxdma.c14
-rw-r--r--usr/src/uts/common/io/nxge/nxge_virtual.c14
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fzc.h7
6 files changed, 17 insertions, 51 deletions
diff --git a/usr/src/uts/common/io/nxge/nxge_fzc.c b/usr/src/uts/common/io/nxge/nxge_fzc.c
index 3831d77eed..6ab0ddac81 100644
--- a/usr/src/uts/common/io/nxge/nxge_fzc.c
+++ b/usr/src/uts/common/io/nxge/nxge_fzc.c
@@ -18,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -760,6 +761,7 @@ nxge_init_fzc_rx_common(p_nxge_t nxgep)
npi_handle_t handle;
npi_status_t rs = NPI_SUCCESS;
nxge_status_t status = NXGE_OK;
+ nxge_rdc_grp_t *rdc_grp_p;
clock_t lbolt;
int table;
@@ -808,8 +810,10 @@ nxge_init_fzc_rx_common(p_nxge_t nxgep)
hardware = &nxgep->pt_config.hw_config;
for (table = 0; table < NXGE_MAX_RDC_GRPS; table++) {
/* Does this table belong to <nxgep>? */
- if (hardware->grpids[table] == (nxgep->function_num + 256))
- status = nxge_init_fzc_rdc_tbl(nxgep, table);
+ if (hardware->grpids[table] == (nxgep->function_num + 256)) {
+ rdc_grp_p = &nxgep->pt_config.rdc_grps[table];
+ status = nxge_init_fzc_rdc_tbl(nxgep, rdc_grp_p, table);
+ }
}
/* Ethernet Timeout Counter (?) */
@@ -821,11 +825,10 @@ nxge_init_fzc_rx_common(p_nxge_t nxgep)
}
nxge_status_t
-nxge_init_fzc_rdc_tbl(p_nxge_t nxge, int rdc_tbl)
+nxge_init_fzc_rdc_tbl(p_nxge_t nxge, nxge_rdc_grp_t *group, int rdc_tbl)
{
nxge_hio_data_t *nhd = (nxge_hio_data_t *)nxge->nxge_hw_p->hio;
nx_rdc_tbl_t *table;
- nxge_rdc_grp_t *group;
npi_handle_t handle;
npi_status_t rs = NPI_SUCCESS;
@@ -833,8 +836,6 @@ nxge_init_fzc_rdc_tbl(p_nxge_t nxge, int rdc_tbl)
NXGE_DEBUG_MSG((nxge, DMA_CTL, "==> nxge_init_fzc_rdc_tbl(%d)", table));
- group = &nxge->pt_config.rdc_grps[rdc_tbl];
-
/* This RDC table must have been previously bound to <nxge>. */
MUTEX_ENTER(&nhd->lock);
table = &nhd->rdc_tbl[rdc_tbl];
diff --git a/usr/src/uts/common/io/nxge/nxge_hio.c b/usr/src/uts/common/io/nxge/nxge_hio.c
index 7cb7efa61e..32fdc67995 100644
--- a/usr/src/uts/common/io/nxge/nxge_hio.c
+++ b/usr/src/uts/common/io/nxge/nxge_hio.c
@@ -1248,6 +1248,7 @@ static int
nxge_hio_group_start(mac_group_driver_t gdriver)
{
nxge_ring_group_t *group = (nxge_ring_group_t *)gdriver;
+ nxge_rdc_grp_t *rdc_grp_p;
int rdctbl;
int dev_gindex;
@@ -1262,6 +1263,7 @@ nxge_hio_group_start(mac_group_driver_t gdriver)
mutex_enter(group->nxgep->genlock);
dev_gindex = group->nxgep->pt_config.hw_config.def_mac_rxdma_grpid +
group->gindex;
+ rdc_grp_p = &group->nxgep->pt_config.rdc_grps[dev_gindex];
/*
* Get an rdc table for this group.
@@ -1285,7 +1287,7 @@ nxge_hio_group_start(mac_group_driver_t gdriver)
group->rdctbl = rdctbl;
- (void) nxge_init_fzc_rdc_tbl(group->nxgep, rdctbl);
+ (void) nxge_init_fzc_rdc_tbl(group->nxgep, rdc_grp_p, rdctbl);
group->started = B_TRUE;
mutex_exit(group->nxgep->genlock);
@@ -2216,17 +2218,9 @@ nxge_hio_rdc_share(
}
/*
- * We have to initialize the guest's RDC table, too.
- * -----------------------------------------------------
+ * Update the RDC group.
*/
rdc_grp = &nxge->pt_config.rdc_grps[vr->rdc_tbl];
- if (rdc_grp->max_rdcs == 0) {
- rdc_grp->start_rdc = (uint8_t)channel;
- rdc_grp->def_rdc = (uint8_t)channel;
- rdc_grp->max_rdcs = 1;
- } else {
- rdc_grp->max_rdcs++;
- }
NXGE_DC_SET(rdc_grp->map, channel);
NXGE_DEBUG_MSG((nxge, HIO_CTL, "<== nxge_hio_rdc_share"));
diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c
index 1c4c146a50..2708bcfe44 100644
--- a/usr/src/uts/common/io/nxge/nxge_main.c
+++ b/usr/src/uts/common/io/nxge/nxge_main.c
@@ -5628,7 +5628,7 @@ nxge_group_add_ring(mac_group_driver_t gh, mac_ring_driver_t rh,
rdc_grp->map |= (1 << channel);
rdc_grp->max_rdcs++;
- (void) nxge_init_fzc_rdc_tbl(nxge, rgroup->rdctbl);
+ (void) nxge_init_fzc_rdc_tbl(nxge, rdc_grp, rgroup->rdctbl);
break;
}
}
@@ -5673,7 +5673,7 @@ nxge_group_rem_ring(mac_group_driver_t gh, mac_ring_driver_t rh,
rdc_grp->map &= ~(1 << channel);
rdc_grp->max_rdcs--;
- (void) nxge_init_fzc_rdc_tbl(nxge, rgroup->rdctbl);
+ (void) nxge_init_fzc_rdc_tbl(nxge, rdc_grp, rgroup->rdctbl);
break;
}
}
diff --git a/usr/src/uts/common/io/nxge/nxge_rxdma.c b/usr/src/uts/common/io/nxge/nxge_rxdma.c
index 8b3eeb7eae..d69007f922 100644
--- a/usr/src/uts/common/io/nxge/nxge_rxdma.c
+++ b/usr/src/uts/common/io/nxge/nxge_rxdma.c
@@ -39,13 +39,6 @@
(rdc + nxgep->pt_config.hw_config.start_rdc)
/*
- * XXX: This is a tunable to limit the number of packets each interrupt
- * handles. 0 (default) means that each interrupt takes as much packets
- * as it finds.
- */
-extern int nxge_max_intr_pkts;
-
-/*
* Globals: tunable parameters (/etc/system or adb)
*
*/
@@ -2236,13 +2229,6 @@ nxge_rx_pkts(p_nxge_t nxgep, p_rx_rcr_ring_t rcr_p, rx_dma_ctl_stat_t cs,
(totallen >= bytes_to_pickup)) {
break;
}
-
- /* limit the number of packets for interrupt */
- if (!(rcr_p->poll_flag)) {
- if (npkt_read == nxge_max_intr_pkts) {
- break;
- }
- }
}
rcr_p->rcr_desc_rd_head_pp = rcr_desc_rd_head_pp;
diff --git a/usr/src/uts/common/io/nxge/nxge_virtual.c b/usr/src/uts/common/io/nxge/nxge_virtual.c
index 8a4d3812ac..ff78d828d6 100644
--- a/usr/src/uts/common/io/nxge/nxge_virtual.c
+++ b/usr/src/uts/common/io/nxge/nxge_virtual.c
@@ -85,12 +85,6 @@ extern uint32_t nxge_rbr_spare_size;
extern npi_status_t npi_mac_altaddr_disable(npi_handle_t, uint8_t, uint8_t);
-/*
- * XXX: Use temporarily to specify the number of packets each interrupt process
- * By default, the number of packet processed per interrupt is 1.
- */
-int nxge_max_intr_pkts;
-
static uint8_t p2_tx_fair[2] = {12, 12};
static uint8_t p2_tx_equal[2] = {12, 12};
static uint8_t p4_tx_fair[4] = {6, 6, 6, 6};
@@ -1630,14 +1624,6 @@ nxge_get_config_properties(p_nxge_t nxgep)
}
/*
- * XXX: read-in the config file to determine the number of packet
- * to process by each interrupt.
- */
- nxge_max_intr_pkts = ddi_getprop(DDI_DEV_T_ANY, nxgep->dip,
- DDI_PROP_CANSLEEP | DDI_PROP_DONTPASS, "max_intr_pkts", 1);
-
-
- /*
* Get info on how many ports Neptune card has.
*/
nxgep->nports = nxge_get_nports(nxgep);
diff --git a/usr/src/uts/common/sys/nxge/nxge_fzc.h b/usr/src/uts/common/sys/nxge/nxge_fzc.h
index 72c4a99c7a..bf2c5e693b 100644
--- a/usr/src/uts/common/sys/nxge/nxge_fzc.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fzc.h
@@ -18,16 +18,15 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_NXGE_NXGE_FZC_H
#define _SYS_NXGE_NXGE_FZC_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -57,7 +56,7 @@ nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
-nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, int);
+nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, nxge_rdc_grp_t *, int);
int nxge_fzc_rdc_tbl_bind(nxge_t *, int, int);
int nxge_fzc_rdc_tbl_unbind(p_nxge_t, int);