Date: Thu, 10 Mar 2016 05:45:24 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296602 - head/sys/dev/vnic Message-ID: <201603100545.u2A5jOwv022076@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Thu Mar 10 05:45:24 2016 New Revision: 296602 URL: https://svnweb.freebsd.org/changeset/base/296602 Log: Fix bug in VNIC causing phony number of available TX descriptors TSO packets will signal segments TX completion in the separate CQ descriptors. Each CQ descriptor for HW TSO will point to the same SQ entry. Do not invoke nicvf_put_sq_desc() for secondary segments to avoid free_cnt corruption and eventually integer overflow that will result in the negative free_cnt value and hence impossibility of further transmission. Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5535 Modified: head/sys/dev/vnic/nicvf_queues.c Modified: head/sys/dev/vnic/nicvf_queues.c ============================================================================== --- head/sys/dev/vnic/nicvf_queues.c Thu Mar 10 05:23:46 2016 (r296601) +++ head/sys/dev/vnic/nicvf_queues.c Thu Mar 10 05:45:24 2016 (r296602) @@ -722,10 +722,10 @@ nicvf_snd_pkt_handler(struct nicvf *nic, if (mbuf != NULL) { m_freem(mbuf); sq->snd_buff[cqe_tx->sqe_ptr].mbuf = NULL; + nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1); } nicvf_check_cqe_tx_errs(nic, cq, cqe_tx); - nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1); NICVF_TX_UNLOCK(sq); return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603100545.u2A5jOwv022076>