Date: Fri, 8 Apr 2016 16:14:18 +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: r297721 - head/sys/dev/vnic Message-ID: <201604081614.u38GEIms077941@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Fri Apr 8 16:14:18 2016 New Revision: 297721 URL: https://svnweb.freebsd.org/changeset/base/297721 Log: Fix sending TSO packets larger than single DMA segment on VNIC Due to the bug in the number of 'GATHER' subdescriptors for TSO packets, VNIC was not able to transmit more than one DMA segment with TSO enabled. Obtained from: Semihalf Sponsored by: Cavium Modified: head/sys/dev/vnic/nicvf_queues.c Modified: head/sys/dev/vnic/nicvf_queues.c ============================================================================== --- head/sys/dev/vnic/nicvf_queues.c Fri Apr 8 15:48:10 2016 (r297720) +++ head/sys/dev/vnic/nicvf_queues.c Fri Apr 8 16:14:18 2016 (r297721) @@ -1904,7 +1904,6 @@ static int nicvf_tx_mbuf_locked(struct snd_queue *sq, struct mbuf **mbufp) { bus_dma_segment_t segs[256]; - struct nicvf *nic; struct snd_buff *snd_buff; size_t seg; int nsegs, qentry; @@ -1928,12 +1927,7 @@ nicvf_tx_mbuf_locked(struct snd_queue *s } /* Set how many subdescriptors is required */ - nic = sq->nic; - if ((*mbufp)->m_pkthdr.tso_segsz != 0 && nic->hw_tso) - subdesc_cnt = MIN_SQ_DESC_PER_PKT_XMIT; - else - subdesc_cnt = MIN_SQ_DESC_PER_PKT_XMIT + nsegs - 1; - + subdesc_cnt = MIN_SQ_DESC_PER_PKT_XMIT + nsegs - 1; if (subdesc_cnt > sq->free_cnt) { /* ARM64TODO: Add mbuf defragmentation if we lack descriptors */ bus_dmamap_unload(sq->snd_buff_dmat, snd_buff->dmap);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604081614.u38GEIms077941>