t4_smt.c (346866) | t4_smt.c (346876) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2018 Chelsio Communications, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28#include <sys/cdefs.h> | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2018 Chelsio Communications, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/t4_smt.c 346866 2019-04-29 01:15:22Z np $"); | 29__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/t4_smt.c 346876 2019-04-29 04:42:18Z np $"); |
30 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#include <sys/param.h> 35#include <sys/eventhandler.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> --- 167 unchanged lines hidden (view full) --- 205t4_smt_set_switching(struct adapter *sc, struct smt_entry *e, uint16_t pfvf, 206 uint8_t *smac) 207{ 208 int rc = 0; 209 210 if (atomic_load_acq_int(&e->refcnt) == 1) { 211 /* Setup the entry for the first time */ 212 mtx_lock(&e->lock); | 30 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#include <sys/param.h> 35#include <sys/eventhandler.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> --- 167 unchanged lines hidden (view full) --- 205t4_smt_set_switching(struct adapter *sc, struct smt_entry *e, uint16_t pfvf, 206 uint8_t *smac) 207{ 208 int rc = 0; 209 210 if (atomic_load_acq_int(&e->refcnt) == 1) { 211 /* Setup the entry for the first time */ 212 mtx_lock(&e->lock); |
213 e->wrq = &sc->sge.mgmtq; | 213 e->wrq = &sc->sge.ctrlq[0]; |
214 e->iqid = sc->sge.fwq.abs_id; 215 e->pfvf = pfvf; 216 e->state = SMT_STATE_SWITCHING; 217 memcpy(e->smac, smac, ETHER_ADDR_LEN); 218 rc = t4_write_sme(e); 219 mtx_unlock(&e->lock); 220 } 221 --- 123 unchanged lines hidden --- | 214 e->iqid = sc->sge.fwq.abs_id; 215 e->pfvf = pfvf; 216 e->state = SMT_STATE_SWITCHING; 217 memcpy(e->smac, smac, ETHER_ADDR_LEN); 218 rc = t4_write_sme(e); 219 mtx_unlock(&e->lock); 220 } 221 --- 123 unchanged lines hidden --- |