- Count tso_err again. It was accidentally removed in ixgbe.c rev. 1.28. - ixgbe.h: Sort entries to reduce diff against FreeBSD.diff -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ix_txrx.c
(msaitoh)
--- src/sys/dev/pci/ixgbe/ix_txrx.c 2017/01/19 06:56:33 1.16
+++ src/sys/dev/pci/ixgbe/ix_txrx.c 2017/01/30 05:02:43 1.17
@@ -49,27 +49,27 @@ | @@ -49,27 +49,27 @@ | |||
49 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | 49 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | |
50 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 50 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
51 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 51 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
52 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 52 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
53 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 53 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
54 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 54 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
55 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 55 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
56 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 56 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
57 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 57 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
58 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 58 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
59 | * POSSIBILITY OF SUCH DAMAGE. | 59 | * POSSIBILITY OF SUCH DAMAGE. | |
60 | */ | 60 | */ | |
61 | /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/ | 61 | /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/ | |
62 | /*$NetBSD: ix_txrx.c,v 1.16 2017/01/19 06:56:33 msaitoh Exp $*/ | 62 | /*$NetBSD: ix_txrx.c,v 1.17 2017/01/30 05:02:43 msaitoh Exp $*/ | |
63 | 63 | |||
64 | #include "opt_inet.h" | 64 | #include "opt_inet.h" | |
65 | #include "opt_inet6.h" | 65 | #include "opt_inet6.h" | |
66 | 66 | |||
67 | #include "ixgbe.h" | 67 | #include "ixgbe.h" | |
68 | 68 | |||
69 | #ifdef DEV_NETMAP | 69 | #ifdef DEV_NETMAP | |
70 | #include <net/netmap.h> | 70 | #include <net/netmap.h> | |
71 | #include <sys/selinfo.h> | 71 | #include <sys/selinfo.h> | |
72 | #include <dev/netmap/netmap_kern.h> | 72 | #include <dev/netmap/netmap_kern.h> | |
73 | 73 | |||
74 | extern int ix_crcstrip; | 74 | extern int ix_crcstrip; | |
75 | #endif | 75 | #endif | |
@@ -760,28 +760,34 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, | @@ -760,28 +760,34 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, | |||
760 | struct ip6_hdr *ip6; | 760 | struct ip6_hdr *ip6; | |
761 | #endif | 761 | #endif | |
762 | u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0; | 762 | u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0; | |
763 | int ehdrlen, ip_hlen = 0; | 763 | int ehdrlen, ip_hlen = 0; | |
764 | u16 etype; | 764 | u16 etype; | |
765 | u8 ipproto = 0; | 765 | u8 ipproto = 0; | |
766 | int offload = TRUE; | 766 | int offload = TRUE; | |
767 | int ctxd = txr->next_avail_desc; | 767 | int ctxd = txr->next_avail_desc; | |
768 | u16 vtag = 0; | 768 | u16 vtag = 0; | |
769 | char *l3d; | 769 | char *l3d; | |
770 | 770 | |||
771 | 771 | |||
772 | /* First check if TSO is to be used */ | 772 | /* First check if TSO is to be used */ | |
773 | if (mp->m_pkthdr.csum_flags & (M_CSUM_TSOv4|M_CSUM_TSOv6)) | 773 | if (mp->m_pkthdr.csum_flags & (M_CSUM_TSOv4|M_CSUM_TSOv6)) { | |
774 | return (ixgbe_tso_setup(txr, mp, cmd_type_len, olinfo_status)); | 774 | int rv = ixgbe_tso_setup(txr, mp, cmd_type_len, olinfo_status); | |
775 | ||||
776 | if (rv != 0) { | |||
777 | ++adapter->tso_err.ev_count; | |||
778 | return rv; | |||
779 | } | |||
780 | } | |||
775 | 781 | |||
776 | if ((mp->m_pkthdr.csum_flags & M_CSUM_OFFLOAD) == 0) | 782 | if ((mp->m_pkthdr.csum_flags & M_CSUM_OFFLOAD) == 0) | |
777 | offload = FALSE; | 783 | offload = FALSE; | |
778 | 784 | |||
779 | /* Indicate the whole packet as payload when not doing TSO */ | 785 | /* Indicate the whole packet as payload when not doing TSO */ | |
780 | *olinfo_status |= mp->m_pkthdr.len << IXGBE_ADVTXD_PAYLEN_SHIFT; | 786 | *olinfo_status |= mp->m_pkthdr.len << IXGBE_ADVTXD_PAYLEN_SHIFT; | |
781 | 787 | |||
782 | /* Now ready a context descriptor */ | 788 | /* Now ready a context descriptor */ | |
783 | TXD = (struct ixgbe_adv_tx_context_desc *) &txr->tx_base[ctxd]; | 789 | TXD = (struct ixgbe_adv_tx_context_desc *) &txr->tx_base[ctxd]; | |
784 | 790 | |||
785 | /* | 791 | /* | |
786 | ** In advanced descriptors the vlan tag must | 792 | ** In advanced descriptors the vlan tag must | |
787 | ** be placed into the context descriptor. Hence | 793 | ** be placed into the context descriptor. Hence |
--- src/sys/dev/pci/ixgbe/ixgbe.h 2017/01/25 07:46:53 1.20
+++ src/sys/dev/pci/ixgbe/ixgbe.h 2017/01/30 05:02:43 1.21
@@ -49,27 +49,27 @@ | @@ -49,27 +49,27 @@ | |||
49 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | 49 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | |
50 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 50 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
51 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 51 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
52 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 52 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
53 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 53 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
54 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 54 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
55 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 55 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
56 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 56 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
57 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 57 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
58 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 58 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
59 | * POSSIBILITY OF SUCH DAMAGE. | 59 | * POSSIBILITY OF SUCH DAMAGE. | |
60 | */ | 60 | */ | |
61 | /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 303890 2016-08-09 19:32:06Z dumbbell $*/ | 61 | /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 303890 2016-08-09 19:32:06Z dumbbell $*/ | |
62 | /*$NetBSD: ixgbe.h,v 1.20 2017/01/25 07:46:53 msaitoh Exp $*/ | 62 | /*$NetBSD: ixgbe.h,v 1.21 2017/01/30 05:02:43 msaitoh Exp $*/ | |
63 | 63 | |||
64 | 64 | |||
65 | #ifndef _IXGBE_H_ | 65 | #ifndef _IXGBE_H_ | |
66 | #define _IXGBE_H_ | 66 | #define _IXGBE_H_ | |
67 | 67 | |||
68 | 68 | |||
69 | #include <sys/param.h> | 69 | #include <sys/param.h> | |
70 | #include <sys/reboot.h> | 70 | #include <sys/reboot.h> | |
71 | #include <sys/systm.h> | 71 | #include <sys/systm.h> | |
72 | #if __FreeBSD_version >= 800000 | 72 | #if __FreeBSD_version >= 800000 | |
73 | #include <sys/buf_ring.h> | 73 | #include <sys/buf_ring.h> | |
74 | #endif | 74 | #endif | |
75 | #include <sys/mbuf.h> | 75 | #include <sys/mbuf.h> | |
@@ -580,28 +580,28 @@ struct adapter { | @@ -580,28 +580,28 @@ struct adapter { | |||
580 | 580 | |||
581 | /* Misc stats maintained by the driver */ | 581 | /* Misc stats maintained by the driver */ | |
582 | struct evcnt dropped_pkts; | 582 | struct evcnt dropped_pkts; | |
583 | struct evcnt mbuf_defrag_failed; | 583 | struct evcnt mbuf_defrag_failed; | |
584 | struct evcnt mbuf_header_failed; | 584 | struct evcnt mbuf_header_failed; | |
585 | struct evcnt mbuf_packet_failed; | 585 | struct evcnt mbuf_packet_failed; | |
586 | struct evcnt efbig_tx_dma_setup; | 586 | struct evcnt efbig_tx_dma_setup; | |
587 | struct evcnt efbig2_tx_dma_setup; | 587 | struct evcnt efbig2_tx_dma_setup; | |
588 | struct evcnt m_defrag_failed; | 588 | struct evcnt m_defrag_failed; | |
589 | struct evcnt einval_tx_dma_setup; | 589 | struct evcnt einval_tx_dma_setup; | |
590 | struct evcnt other_tx_dma_setup; | 590 | struct evcnt other_tx_dma_setup; | |
591 | struct evcnt eagain_tx_dma_setup; | 591 | struct evcnt eagain_tx_dma_setup; | |
592 | struct evcnt enomem_tx_dma_setup; | 592 | struct evcnt enomem_tx_dma_setup; | |
593 | struct evcnt watchdog_events; | |||
594 | struct evcnt tso_err; | 593 | struct evcnt tso_err; | |
594 | struct evcnt watchdog_events; | |||
595 | struct evcnt link_irq; | 595 | struct evcnt link_irq; | |
596 | struct evcnt morerx; | 596 | struct evcnt morerx; | |
597 | struct evcnt moretx; | 597 | struct evcnt moretx; | |
598 | struct evcnt txloops; | 598 | struct evcnt txloops; | |
599 | struct evcnt handleq; | 599 | struct evcnt handleq; | |
600 | struct evcnt req; | 600 | struct evcnt req; | |
601 | 601 | |||
602 | union { | 602 | union { | |
603 | struct ixgbe_hw_stats pf; | 603 | struct ixgbe_hw_stats pf; | |
604 | struct ixgbevf_hw_stats vf; | 604 | struct ixgbevf_hw_stats vf; | |
605 | } stats; | 605 | } stats; | |
606 | #if __FreeBSD_version >= 1100036 | 606 | #if __FreeBSD_version >= 1100036 | |
607 | /* counter(9) stats */ | 607 | /* counter(9) stats */ |