Print this page
11490 SRS ring polling disabled for VLANs
11491 Want DLS bypass for VLAN traffic
11492 add VLVF bypass to ixgbe core
2869 duplicate packets with vnics over aggrs
11489 DLS stat delete and aggr kstat can deadlock
Portions contributed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
*** 19,29 ****
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
! * Copyright 2017 Joyent, Inc.
*/
/*
* General Soft rings - Simulating Rx rings in S/W.
*
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
! * Copyright 2018 Joyent, Inc.
*/
/*
* General Soft rings - Simulating Rx rings in S/W.
*
*** 205,215 ****
ringp->s_ring_tx_arg2 = x_arg2;
ringp->s_ring_tx_max_q_cnt = mac_tx_soft_ring_max_q_cnt;
ringp->s_ring_tx_hiwat =
(mac_tx_soft_ring_hiwat > mac_tx_soft_ring_max_q_cnt) ?
mac_tx_soft_ring_max_q_cnt : mac_tx_soft_ring_hiwat;
! if (mcip->mci_state_flags & MCIS_IS_AGGR) {
mac_srs_tx_t *tx = &mac_srs->srs_tx;
ASSERT(tx->st_soft_rings[
((mac_ring_t *)x_arg2)->mr_index] == NULL);
tx->st_soft_rings[((mac_ring_t *)x_arg2)->mr_index] =
--- 205,215 ----
ringp->s_ring_tx_arg2 = x_arg2;
ringp->s_ring_tx_max_q_cnt = mac_tx_soft_ring_max_q_cnt;
ringp->s_ring_tx_hiwat =
(mac_tx_soft_ring_hiwat > mac_tx_soft_ring_max_q_cnt) ?
mac_tx_soft_ring_max_q_cnt : mac_tx_soft_ring_hiwat;
! if (mcip->mci_state_flags & MCIS_IS_AGGR_CLIENT) {
mac_srs_tx_t *tx = &mac_srs->srs_tx;
ASSERT(tx->st_soft_rings[
((mac_ring_t *)x_arg2)->mr_index] == NULL);
tx->st_soft_rings[((mac_ring_t *)x_arg2)->mr_index] =
*** 337,355 ****
}
mutex_exit(&ringp->s_ring_lock);
}
/*
! * mac_rx_soft_ring_drain
*
! * Called when worker thread model (ST_RING_WORKER_ONLY) of processing
! * incoming packets is used. s_ring_first contain the queued packets.
! * s_ring_rx_func contains the upper level (client) routine where the
! * packets are destined and s_ring_rx_arg1/s_ring_rx_arg2 are the
! * cookie meant for the client.
*/
- /* ARGSUSED */
static void
mac_rx_soft_ring_drain(mac_soft_ring_t *ringp)
{
mblk_t *mp;
void *arg1;
--- 337,354 ----
}
mutex_exit(&ringp->s_ring_lock);
}
/*
! * Drain the soft ring pointed to by ringp.
*
! * o s_ring_first: pointer to the queued packet chain.
! *
! * o s_ring_rx_func: pointer to to the client's Rx routine.
! *
! * o s_ring_rx_{arg1,arg2}: opaque values specific to the client.
*/
static void
mac_rx_soft_ring_drain(mac_soft_ring_t *ringp)
{
mblk_t *mp;
void *arg1;
*** 390,406 ****
}
(*proc)(arg1, arg2, mp, NULL);
/*
! * If we have a soft ring set which is doing
! * bandwidth control, we need to decrement its
! * srs_size so it can have a accurate idea of
! * what is the real data queued between SRS and
! * its soft rings. We decrement the size for a
! * packet only when it gets processed by both
! * SRS and the soft ring.
*/
mutex_enter(&mac_srs->srs_lock);
MAC_UPDATE_SRS_COUNT_LOCKED(mac_srs, cnt);
MAC_UPDATE_SRS_SIZE_LOCKED(mac_srs, sz);
mutex_exit(&mac_srs->srs_lock);
--- 389,404 ----
}
(*proc)(arg1, arg2, mp, NULL);
/*
! * If we have an SRS performing bandwidth control, then
! * we need to decrement the size and count so the SRS
! * has an accurate measure of the data queued between
! * the SRS and its soft rings. We decrement the
! * counters only when the packet is processed by both
! * the SRS and the soft ring.
*/
mutex_enter(&mac_srs->srs_lock);
MAC_UPDATE_SRS_COUNT_LOCKED(mac_srs, cnt);
MAC_UPDATE_SRS_SIZE_LOCKED(mac_srs, sz);
mutex_exit(&mac_srs->srs_lock);
*** 412,427 ****
cv_signal(&ringp->s_ring_client_cv);
ringp->s_ring_run = NULL;
}
/*
- * mac_soft_ring_worker
- *
* The soft ring worker routine to process any queued packets. In
! * normal case, the worker thread is bound to a CPU. It the soft
! * ring is dealing with TCP packets, then the worker thread will
! * be bound to the same CPU as the TCP squeue.
*/
static void
mac_soft_ring_worker(mac_soft_ring_t *ringp)
{
kmutex_t *lock = &ringp->s_ring_lock;
--- 410,423 ----
cv_signal(&ringp->s_ring_client_cv);
ringp->s_ring_run = NULL;
}
/*
* The soft ring worker routine to process any queued packets. In
! * normal case, the worker thread is bound to a CPU. If the soft ring
! * handles TCP packets then the worker thread is bound to the same CPU
! * as the TCP squeue.
*/
static void
mac_soft_ring_worker(mac_soft_ring_t *ringp)
{
kmutex_t *lock = &ringp->s_ring_lock;
*** 603,613 ****
mac_soft_ring_dls_bypass(void *arg, mac_direct_rx_t rx_func, void *rx_arg1)
{
mac_soft_ring_t *softring = arg;
mac_soft_ring_set_t *srs;
! ASSERT(rx_func != NULL);
mutex_enter(&softring->s_ring_lock);
softring->s_ring_rx_func = rx_func;
softring->s_ring_rx_arg1 = rx_arg1;
mutex_exit(&softring->s_ring_lock);
--- 599,609 ----
mac_soft_ring_dls_bypass(void *arg, mac_direct_rx_t rx_func, void *rx_arg1)
{
mac_soft_ring_t *softring = arg;
mac_soft_ring_set_t *srs;
! VERIFY3P(rx_func, !=, NULL);
mutex_enter(&softring->s_ring_lock);
softring->s_ring_rx_func = rx_func;
softring->s_ring_rx_arg1 = rx_arg1;
mutex_exit(&softring->s_ring_lock);