nicvf_queues.c (296601) | nicvf_queues.c (296602) |
---|---|
1/* 2 * Copyright (C) 2015 Cavium Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright (C) 2015 Cavium Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/vnic/nicvf_queues.c 296601 2016-03-10 05:23:46Z zbb $ | 26 * $FreeBSD: head/sys/dev/vnic/nicvf_queues.c 296602 2016-03-10 05:45:24Z zbb $ |
27 * 28 */ 29#include <sys/cdefs.h> | 27 * 28 */ 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/vnic/nicvf_queues.c 296601 2016-03-10 05:23:46Z zbb $"); | 30__FBSDID("$FreeBSD: head/sys/dev/vnic/nicvf_queues.c 296602 2016-03-10 05:45:24Z zbb $"); |
31 32#include "opt_inet.h" 33#include "opt_inet6.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bitset.h> 38#include <sys/bitstring.h> --- 678 unchanged lines hidden (view full) --- 717 718 dmap = (bus_dmamap_t)sq->snd_buff[cqe_tx->sqe_ptr].dmap; 719 bus_dmamap_unload(sq->snd_buff_dmat, dmap); 720 721 mbuf = (struct mbuf *)sq->snd_buff[cqe_tx->sqe_ptr].mbuf; 722 if (mbuf != NULL) { 723 m_freem(mbuf); 724 sq->snd_buff[cqe_tx->sqe_ptr].mbuf = NULL; | 31 32#include "opt_inet.h" 33#include "opt_inet6.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bitset.h> 38#include <sys/bitstring.h> --- 678 unchanged lines hidden (view full) --- 717 718 dmap = (bus_dmamap_t)sq->snd_buff[cqe_tx->sqe_ptr].dmap; 719 bus_dmamap_unload(sq->snd_buff_dmat, dmap); 720 721 mbuf = (struct mbuf *)sq->snd_buff[cqe_tx->sqe_ptr].mbuf; 722 if (mbuf != NULL) { 723 m_freem(mbuf); 724 sq->snd_buff[cqe_tx->sqe_ptr].mbuf = NULL; |
725 nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1); |
|
725 } 726 727 nicvf_check_cqe_tx_errs(nic, cq, cqe_tx); | 726 } 727 728 nicvf_check_cqe_tx_errs(nic, cq, cqe_tx); |
728 nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1); | |
729 730 NICVF_TX_UNLOCK(sq); 731 return (0); 732} 733 734static int 735nicvf_cq_intr_handler(struct nicvf *nic, uint8_t cq_idx) 736{ --- 1597 unchanged lines hidden --- | 729 730 NICVF_TX_UNLOCK(sq); 731 return (0); 732} 733 734static int 735nicvf_cq_intr_handler(struct nicvf *nic, uint8_t cq_idx) 736{ --- 1597 unchanged lines hidden --- |