The NetBSD Project

CVS log for src/sys/dev/pci/ixgbe/ix_txrx.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / pci / ixgbe

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24.2.31 / (download) - annotate - [select for diffs], Sat Feb 3 12:17:03 2024 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.24.2.30: +78 -77 lines
Diff to previous 1.24.2.30 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1933:

	sys/dev/pci/ixgbe/ix_txrx.c			1.105-1.116 via patch
	sys/dev/pci/ixgbe/ixgbe.c			1.345-1.346,1.349 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.94-1.98
	sys/dev/pci/ixgbe/ixgbe_type.h			1.62
	sys/dev/pci/ixgbe/ixv.c				1.193,1.195-1.196

- Clear the WTHRESH bit field before writing it.
- Optimize ixgbe_txeof().
- Use kmem_zalloc() instead of malloc(,M_ZERO).
- Add QPRDC(Queue Packet Receive Drop Count) into iqdrops.
- No functional change
  - Move assignment of TXD.
  - ixv(4): Remove unused IFF_OACTIVE.
  - Don't include the Flow Director related members to reduce the
    size of struct tx_ring. On amd64 and aarch64, the real size is
    not changed because of the alignment.
  - The descriptor ring size and the alignment are tested in the
    attach function, so it's not required to use
    roundup2(size, DBA_ALIGN).
  - Use #ifdef LRO more to reduce the size of struct rx_ring.
  - Change "me" from 32bit to 8bit because the max is 128.
    This commit doesn't change the real size of ix_queue, tx_ring
    and rx_ring because of the alignment.
  - Th RSC (hardware receive side coalescing) feature has been
    disabled all along, so enclose the code with #ifdef RSC.
  - Remove unused.
  - Modify for the readability.
  - Modify comment.
  - Fix comment. Whitespace.

Revision 1.54.2.15 / (download) - annotate - [select for diffs], Sat Feb 3 12:13:32 2024 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.54.2.14: +78 -77 lines
Diff to previous 1.54.2.14 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1792:

	sys/dev/pci/ixgbe/ix_txrx.c			1.105-1.116 via patch
	sys/dev/pci/ixgbe/ixgbe.c			1.345-1.346,1.349 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.94-1.98
	sys/dev/pci/ixgbe/ixgbe_type.h			1.62
	sys/dev/pci/ixgbe/ixv.c				1.193,1.195-1.196

- Clear the WTHRESH bit field before writing it.
- Optimize ixgbe_txeof().
- Use kmem_zalloc() instead of malloc(,M_ZERO).
- Add QPRDC(Queue Packet Receive Drop Count) into iqdrops.
- No functional change
  - Move assignment of TXD.
  - ixv(4): Remove unused IFF_OACTIVE.
  - Don't include the Flow Director related members to reduce the
    size of struct tx_ring. On amd64 and aarch64, the real size is
    not changed because of the alignment.
  - The descriptor ring size and the alignment are tested in the
    attach function, so it's not required to use
    roundup2(size, DBA_ALIGN).
  - Use #ifdef LRO more to reduce the size of struct rx_ring.
  - Change "me" from 32bit to 8bit because the max is 128.
    This commit doesn't change the real size of ix_queue, tx_ring
    and rx_ring because of the alignment.
  - Th RSC (hardware receive side coalescing) feature has been
    disabled all along, so enclose the code with #ifdef RSC.
  - Remove unused.
  - Modify for the readability.
  - Modify comment.
  - Fix comment. Whitespace.

Revision 1.100.4.5 / (download) - annotate - [select for diffs], Sat Feb 3 11:58:53 2024 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4
Changes since 1.100.4.4: +78 -47 lines
Diff to previous 1.100.4.4 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #563):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.110
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.345
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.111
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.346
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.112
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.62
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.113
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.348
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.114
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.115
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.116
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.105
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.106
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.107
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.108
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.109
	sys/dev/pci/ixgbe/ixv.c: revision 1.193
	sys/dev/pci/ixgbe/ixv.c: revision 1.195
	sys/dev/pci/ixgbe/ixv.c: revision 1.196
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.94
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.95
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.96
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.97
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.98

ixgbe: Fix comment. No functional change.
ixgbe: Whitespace. No functional change.
ixgbe(4): Move assignment of TXD. NFCI.
ixgbe(4): Modify comment. No functional change.
 ixgbe_tx_ctx_setup() may or may not consume one TX descriptor.
ixv(4): Remove unused IFF_OACTIVE. No functional change.
ixgbe: Clear the WTHRESH bit field before writing it.
ixgbe: Modify for the readability. No functional change.
ixgbe: micro-optimize ixgbe_txeof()
 Update txr->tx_avail and txr->txr_no_space outside the loop in ixgbe_txeof().
ixgbe: Update if_opackets outside the loop in ixgbe_txeof().
ixgbe: micro-optimize ixgbe_txeof()
 Update txr->packets outside the loop in ixgbe_txeof().
ixgbe: Use #ifdef IXGBE_FDIR more
 Don't include the Flow Director related members to reduce the size of
struct tx_ring. On amd64 and aarch64, the real size is not changed
because of the alignment.
ixgbe: Simplify. No functional change.
 The descriptor ring size and the alignment are tested in the attach
function, so it's not required to use roundup2(size, DBA_ALIGN).
ixgbe: Use kmem_zalloc() instead of malloc(,M_ZERO).
ixgbe: Remove unused to reduce the size of struct rx_ring.
ixgbe: Use #ifdef LRO more to reduce the size of struct rx_ring.
ixgbe: Change "me" from 32bit to 8bit because the max is 128.
 This commit doesn't change the real size of ix_queue, tx_ring and rx_ring
because of the alignment.
ixgbe: Use #ifdef RSC
 This feature (hardware receive side coalescing) has been disabled all along,
so enclose the code with #ifdef RSC.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Dec 30 06:16:44 2023 UTC (3 months, 2 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.115: +24 -6 lines
Diff to previous 1.115 (colored) to selected 1.34.2.7 (colored)

ixgbe: Use #ifdef RSC

 This feature (hardware receive side coalescing) has been disabled all along,
so enclose the code with #ifdef RSC.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Dec 29 07:36:47 2023 UTC (3 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.114: +4 -2 lines
Diff to previous 1.114 (colored) to selected 1.34.2.7 (colored)

ixgbe: Use #ifdef LRO more to reduce the size of struct rx_ring.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Dec 28 10:13:51 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.113: +21 -19 lines
Diff to previous 1.113 (colored) to selected 1.34.2.7 (colored)

ixgbe: Use kmem_zalloc() instead of malloc(,M_ZERO).

Revision 1.113 / (download) - annotate - [select for diffs], Thu Dec 28 10:05:18 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.112: +8 -8 lines
Diff to previous 1.112 (colored) to selected 1.34.2.7 (colored)

ixgbe: Simplify. No functional change.

 The descriptor ring size and the alignment are tested in the attach
function, so it's not required to use roundup2(size, DBA_ALIGN).

Revision 1.112 / (download) - annotate - [select for diffs], Thu Dec 28 10:02:14 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.111: +6 -2 lines
Diff to previous 1.111 (colored) to selected 1.34.2.7 (colored)

ixgbe: Use #ifdef IXGBE_FDIR more

 Don't include the Flow Director related members to reduce the size of
struct tx_ring. On amd64 and aarch64, the real size is not changed
because of the alignment.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Dec 13 08:25:54 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.34.2.7 (colored)

ixgbe: micro-optimize ixgbe_txeof()

 Update txr->packets outside the loop in ixgbe_txeof().

Revision 1.110 / (download) - annotate - [select for diffs], Fri Dec 8 05:42:59 2023 UTC (4 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored) to selected 1.34.2.7 (colored)

ixgbe: Update if_opackets outside the loop in ixgbe_txeof().

Revision 1.109 / (download) - annotate - [select for diffs], Fri Dec 8 05:39:27 2023 UTC (4 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.108: +10 -5 lines
Diff to previous 1.108 (colored) to selected 1.34.2.7 (colored)

ixgbe: micro-optimize ixgbe_txeof()

 Update txr->tx_avail and txr->txr_no_space outside the loop in ixgbe_txeof().

Revision 1.108 / (download) - annotate - [select for diffs], Thu Nov 16 05:39:08 2023 UTC (5 months ago) by msaitoh
Branch: MAIN
Changes since 1.107: +7 -7 lines
Diff to previous 1.107 (colored) to selected 1.34.2.7 (colored)

ixgbe: Modify for the readability. No functional change.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Nov 14 03:03:18 2023 UTC (5 months ago) by msaitoh
Branch: MAIN
Changes since 1.106: +4 -4 lines
Diff to previous 1.106 (colored) to selected 1.34.2.7 (colored)

ixgbe(4): Modify comment. No functional change.

 ixgbe_tx_ctx_setup() may or may not consume one TX descriptor.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Nov 14 02:31:46 2023 UTC (5 months ago) by msaitoh
Branch: MAIN
Changes since 1.105: +5 -5 lines
Diff to previous 1.105 (colored) to selected 1.34.2.7 (colored)

ixgbe(4): Move assignment of TXD. NFCI.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Nov 2 05:07:57 2023 UTC (5 months, 2 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.104: +5 -5 lines
Diff to previous 1.104 (colored) to selected 1.34.2.7 (colored)

ixgbe: Whitespace. No functional change.

Revision 1.24.2.30 / (download) - annotate - [select for diffs], Wed Oct 18 14:23:15 2023 UTC (6 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.29: +8 -9 lines
Diff to previous 1.24.2.29 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1914:

	sys/dev/pci/ixgbe/ix_txrx.c			1.103-1.104
	sys/dev/pci/ixgbe/ixgbe.c			1.334-1.338,
							1.341-1.344 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.90-1.93
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.31-1.32
	sys/dev/pci/ixgbe/ixgbe_api.c			1.29
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.5
	sys/dev/pci/ixgbe/ixgbe_common.c		1.46-1.47
	sys/dev/pci/ixgbe/ixgbe_common.h		1.18
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.14-1.15
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.13
	sys/dev/pci/ixgbe/ixgbe_type.h			1.59-1.61
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.24
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.28
	sys/dev/pci/ixgbe/ixv.c				1.187-1.192 via patch

- ixg(4): Add 82599 LS support once again.
- ixg(4): Filter out spurious link up indication more.
- ixg(4): Print DEVICE_CAPS register.
- ixg(4): Fix a bug that the number of queues is unintentionally
  limited to a small number or wrong error message may be printed
  when two devices' number of MSI-X vectors are different.
- Modify error message of wrong TX/RX descriptor size.
- Enable interrupt after setting IFF_RUNNING.
- Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change
  all devices all queues default interrupt rate.
- Cleanup the code.

Revision 1.54.2.14 / (download) - annotate - [select for diffs], Wed Oct 18 14:05:27 2023 UTC (6 months ago) by martin
Branch: netbsd-9
Changes since 1.54.2.13: +8 -9 lines
Diff to previous 1.54.2.13 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1753:

	sys/dev/pci/ixgbe/ix_txrx.c			1.103-1.104
	sys/dev/pci/ixgbe/ixgbe.c			1.334-1.338,
							1.341-1.344 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.90-1.93
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.31-1.32
	sys/dev/pci/ixgbe/ixgbe_api.c			1.29
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.5
	sys/dev/pci/ixgbe/ixgbe_common.c		1.46-1.47
	sys/dev/pci/ixgbe/ixgbe_common.h		1.18
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.14-1.15
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.13
	sys/dev/pci/ixgbe/ixgbe_type.h			1.59-1.61
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.24
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.28
	sys/dev/pci/ixgbe/ixv.c				1.187-1.192

- ixg(4): Add 82599 LS support once again.
- ixg(4): Filter out spurious link up indication more.
- ixg(4): Print DEVICE_CAPS register.
- ixg(4): Fix a bug that the number of queues is unintentionally
  limited to a small number or wrong error message may be printed
  when two devices' number of MSI-X vectors are different.
- Modify error message of wrong TX/RX descriptor size.
- Enable interrupt after setting IFF_RUNNING.
- Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change
  all devices all queues default interrupt rate.
- Cleanup the code.

Revision 1.100.4.4 / (download) - annotate - [select for diffs], Wed Oct 18 11:53:22 2023 UTC (6 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.100.4.3: +5 -5 lines
Diff to previous 1.100.4.3 (colored) to branchpoint 1.100 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #420):

	sys/dev/pci/ixgbe/ixgbe.c: revision 1.340
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.341
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.342
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.343
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.344
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.61
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.104
	sys/dev/pci/ixgbe/ixv.c: revision 1.190
	sys/dev/pci/ixgbe/ixv.c: revision 1.191
	sys/dev/pci/ixgbe/ixv.c: revision 1.192
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.93

ixg(4): Print DEVICE_CAPS register.

ixgbe: Whitespace. No functional change.

ixg(4): Don't print wrong error message about ixgbe_num_queues.
 Don't override the ixgbe_num_queues global variable. It's the default
value of the number of queues and should not override it because it
will be referenced by later device attach. For example, the number of
MSI-X vector is 64 on X540 and 18 on 82599. When both cards are inserted
to a machine that the number of CPU is 24 and X540 is probed earlier,
ixgbe_num_queues is overridden to 24 and the following error message is
printed when attaching 82599:
	ixg2: autoconfiguration error: ixgbe_num_queues (24) is too large,
	using reduced amount (17).

Note that the number of queues is in sc->num_queuss and referenced
by hw.ixgN.num_queues sysctl.

ixgbe: Don't override the {ixgbe,ixv}_max_interrupt_rate global variable.

 Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change all
devices all queues default interrupt rate.

ixgbe: Whitespace. No functional change.

Revision 1.100.4.3 / (download) - annotate - [select for diffs], Fri Oct 13 18:55:12 2023 UTC (6 months ago) by martin
Branch: netbsd-10
Changes since 1.100.4.2: +5 -6 lines
Diff to previous 1.100.4.2 (colored) to branchpoint 1.100 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #407):

	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.47
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.28
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.60
	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.31
	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.32
	sys/dev/pci/ixgbe/ixv.c: revision 1.187
	sys/dev/pci/ixgbe/ixv.c: revision 1.188
	sys/dev/pci/ixgbe/ixv.c: revision 1.189
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.18
	sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.24
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.334
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.335
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.336
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.337
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.103
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.338
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.59
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.14
	sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.15
	sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.29
	sys/dev/pci/ixgbe/ixgbe_bypass.h: revision 1.5
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.90
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.91
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.92
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.46

ixg(4): Remove unused and old function. No functional change.
 - From FreeBSD's ix-3.3.32.

ixg(4): Add 82599 LS once again.
 - From:
        FreeBSD: 9228ac3a69c4c7401a743e6465e118101a2beeb0
        DPDK:    549ccd3dc01539e060597b503f2b65b272de3347
 - This was removed 5 years ago. From the commit message:
   > Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
   > was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and
   > removed in ix-3.3.6.tar.gz.

ixg(4): Filter out spurious link up indication
 - Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
   to filter out spurious link up indication by transceiver with no fiber
   cable connected.
 - From FreeBSD:
     In-tree: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c
     Out of tree: ix-3.3.33.

ixgbe: Simplify definitions. No functional change.
 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.

ixgbe: Modify error message of wrong TX/RX descriptor size.
  - Based from FreeBSD ix-3.3.35. I think ix-3.3.35's RING_INCREMENT(== 32)
    is wrong. It should be 8(DBA_ALIGN / sizeof(union ixgbe_adv_[tr]x_desc)).
    Linux also uses 8.

ixgbe: Remove NO_82599_SUPPORT and NO_X540_SUPPORT support. NFCI.
 From FreeBSD ix-3.3.35. Note that this file is not used in NetBSD.

ixgbe: Enable interrupt after setting IFF_RUNNING. Same as FreeBSD x-3.3.35.

ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).

Revision 1.24.2.29 / (download) - annotate - [select for diffs], Fri Oct 13 18:32:38 2023 UTC (6 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.28: +173 -173 lines
Diff to previous 1.24.2.28 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1912):

	sys/dev/pci/ixgbe/if_bypass.c		1.10
	sys/dev/pci/ixgbe/if_fdir.c		1.6 via patch
	sys/dev/pci/ixgbe/if_sriov.c		1.18 via patch
	sys/dev/pci/ixgbe/ix_txrx.c		1.102 via patch
	sys/dev/pci/ixgbe/ixgbe.c		1.333,1.339 via patch
	sys/dev/pci/ixgbe/ixgbe.h		1.89
	sys/dev/pci/ixgbe/ixgbe_api.h		1.17
	sys/dev/pci/ixgbe/ixgbe_common.h	1.17
	sys/dev/pci/ixgbe/ixgbe_bypass.h	1.4
	sys/dev/pci/ixgbe/ixgbe_common.c	1.45
	sys/dev/pci/ixgbe/ixgbe_fdir.h		1.5
	sys/dev/pci/ixgbe/ixgbe_netmap.h	1.3
	sys/dev/pci/ixgbe/ixgbe_netmap.c	1.6
	sys/dev/pci/ixgbe/ixgbe_osdep.c		1.9
	sys/dev/pci/ixgbe/ixgbe_sriov.h		1.6
	sys/dev/pci/ixgbe/ixgbe_type.h		1.58
	sys/dev/pci/ixgbe/ixgbe_x550.c		1.27
	sys/dev/pci/ixgbe/ixv.c			1.186 via patch

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
    - struct adapter *adapter -> struct ixgbe_softc *sc
    - master -> primary
    - black -> block

ixg(4): Whitespace. No functional change.

Revision 1.54.2.13 / (download) - annotate - [select for diffs], Fri Oct 13 18:20:30 2023 UTC (6 months ago) by martin
Branch: netbsd-9
Changes since 1.54.2.12: +173 -173 lines
Diff to previous 1.54.2.12 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1749):

	sys/dev/pci/ixgbe/if_bypass.c		1.10
	sys/dev/pci/ixgbe/if_fdir.c		1.6 via patch
	sys/dev/pci/ixgbe/if_sriov.c		1.18 via patch
	sys/dev/pci/ixgbe/ix_txrx.c		1.102 via patch
	sys/dev/pci/ixgbe/ixgbe.c		1.333,1.339 via patch
	sys/dev/pci/ixgbe/ixgbe.h		1.89
	sys/dev/pci/ixgbe/ixgbe_api.h		1.17
	sys/dev/pci/ixgbe/ixgbe_common.h	1.17
	sys/dev/pci/ixgbe/ixgbe_bypass.h	1.4
	sys/dev/pci/ixgbe/ixgbe_common.c	1.45
	sys/dev/pci/ixgbe/ixgbe_fdir.h		1.5
	sys/dev/pci/ixgbe/ixgbe_netmap.h	1.3
	sys/dev/pci/ixgbe/ixgbe_netmap.c	1.6
	sys/dev/pci/ixgbe/ixgbe_osdep.c		1.9
	sys/dev/pci/ixgbe/ixgbe_sriov.h		1.6
	sys/dev/pci/ixgbe/ixgbe_type.h		1.58
	sys/dev/pci/ixgbe/ixgbe_x550.c		1.27
	sys/dev/pci/ixgbe/ixv.c			1.186 via patch

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
    - struct adapter *adapter -> struct ixgbe_softc *sc
    - master -> primary
    - black -> block

ixg(4): Whitespace. No functional change.

Revision 1.100.4.2 / (download) - annotate - [select for diffs], Fri Oct 13 18:16:51 2023 UTC (6 months ago) by martin
Branch: netbsd-10
Changes since 1.100.4.1: +170 -170 lines
Diff to previous 1.100.4.1 (colored) to branchpoint 1.100 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #405):

	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.27
	sys/dev/pci/ixgbe/ixgbe_fdir.h: revision 1.5
	sys/dev/pci/ixgbe/ixv.c: revision 1.186
	sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.9
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.17
	sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.17
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.89
	sys/dev/pci/ixgbe/if_fdir.c: revision 1.6
	sys/dev/pci/ixgbe/if_sriov.c: revision 1.18
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.333
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.102
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.339
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.58
	sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.6
	sys/dev/pci/ixgbe/if_bypass.c: revision 1.10
	sys/dev/pci/ixgbe/ixgbe_bypass.h: revision 1.4
	sys/dev/pci/ixgbe/ixgbe_netmap.h: revision 1.3
	sys/dev/pci/ixgbe/ixgbe_netmap.c: revision 1.6
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.45

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
    - struct adapter *adapter -> struct ixgbe_softc *sc
    - master -> primary
    - black -> block

ixg(4): Whitespace. No functional change.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Oct 12 03:43:55 2023 UTC (6 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.103: +5 -5 lines
Diff to previous 1.103 (colored) to selected 1.34.2.7 (colored)

ixgbe: Whitespace. No functional change.

Revision 1.24.2.28 / (download) - annotate - [select for diffs], Sun Oct 8 15:19:31 2023 UTC (6 months, 1 week ago) by martin
Branch: netbsd-8
Changes since 1.24.2.27: +2 -7 lines
Diff to previous 1.24.2.27 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1745):

	sys/dev/pci/ixgbe/ixgbe.c		1.327-1.332 via patch
	sys/dev/pci/ixgbe/ixgbe.h		1.87-1.88
	sys/dev/pci/ixgbe/ixv.c 		1.184-1.185
	sys/dev/pci/ixgbe/ix_txrx.c		1.101
	sys/dev/pci/ixgbe/ixgbe_82599.c 	1.30
	sys/dev/pci/ixgbe/ixgbe_vf.c		1.32-1.33
	sys/dev/pci/ixgbe/ixgbe_vf.h		1.18
	sys/dev/pci/ixgbe/ixgbe_mbx.h		1.20
	sys/dev/pci/ixgbe/ixgbe_type.h		1.57

- Reorder some event counters for readability.
- Rename some descriptions of event counters.
- Count Queue Bytes {Transmit, Receive} counter.
- Improve error check in ixgbe_check_mac_link_vf().
- Add new IXGBE_VF_GET_LINK_STATE message support.
  The VF's link state can be forced to down by PF.
- Update FCTRL after writing multicast filter.
- Update comments.

Revision 1.54.2.12 / (download) - annotate - [select for diffs], Sun Oct 8 15:13:09 2023 UTC (6 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.54.2.11: +2 -7 lines
Diff to previous 1.54.2.11 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1745):

	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.30
	sys/dev/pci/ixgbe/ixv.c: revision 1.184
	sys/dev/pci/ixgbe/ixv.c: revision 1.185
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.32
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.33
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.87
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.88
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.330
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.331
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.332
	sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.18
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.101
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.57
	sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.20
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.327
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.328
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.329

ixgbe: Reorder some event counters for readability.

ixg(4): Rename some descriptions of event counters.
 - Rename some descriptions from register name to the meaning.
 - For the same meaning's counters, add "(soft)" or "(reg)".
   The former is for a software level counter and the latter is for a
   statistics counter register based.

ixg(4): Count Queue Bytes {Transmit, Receive} counter.

ixg(4): Reorder some flow control related event counters for readability.

ixg(4): Rename some descriptions of flow control related event conters.
Remove obsolete comment.

ixgbe: Fix typo in comment. No functional change.

ixv(4): Improve error check.
 ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf()
function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision
problem. The change had a problem that error checks have not done at all if
the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27.

ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support.
 PF can control vf's link state by this change. Note that Linux's PF driver
can't control the link to force up (i.e. ip link set XXX vf Y state enable).
From FreeBSD ixv-1.5.30.

ixg(4): Update FCTRL after writing multicast filter. Same as other OSes.
 From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5.

Revision 1.100.4.1 / (download) - annotate - [select for diffs], Sun Oct 8 14:57:53 2023 UTC (6 months, 1 week ago) by martin
Branch: netbsd-10
Changes since 1.100: +2 -7 lines
Diff to previous 1.100 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #395):

	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.30
	sys/dev/pci/ixgbe/ixv.c: revision 1.184
	sys/dev/pci/ixgbe/ixv.c: revision 1.185
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.32
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.33
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.87
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.88
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.330
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.331
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.332
	sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.18
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.101
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.57
	sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.20
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.327
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.328
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.329

ixgbe: Reorder some event counters for readability.

ixg(4): Rename some descriptions of event counters.
 - Rename some descriptions from register name to the meaning.
 - For the same meaning's counters, add "(soft)" or "(reg)".
   The former is for a software level counter and the latter is for a
   statistics counter register based.

ixg(4): Count Queue Bytes {Transmit, Receive} counter.

ixg(4): Reorder some flow control related event counters for readability.

ixg(4): Rename some descriptions of flow control related event conters.
Remove obsolete comment.

ixgbe: Fix typo in comment. No functional change.

ixv(4): Improve error check.
 ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf()
function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision
problem. The change had a problem that error checks have not done at all if
the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27.

ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support.
 PF can control vf's link state by this change. Note that Linux's PF driver
can't control the link to force up (i.e. ip link set XXX vf Y state enable).
From FreeBSD ixv-1.5.30.

ixg(4): Update FCTRL after writing multicast filter. Same as other OSes.
 From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Oct 6 14:48:08 2023 UTC (6 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.102: +5 -6 lines
Diff to previous 1.102 (colored) to selected 1.34.2.7 (colored)

ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).

Revision 1.102 / (download) - annotate - [select for diffs], Fri Oct 6 14:37:04 2023 UTC (6 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.101: +170 -170 lines
Diff to previous 1.101 (colored) to selected 1.34.2.7 (colored)

ixgbe: Rename some definitions, modify comment. No functional change.

 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
    - struct adapter *adapter -> struct ixgbe_softc *sc
    - master -> primary
    - black -> block

Revision 1.101 / (download) - annotate - [select for diffs], Tue Oct 3 06:06:50 2023 UTC (6 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.100: +2 -7 lines
Diff to previous 1.100 (colored) to selected 1.34.2.7 (colored)

Remove obsolete comment.

Revision 1.24.2.27 / (download) - annotate - [select for diffs], Mon Jan 23 14:07:24 2023 UTC (14 months, 3 weeks ago) by martin
Branch: netbsd-8
Changes since 1.24.2.26: +10 -4 lines
Diff to previous 1.24.2.26 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1796:

	sys/dev/pci/files.pci				1.442
	sys/dev/pci/ixgbe/ix_txrx.c			1.99-1.100
	sys/dev/pci/ixgbe/ixgbe.c			1.320-1.324 via patch
	sys/dev/pci/ixgbe/ixgbe_82598.c 		1.19
	sys/dev/pci/ixgbe/ixgbe_api.c			1.28
	sys/dev/pci/ixgbe/ixgbe_common.c		1.43
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.17
	sys/dev/pci/ixgbe/ixv.c 			1.183

- Add an option for Tx to use deferred softint regardless of whether
  can get txq lock or not. It's off by default.
- Call txeof first, then rxeof for the consistency.
- Make three "Unsupported SFP+ module..." messages the same.
- KNF. Modify comment. Fix typo.

Revision 1.54.2.11 / (download) - annotate - [select for diffs], Mon Jan 23 14:04:42 2023 UTC (14 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.54.2.10: +10 -4 lines
Diff to previous 1.54.2.10 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1579:

	sys/dev/pci/files.pci				1.442
	sys/dev/pci/ixgbe/ix_txrx.c			1.99-1.100
	sys/dev/pci/ixgbe/ixgbe.c			1.320-1.324 via patch
	sys/dev/pci/ixgbe/ixgbe_82598.c 		1.19
	sys/dev/pci/ixgbe/ixgbe_api.c			1.28
	sys/dev/pci/ixgbe/ixgbe_common.c		1.43
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.17
	sys/dev/pci/ixgbe/ixv.c 			1.183

- Add an option for Tx to use deferred softint regardless of whether
  can get txq lock or not. It's off by default.
- Call txeof first, then rxeof for the consistency.
- Make three "Unsupported SFP+ module..." messages the same.
- KNF. Modify comment. Fix typo.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Sep 16 03:05:51 2022 UTC (19 months ago) by knakahara
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.99: +8 -2 lines
Diff to previous 1.99 (colored) to selected 1.34.2.7 (colored)

ixg(4) add an option for Tx to use deferred softint regardless of whether can get txq lock or not.

That imporve (7%) and stabilize throughput.  But that can cause
latency degradation, so off by default.

ok'ed by msaitoh@n.o.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Aug 7 09:37:47 2022 UTC (20 months, 1 week ago) by andvar
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored) to selected 1.34.2.7 (colored)

fix typos in comments.

Revision 1.24.2.26 / (download) - annotate - [select for diffs], Fri Jun 3 12:31:09 2022 UTC (22 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.24.2.25: +23 -23 lines
Diff to previous 1.24.2.25 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requestes by msaitoh in ticket #1746:

	sys/dev/pci/ixgbe/ix_txrx.c			1.95
	sys/dev/pci/ixgbe/ixgbe.c			1.261,1.263,
							1.265-1.268,1.273,
							1.275-1.277,1.305,
							1.312,
							1.316-1.321 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.85 via patch
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.19
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.15-1.16
	sys/dev/pci/ixgbe/ixgbe_type.h			1.46-1.47
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.26
	sys/dev/pci/ixgbe/ixv.c				1.178,1.182 via patch

- Reduce code duplication between ixgbe_msix_admin() and
  ixgbe_legacy_irq().
  - Add missing code which was not in ixgbe_msix_admin() from
    ixgbe_legacy_irq() and vice versa.
  - Reorder code.
- Disable/enable the OTHER interrupts correctly.
- Don't return in the middle of ixgbe_msix_admin() when an flow
  director reinit failed. NetBSD currently doesn't support flow
  director, so this is not a real bug.
- Print ECC, PHY and temp error log using with ratecheck().
- Correctly re-enable queue interrupt in ixgbe_legacy_irq().
- Correctly enter the recovery mode.
- No functional change:
  - Add some debug printf()s.
  - Don't use "more" flag for simplify.
  - Use macro.
  - Fix typos in comment.
  - KNF.

Revision 1.24.2.25 / (download) - annotate - [select for diffs], Tue May 31 14:07:51 2022 UTC (22 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.24.2.24: +3 -2 lines
Diff to previous 1.24.2.24 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1745):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98
	sys/dev/pci/ixgbe/ixv.c: revision 1.181
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.315
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.86

bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry
which is still (and will stay) mapped.

Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen.
There may be others.

Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed.
Fixes PR kern/56857.

Remove unused adapter->msix_mem.

Revision 1.24.2.24 / (download) - annotate - [select for diffs], Mon May 30 17:05:51 2022 UTC (22 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.24.2.23: +6 -5 lines
Diff to previous 1.24.2.23 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1744:

	sys/dev/pci/ixgbe/ixgbe.c			1.270,1.280,1.307-1.311,
							1.313-1.314 via patch
	sys/dev/pci/ixgbe/ix_txrx.c			1.96-1.97
	sys/dev/pci/ixgbe/ixv.c				1.179-1.180 via patch


- ixg(4): Print Printed Board Assembly (PBA) number.
- ixg(4): Add IFF_RUNNING check in ixgbe_legacy_irq() again. this might
  fix small race but it's not so dangerous.
- Add value check for {tx,rx}_process_limit sysctl to avoid setting
  wrong value.
- Add missing num_tx_desc sysctl.
- No functional change:
  - KNF a bit.
  - Simplify setting of EIAC register.
  - Move the definition of eicr_mask variable.
  - Enclose flow director stuff in ixgbe_intr_admin_common() with
    IXGBE_FIR which is not defined in NetBSD.
  - Modify comment for consistency.
  - Use cached rx_copy_len in ixgbe_rxeof().

Revision 1.54.2.10 / (download) - annotate - [select for diffs], Mon May 30 17:01:06 2022 UTC (22 months, 2 weeks ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.54.2.9: +6 -5 lines
Diff to previous 1.54.2.9 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh:

	sys/dev/pci/ixgbe/ixgbe.c	1.270,1.280,1.307-1.311,
					1.313-1.314 via patch
	sys/dev/pci/ixgbe/ix_txrx.c	1.96-1.97
	sys/dev/pci/ixgbe/ixv.c		1.158,1.179-1.180 via patch


- ixg(4): Print Printed Board Assembly (PBA) number.
- ixg(4): Add IFF_RUNNING check in ixgbe_legacy_irq() again. this might
  fix small race but it's not so dangerous.
- Add value check for {tx,rx}_process_limit sysctl to avoid setting
  wrong value.
- Add missing num_tx_desc sysctl.
- No functional change:
  - KNF a bit.
  - Simplify setting of EIAC register.
  - Move the definition of eicr_mask variable.
  - Enclose flow director stuff in ixgbe_intr_admin_common() with
    IXGBE_FIR which is not defined in NetBSD.
  - Modify comment for consistency.
  - Use cached rx_copy_len in ixgbe_rxeof().

Revision 1.54.2.9 / (download) - annotate - [select for diffs], Fri May 13 11:18:40 2022 UTC (23 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.54.2.8: +3 -2 lines
Diff to previous 1.54.2.8 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1445):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98

bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry
which is still (and will stay) mapped.

Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen.
There may be others.

Revision 1.98 / (download) - annotate - [select for diffs], Wed May 11 17:22:20 2022 UTC (23 months, 1 week ago) by bouyer
Branch: MAIN
Changes since 1.97: +3 -2 lines
Diff to previous 1.97 (colored) to selected 1.34.2.7 (colored)

bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry
which is still (and will stay) mapped.

Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen.
There may be others.

Revision 1.97 / (download) - annotate - [select for diffs], Mon Apr 25 07:51:12 2022 UTC (23 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.96: +5 -4 lines
Diff to previous 1.96 (colored) to selected 1.34.2.7 (colored)

Use cached rx_copy_len in ixgbe_rxeof().

Revision 1.96 / (download) - annotate - [select for diffs], Mon Apr 25 07:48:53 2022 UTC (23 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.34.2.7 (colored)

Modify comment for consistency. No functional change.

Revision 1.54.2.8 / (download) - annotate - [select for diffs], Wed Feb 2 14:25:49 2022 UTC (2 years, 2 months ago) by martin
Branch: netbsd-9
Changes since 1.54.2.7: +23 -23 lines
Diff to previous 1.54.2.7 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions (requested by msaitoh in ticket #1424):

	sys/dev/pci/ixgbe/ix_txrx.c			1.95
	sys/dev/pci/ixgbe/ixgbe.c			1.305 via patch
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.19
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.15-1.16
	sys/dev/pci/ixgbe/ixv.c				1.178 via patch

Use atomic_{load,store}_relaxed() for event counters.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jan 25 01:56:22 2022 UTC (2 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.94: +23 -23 lines
Diff to previous 1.94 (colored) to selected 1.34.2.7 (colored)

Use atomic_{load,store}_relaxed() for event counters.

Revision 1.24.2.23 / (download) - annotate - [select for diffs], Sat Nov 20 15:21:31 2021 UTC (2 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.22: +42 -7 lines
Diff to previous 1.24.2.22 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1708:

	sys/dev/pci/ixgbe/ixgbe.h			1.81-1.83
	sys/dev/pci/ixgbe/ixgbe.c			1.291-1.292 via patch
	sys/dev/pci/ixgbe/ixgbe_type.h			1.50
	sys/dev/pci/ixgbe/ixv.c				1.167-1.168 via patch
	sys/dev/pci/ixgbe/ix_txrx.c			1.94

- Fix a bug that a near 64KB TSO segment can't send.
- Reduce bus_dmamap_sync() cost.
- Use macro. Fix typos in comment.

Revision 1.54.2.7 / (download) - annotate - [select for diffs], Sat Nov 20 15:16:53 2021 UTC (2 years, 4 months ago) by martin
Branch: netbsd-9
Changes since 1.54.2.6: +42 -7 lines
Diff to previous 1.54.2.6 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1374:

	sys/dev/pci/ixgbe/ixgbe.h			1.81-1.83
	sys/dev/pci/ixgbe/ixgbe.c			1.291-1.292 via patch
	sys/dev/pci/ixgbe/ixgbe_type.h			1.50
	sys/dev/pci/ixgbe/ixv.c				1.167-1.168 via patch
	sys/dev/pci/ixgbe/ix_txrx.c			1.94

- Fix a bug that a near 64KB TSO segment can't send.
- Reduce bus_dmamap_sync() cost.
- Use macro. Fix typos in comment.

Revision 1.24.2.22 / (download) - annotate - [select for diffs], Wed Sep 15 16:38:00 2021 UTC (2 years, 7 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.21: +123 -95 lines
Diff to previous 1.24.2.21 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following (all via patch), requested by msaitoh in ticket #1696:

	sysdev/pci/ixgbe/ixgbe.c			1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
	sysdev/pci/ixgbe/ixgbe.h			1.73, 1.76-1.80 via patch
	sysdev/pci/ixgbe/ix_txrx.c			1.68-1.93
	sysdev/pci/ixgbe/ixv.c				1.153, 1.157-1.161, 1.163-1.166 via patch
	sysdev/pci/ixgbe/if_bypass.c			1.7-1.9
	sysdev/pci/ixgbe/if_fdir.c			1.4-1.5
	sysdev/pci/ixgbe/if_sriov.c			1.10-1.11
	sysdev/pci/ixgbe/ixgbe_82598.c			1.16
	sysdev/pci/ixgbe/ixgbe_82599.c			1.23
	sysdev/pci/ixgbe/ixgbe_api.c			1.25
	sysdev/pci/ixgbe/ixgbe_bypass.h			1.2
	sysdev/pci/ixgbe/ixgbe_common.c			1.30-1.33
	sysdev/pci/ixgbe/ixgbe_dcb.c			1.10-1.11
	sysdev/pci/ixgbe/ixgbe_dcb.h			1.7
	sysdev/pci/ixgbe/ixgbe_dcb_82598.c		1.8-1.9
	sysdev/pci/ixgbe/ixgbe_dcb_82598.h		1.7
	sysdev/pci/ixgbe/ixgbe_dcb_82599.c		1.8-1.9
	sysdev/pci/ixgbe/ixgbe_dcb_82599.h		1.7
	sysdev/pci/ixgbe/ixgbe_fdir.h			1.3
	sysdev/pci/ixgbe/ixgbe_features.h		1.3
	sysdev/pci/ixgbe/ixgbe_mbx.c			1.12
	sysdev/pci/ixgbe/ixgbe_netbsd.c			1.16-1.17
	sysdev/pci/ixgbe/ixgbe_netbsd.h			1.13-1.14
	sysdev/pci/ixgbe/ixgbe_netmap.c			1.3-1.4
	sysdev/pci/ixgbe/ixgbe_netmap.h			1.2
	sysdev/pci/ixgbe/ixgbe_osdep.c			1.7
	sysdev/pci/ixgbe/ixgbe_osdep.h			1.29-1.30
	sysdev/pci/ixgbe/ixgbe_phy.c			1.24
	sysdev/pci/ixgbe/ixgbe_rss.h			1.5
	sysdev/pci/ixgbe/ixgbe_sriov.h			1.4
	sysdev/pci/ixgbe/ixgbe_type.h			1.49
	sysdev/pci/ixgbe/ixgbe_vf.c			1.27
	sysdev/pci/ixgbe/ixgbe_x540.c			1.18-1.19
	sysdev/pci/ixgbe/ixgbe_x540.h			1.9
	sysdev/pci/ixgbe/ixgbe_x550.c			1.19-1.20
	sysdev/pci/ixgbe/ixgbe_x550.h			1.6
	sysdev/pci/files.pci				1.438
	share/man/man4/ixg.4				1.15
	share/man/man4/ixv.4				1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
  Before this commit, resource shortage was easily occurred because
  the total number of the clusters is small.
- Improve performance:
  - Use m_adj(ETHER_ALIGN) more.
  - Sprinkle __predict_false() in the RX path.
  - Don't pre-allocate a cluster for RXCOPY case to improve short
    packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
  DMA buffer. Also, when the buffer is already freed, do not call
  bus_dmamap_unload(9) (no resource leaks with this change). This
  change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
  ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
  on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
  address. At least, this change is required for macppc
  (sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
  panic.
- Save the discard_multidesc state to not to forget the state by
  exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
  packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
  change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.

Revision 1.54.2.6 / (download) - annotate - [select for diffs], Wed Sep 15 16:30:50 2021 UTC (2 years, 7 months ago) by martin
Branch: netbsd-9
Changes since 1.54.2.5: +123 -95 lines
Diff to previous 1.54.2.5 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following (via patch), requested by msaitoh in ticket #1346:

	sys/dev/pci/ixgbe/ixgbe.c			1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.73, 1.76-1.80 via patch
	sys/dev/pci/ixgbe/ix_txrx.c			1.68-1.93
	sys/dev/pci/ixgbe/ixv.c				1.153, 1.157-1.161, 1.163-1.166 via patch
	sys/dev/pci/ixgbe/if_bypass.c			1.7-1.9
	sys/dev/pci/ixgbe/if_fdir.c			1.4-1.5
	sys/dev/pci/ixgbe/if_sriov.c			1.10-1.11
	sys/dev/pci/ixgbe/ixgbe_82598.c			1.16
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.23
	sys/dev/pci/ixgbe/ixgbe_api.c			1.25
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.2
	sys/dev/pci/ixgbe/ixgbe_common.c		1.30-1.33
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.10-1.11
	sys/dev/pci/ixgbe/ixgbe_dcb.h			1.7
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.8-1.9
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.h		1.7
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c		1.8-1.9
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.h		1.7
	sys/dev/pci/ixgbe/ixgbe_fdir.h			1.3
	sys/dev/pci/ixgbe/ixgbe_features.h		1.3
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.12
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.13, 1.16-1.17
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.13-1.14
	sys/dev/pci/ixgbe/ixgbe_netmap.c		1.3-1.4
	sys/dev/pci/ixgbe/ixgbe_netmap.h		1.2
	sys/dev/pci/ixgbe/ixgbe_osdep.c			1.7
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.29-1.30
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.24
	sys/dev/pci/ixgbe/ixgbe_rss.h			1.5
	sys/dev/pci/ixgbe/ixgbe_sriov.h			1.4
	sys/dev/pci/ixgbe/ixgbe_type.h			1.49
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.27
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.18-1.19
	sys/dev/pci/ixgbe/ixgbe_x540.h			1.9
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.19-1.20
	sys/dev/pci/ixgbe/ixgbe_x550.h			1.6
	sys/dev/pci/files.pci				1.438
	share/man/man4/ixg.4				1.15
	share/man/man4/ixv.4				1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
  Before this commit, resource shortage was easily occurred because
  the total number of the clusters is small.
- Improve performance:
  - Use m_adj(ETHER_ALIGN) more.
  - Sprinkle __predict_false() in the RX path.
  - Don't pre-allocate a cluster for RXCOPY case to improve short
    packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
  DMA buffer. Also, when the buffer is already freed, do not call
  bus_dmamap_unload(9) (no resource leaks with this change). This
  change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
  ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
  on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
  address. At least, this change is required for macppc
  (sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
  panic.
- Save the discard_multidesc state to not to forget the state by
  exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
  packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
  change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Sep 8 09:09:47 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.93: +42 -7 lines
Diff to previous 1.93 (colored) to selected 1.34.2.7 (colored)

Reduce bus_dmamap_sync() cost.

 - Don't sync whole descriptor ring but limited counts(rx_process_limit)
   descriptors.
 - Dont' sync every loop.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Sep 8 08:46:28 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.92: +44 -41 lines
Diff to previous 1.92 (colored) to selected 1.34.2.7 (colored)

Don't pre-allocate a cluster not to do m_freem() it on RXCOPY case.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Sep 7 08:17:20 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.91: +7 -5 lines
Diff to previous 1.91 (colored) to selected 1.34.2.7 (colored)

 Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Sep 7 03:48:01 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored) to selected 1.34.2.7 (colored)

 Sprinkle __predict_false() in the RX path.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Sep 3 08:57:58 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.89: +7 -3 lines
Diff to previous 1.89 (colored) to selected 1.34.2.7 (colored)

Save the discard_multidesc state to not to forget the state by exiting rxeof().

Revision 1.89 / (download) - annotate - [select for diffs], Fri Sep 3 08:43:23 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.88: +5 -5 lines
Diff to previous 1.88 (colored) to selected 1.34.2.7 (colored)

 Rename variable. No functional change.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Aug 26 09:03:47 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.87: +5 -5 lines
Diff to previous 1.87 (colored) to selected 1.34.2.7 (colored)

 Remove "j" or "jumbo" because we always use MCLBYTES sized buffer.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Aug 25 09:06:02 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.86: +6 -23 lines
Diff to previous 1.86 (colored) to selected 1.34.2.7 (colored)

 Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.

- Before this commit, resource shortage was easily occurred because the total
  number of the clusters is small.

- Reviewed by knakahara and ryo.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Aug 19 10:18:13 2021 UTC (2 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.85: +46 -18 lines
Diff to previous 1.85 (colored) to selected 1.34.2.7 (colored)

 Use m_adj(ETHER_ALIGN) more. Tested by me (amd64,aarch64) and rin (alpha).

 - Align with ETHER_ALIGN everywhere where mbuf is allocated.
 - Remove extra setting of M_PKTHDR. No functional change.
 - Add comment.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Aug 19 08:53:21 2021 UTC (2 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.84: +4 -5 lines
Diff to previous 1.84 (colored) to selected 1.34.2.7 (colored)

 KNF. No functional change.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Aug 19 04:49:29 2021 UTC (2 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored) to selected 1.34.2.7 (colored)

 Don't use fixed value. No functional change.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Aug 19 04:47:12 2021 UTC (2 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.34.2.7 (colored)

 Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent panic.

 If an mbuf is ETHER_ALIGNed, the packet size may be shorter than MCLBYTES.
For example, if the max frame size is 2048 by changing the interface's MTU,
an mbuf's max length is 2046. So, don't use rx_mbuf_sz for bus_dmamap_sync.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Aug 18 09:17:17 2021 UTC (2 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.81: +12 -14 lines
Diff to previous 1.81 (colored) to selected 1.34.2.7 (colored)

 Refresh unrefreshed descriptors' buffers correctly.

- Update next_to_refresh at least before ixgbe_rx_unrefresed() to detect
  the unrefreshed status correctly in ixgbe_rxeof().
- next_to_refresh points to the previous entry of the first unrefreshed
  descriptor, so fix a loop variable to point to the correct one in
  ixgbe_refresh_mbufs().
- Without the above two fixes, RX ring may have some unrefreshed entries
  which have inconsistent state. On such state, "ifconfig down up" causes
  panic in bus_dmamap_sync() on aarch64.
- Tested on amd64 and aarch64. OK'd by knakahara.

Revision 1.70.2.3 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:30 2021 UTC (2 years, 8 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.70.2.2: +4 -4 lines
Diff to previous 1.70.2.2 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Jul 7 08:58:19 2021 UTC (2 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.34.2.7 (colored)

Add new sysctl "rx_copy_len".

 ixgbe_rxeof() has an optimization "RX_COPY" to reduce costs of
bus_dmamap_load_mbuf() and bus_dmamap_unload() by copying a mbuf cluster's
memory to a newly allocated mbuf's MH_databuf[] and recycle the original map.
The optimization is used when a length of a packet is smaller than a specific
value. The value is calculated based on MHLEN. The size of MHLEN is
architecture specific. It's 256 or 512. Make the threshold controllable by
adding a new sysctl.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Jul 7 08:32:51 2021 UTC (2 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.34.2.7 (colored)

Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().

 ixgbe_setup_receive_ring() fully allocates rx buffers. When a
descriptor ring is full, rxr->next_to_refresh should point to
rxr_next_to_check -1. Before this change, rxr->next_to_refresh
is set to 0 and ixgbe_refresh_mbufs() wastefully loops in
ixgbe_refresh_mbufs() because it means the ring is empty.

Revision 1.70.2.2 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:29 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.70.2.1: +21 -9 lines
Diff to previous 1.70.2.1 (colored) to branchpoint 1.70 (colored) to selected 1.34.2.7 (colored)

Sync w/ HEAD.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Mon May 31 22:15:18 2021 UTC (2 years, 10 months ago) by cjep
Branch: cjep_staticlib_x
Changes since 1.71: +23 -10 lines
Diff to previous 1.71 (colored) next main 1.72 (colored) to selected 1.34.2.7 (colored)

sync with head

Revision 1.79 / (download) - annotate - [select for diffs], Thu May 27 06:11:34 2021 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.78: +3 -2 lines
Diff to previous 1.78 (colored) to selected 1.34.2.7 (colored)

 Do no_jmbuf++ when ixgbe_getjcl() failed in ixgbe_setup_receive_ring(), too.

Revision 1.78 / (download) - annotate - [select for diffs], Thu May 20 22:36:08 2021 UTC (2 years, 10 months ago) by ryo
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored) to selected 1.34.2.7 (colored)

fix little-endian dependence

Revision 1.77 / (download) - annotate - [select for diffs], Thu May 20 10:39:32 2021 UTC (2 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.34.2.7 (colored)

 Use uint64_t instead of bus_addr_t for the TX descriptor's buffer address.
At least, this change is required for macppc (sizeof(bus_addr_t) == 4) to
make TX work.

Revision 1.76 / (download) - annotate - [select for diffs], Thu May 20 01:02:42 2021 UTC (2 years, 11 months ago) by ryo
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) to selected 1.34.2.7 (colored)

Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability on aarch64.

In ixgbe, TX/RX descriptor rings are configured in 16-byte units.
If BUS_DMA_COHERENT is not specified, cpu cache (writeback/invalidate)
operations by bus_dmamap_sync() in aarch64 (arm/arm32/bus_dma.c) are done per
cache line size (usually 64 bytes). As a result, adjacent descriptors conflict
with the DMA operation, resulting in unstable operation.

To avoid this, descriptors area should be mapped as non-cache with BUS_DMA_COHERENT.


thanks to msaitoh@ for his help in debugging.

Revision 1.75 / (download) - annotate - [select for diffs], Tue May 18 05:29:15 2021 UTC (2 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.74: +11 -3 lines
Diff to previous 1.74 (colored) to selected 1.34.2.7 (colored)

- Cleanup an rxbuf entry when bus_dmamap_load_mbuf() failed to prevent panic.
- Print error number when error occurred.

Revision 1.74 / (download) - annotate - [select for diffs], Fri May 14 05:15:17 2021 UTC (2 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.73: +5 -4 lines
Diff to previous 1.73 (colored) to selected 1.34.2.7 (colored)

Keep m_len and m_pkthdr.len consistent to prevent panic on arm.

   Arm's bus_dmamap_load_mbuf() keeps a pointer to the original mbuf
  and bus_dmamap_sync() refers it. ixgbe_rxeof() modified mbuf's m_len
  inconsistently with m_pkthdr and dm_mapsize. "ifconfig down up" made
  panic by referring the inconsistent mbuf length.

Revision 1.73 / (download) - annotate - [select for diffs], Fri May 14 01:30:06 2021 UTC (2 years, 11 months ago) by knakahara
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored) to selected 1.34.2.7 (colored)

Comment out flow director processing in fast path.

ixgbe_xmit() is per-queue fast path.  It should reduce access to
per-device data (adapter->feat_en).

Revision 1.70.2.1 / (download) - annotate - [select for diffs], Thu May 13 00:47:31 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.70: +6 -2 lines
Diff to previous 1.70 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.

Revision 1.72 / (download) - annotate - [select for diffs], Tue May 11 01:30:30 2021 UTC (2 years, 11 months ago) by rin
Branch: MAIN
Changes since 1.71: +4 -3 lines
Diff to previous 1.71 (colored) to selected 1.34.2.7 (colored)

Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change).

Otherwise, MMU fault occurs for some bus_dma(9) implementations.

With this fix, X550-T1 and X540-T1 work fine on alpha (at least
DS10 with PCI-PCIe reverse bridge).

Discussed with msaitoh. Thanks!

Revision 1.71 / (download) - annotate - [select for diffs], Fri Apr 30 06:55:32 2021 UTC (2 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Changes since 1.70: +4 -1 lines
Diff to previous 1.70 (colored) to selected 1.34.2.7 (colored)

 Add missing __KERNEL_RCSID().

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:49 2021 UTC (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.63: +59 -17 lines
Diff to previous 1.63 (colored) next main 1.64 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 21:44:53 2021 UTC (3 years ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.69: +5 -7 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Mar 31 07:53:53 2021 UTC (3 years ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-i2c-spi-conf
Changes since 1.69: +5 -7 lines
Diff to previous 1.69 (colored) to selected 1.34.2.7 (colored)

KNF a bit. No functional change.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Mar 12 01:54:29 2021 UTC (3 years, 1 month ago) by knakahara
Branch: MAIN
Branch point for: thorpej-cfargs
Changes since 1.68: +1 -3 lines
Diff to previous 1.68 (colored) to selected 1.34.2.7 (colored)

Refactor rxr->next_to_check updating.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Mar 12 01:53:36 2021 UTC (3 years, 1 month ago) by knakahara
Branch: MAIN
Changes since 1.67: +1 -3 lines
Diff to previous 1.67 (colored) to selected 1.34.2.7 (colored)

Remove extra unlock/lock processing around if_percpuq_enqueue().

same as if_wm.c:r1.700

Revision 1.24.2.21 / (download) - annotate - [select for diffs], Thu Mar 11 16:04:25 2021 UTC (3 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.24.2.20: +55 -7 lines
Diff to previous 1.24.2.20 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following (all via patch), requested by msaitoh in ticket #1663:

	sys/dev/pci/ixgbe/ixgbe.c			1.259, 1.278-1.279
	sys/dev/pci/ixgbe/ixgbe.h			1.75
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.12
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.24-1.26
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.17
	sys/dev/pci/ixgbe/ixv.c				1.155-1.156
	sys/dev/pci/ixgbe/ix_txrx.c			1.64-67
	sys/dev/pci/files.pci				1.436
	share/man/man4/ixg.4				1.13-1.14
	share/man/man4/ixv.4				1.3, 1.6-1.7

- Fix a problem that the RX path stalled when the mbuf cluster is
  exhausted.
- Modify some parameters to reduce packet dropping. See also the
  manual's OPTIONS section for the detail.
- ixv(4): The max number of queue(pair) is not 7 but 8. Correctly
  reset the hardware.
- Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make
  it more understandable.
- Fix a bug that some advertise speeds can't be set with
  hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error
  message, too.
- Fix typo in comment or debug message.

Revision 1.54.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 16:00:24 2021 UTC (3 years, 1 month ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE
Changes since 1.54.2.4: +55 -7 lines
Diff to previous 1.54.2.4 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following (all via patch) requested by msaitoh in ticket #1231:

	sys/dev/pci/ixgbe/ixgbe.c			1.259, 1.278-1.279
	sys/dev/pci/ixgbe/ixgbe.h			1.75
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.12
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.24-1.26
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.17
	sys/dev/pci/ixgbe/ixv.c				1.155-1.156
	sys/dev/pci/ixgbe/ix_txrx.c			1.64-67
	sys/dev/pci/files.pci				1.436
	share/man/man4/ixg.4				1.13-1.14
	share/man/man4/ixv.4				1.6-1.7

- Fix a problem that the RX path stalled when the mbuf cluster is
  exhausted.
- Modify some parameters to reduce packet dropping. See also the
  manual's OPTIONS section for the detail.
- ixv(4): The max number of queue(pair) is not 7 but 8. Correctly
  reset the hardware.
- Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make
  it more understandable.
- Fix a bug that some advertise speeds can't be set with
  hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error
  message, too.
- Fix typo in comment or debug message.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Mar 9 10:03:18 2021 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.34.2.7 (colored)

Modify some parameters to reduce packet dropping.

 - Background: ixgbe doesn't use common MCLGET() interface and use the
   driver specific cluster allocation mechanism (jcl). The cluster is
   pre-allocated with a fixed number and the current number per queue
   is num_rx_desc * 2 (2048*2=4096). It's too small. It also has a problem
   that the max length of the pcq which is used in the TX path is big
   (4096). Example:

    100M <----- [ixg0                                      ixg1] <----- 1G
                2048 TX descs <--- 4096 pcqs <---- 2048 RX descs

   If a machine forwards a traffic from 1G interface to 100M interface,
   It would require 2048+4096+2048=8192 descriptors, but the current number
   is 2048*2=4096. It's too small. Even if the both interface's link speed
   is the same and only small number of packet is queued in the pcq, 4096
   jcl is small because 2048(RX)+TX(2048)=4096. If jcl is exhausted, not only
   forwarding from ixg1 to ixg0 is dropped, but also another forwarding path
   from ixg1 to another interface(e.g. wm0) is also dropped. Sockets also
   queue packets, so if a lot of sockets are used and/or a socket buffer
   size is changed to bigger one, it'll also become a problem. If the jcl
   is exhausted, evcnt(9) counter "ixgX qY Rx no jumbo mbuf" is incremented.
   Example:
     vmstat -ev | grep ixg1 | grep "no jumbo"
     ixg1 q0 Rx no jumbo mbuf                           0     0 misc
     ixg1 q1 Rx no jumbo mbuf                           0     0 misc
     ixg1 q2 Rx no jumbo mbuf                      141326     0 misc
     ixg1 q3 Rx no jumbo mbuf                           0     0 misc


 - To solve this problem:
   - Add new config parameter IXGBE_JCLNUM_MULTI and set the default to 3
     (2048 * 3). The minimum number is 2. The total number of jcl per queue
     is available with hw.ixgN.num_jcl_per_queue sysctl.
   - Reduce the max length of the pcq() which is used in the TX path from
     4096 to 2048.

 - Reviewed by knakahara@ and ozaki-r@.

 - TODO: Use MCLGET().

Revision 1.66 / (download) - annotate - [select for diffs], Mon Mar 8 07:10:45 2021 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored) to selected 1.34.2.7 (colored)

 Use no_jmbuf evcnt for the failure case of ixgbe_getjcl().

Revision 1.65 / (download) - annotate - [select for diffs], Tue Mar 2 11:10:53 2021 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.64: +41 -7 lines
Diff to previous 1.64 (colored) to selected 1.34.2.7 (colored)

Fix jcl's starvation case in ixgbe_rxeof() again.

 ix_txrx.c rev.1.64 preallocates jcl to prevent starvation but it's not
perfect. Don't use ixgbe_rx_discard() and just update the old descriptor
for reuse. It's also required for multiple descriptors case to refresh
subsequent descriptor(s). Reviewed by knakahara@.

Revision 1.64 / (download) - annotate - [select for diffs], Mon Jan 18 09:09:04 2021 UTC (3 years, 3 months ago) by knakahara
Branch: MAIN
Changes since 1.63: +17 -3 lines
Diff to previous 1.63 (colored) to selected 1.34.2.7 (colored)

Fix ixg(4) Rx interrupt stall when Rx buffers are exhausted.

Current ixgbe_rxeof() implementation calls ixgbe_refresh_mbufs()(and
ixgbe_getjcl()) after ixgbe_rx_input()(and if_percpuq_enqueue()).
And ixg(4) uses its own m_ext structure.  That causes Rx interrupt
stall when Rx buffers are exhausted.  e.g. TCP iperf3 with large
windows size.  Furthermore, Rx descriptor problem has occurred
after stoppping the load.

To fix that problem, ixgbe_rxeof() must call ixgbe_getjcl() before
ixgbe_rx_input(), and must discard the new packet when ixgbe_getjcl()
fails.

By the way, ixg(4) should use MCLGET() instead of own m_ext structure.

ok'ed by msaitoh@n.o, thanks.

Revision 1.24.2.20 / (download) - annotate - [select for diffs], Wed Aug 5 15:58:02 2020 UTC (3 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.19: +5 -5 lines
Diff to previous 1.24.2.19 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1587:

	sys/dev/pci/ixgbe/ix_txrx.c			1.62-1.63 via patch
	sys/dev/pci/ixgbe/ixgbe.c			1.225, 1.228-1.229,
							1.232 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.64, 1.66
	sys/dev/pci/ixgbe/ixv.c				1.146, 1.148-1.150
							via patch
	sys/dev/pci/ixgbe/ixgbe_common.c		1.27
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.23
	sys/dev/pci/ixgbe/ixgbe_82598.c			1.15
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.18
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.14
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.21
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
  was only on X550.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
  ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
  No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.

Revision 1.54.2.4 / (download) - annotate - [select for diffs], Fri Jul 10 11:35:51 2020 UTC (3 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE
Changes since 1.54.2.3: +5 -5 lines
Diff to previous 1.54.2.3 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions, requested by msaitoh in ticket #997:

	sys/dev/pci/ixgbe/ix_txrx.c			1.62-1.63 via patch
	sys/dev/pci/ixgbe/ixgbe.c			1.225, 1.228-1.229,
							1.232 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.64, 1.66
	sys/dev/pci/ixgbe/ixv.c				1.146, 1.148-1.150
	sys/dev/pci/ixgbe/ixgbe_common.c		1.27
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.23
	sys/dev/pci/ixgbe/ixgbe_82598.c			1.15
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.18
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.14
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.21
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
  was only on X550*.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
  ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
  No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.

Revision 1.48.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:37 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.48.2.3: +3 -3 lines
Diff to previous 1.48.2.3 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.62.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:07 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.63 / (download) - annotate - [select for diffs], Fri Apr 17 02:21:25 2020 UTC (4 years ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Branch point for: thorpej-futex
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) to selected 1.34.2.7 (colored)

No functional change:
 - modify comment
 - whitespace fix

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:46 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.48.2.2: +23 -49 lines
Diff to previous 1.48.2.2 (colored) to branchpoint 1.48 (colored) to selected 1.34.2.7 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:11 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.48.2.1: +33 -9 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored) to selected 1.34.2.7 (colored)

Merge changes from current as of 20200406

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:14 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.58.2.1: +7 -8 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored) to selected 1.34.2.7 (colored)

Sync with head.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Feb 5 07:45:46 2020 UTC (4 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored) to selected 1.34.2.7 (colored)

No functional change:

 - Add debug printf()s.
 - Remove unused macros.
 - Remove extra newline.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jan 30 14:02:14 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +6 -7 lines
Diff to previous 1.60 (colored) to selected 1.34.2.7 (colored)

Adopt <net/if_stats.h>.

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Sun Jan 26 11:03:17 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.54.2.2: +27 -2 lines
Diff to previous 1.54.2.2 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up the following (via patch), requested by msaitoh in ticket #648

	sys/dev/pci/ixgbe/if_bypass.c		1.5
	sys/dev/pci/ixgbe/ixgbe_osdep.c		1.5
	sys/dev/pci/ixgbe/ix_txrx.c		1.58-1.60
	sys/dev/pci/ixgbe/ixgbe.c		1.220-1.221
	sys/dev/pci/ixgbe/ixgbe.h		1.60-1.2
	sys/dev/pci/ixgbe/ixgbe_api.c		1.24
	sys/dev/pci/ixgbe/ixgbe_common.c	1.26
	sys/dev/pci/ixgbe/ixgbe_netbsd.c	1.11-1.12
	sys/dev/pci/ixgbe/ixgbe_osdep.h		1.24
	sys/dev/pci/ixgbe/ixgbe_phy.c		1.19
	sys/dev/pci/ixgbe/ixgbe_82598.c		1.14
	sys/dev/pci/ixgbe/ixv.c			1.142,1.144

- Free RX structure correctly when detaching.
- Remove unused code.
- Fix some typos in comment.
- Remove extra spaces.
- KNF.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:49 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.58: +26 -1 lines
Diff to previous 1.58 (colored) to selected 1.34.2.7 (colored)

Sync with head.

Revision 1.24.2.19 / (download) - annotate - [select for diffs], Fri Jan 24 18:37:31 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.24.2.18: +27 -2 lines
Diff to previous 1.24.2.18 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following, requested by msaitoh in ticket #1490:

	sys/dev/pci/ixgbe/if_bypass.c		1.5
	sys/dev/pci/ixgbe/ixgbe_osdep.c		1.5
	sys/dev/pci/ixgbe/ix_txrx.c		1.58-1.60
	sys/dev/pci/ixgbe/ixgbe.c		1.195,1.220-1.221 via patch
	sys/dev/pci/ixgbe/ixgbe.h		1.60-1.2
	sys/dev/pci/ixgbe/ixgbe_api.c		1.24
	sys/dev/pci/ixgbe/ixgbe_common.c	1.26
	sys/dev/pci/ixgbe/ixgbe_netbsd.c	1.11-1.12
	sys/dev/pci/ixgbe/ixgbe_osdep.h		1.24
	sys/dev/pci/ixgbe/ixgbe_phy.c		1.19
	sys/dev/pci/ixgbe/ixgbe_82598.c		1.14
	sys/dev/pci/ixgbe/ixv.c			1.122,1.142,1.144 via patch

- Use unsigned to avoid undefined behavior in
  ix{gbe,v}_[un]register_vlan().
- Free RX structure correctly when detaching.
- Remove unused code.
- Remove extra spaces.
- Fix some typos in comment.
- KNF.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jan 21 14:55:55 2020 UTC (4 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.59: +22 -1 lines
Diff to previous 1.59 (colored) to selected 1.34.2.7 (colored)

 Fix the freeing code for some error paths. Found and tested by Patrick Welche.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jan 20 07:19:04 2020 UTC (4 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored) to selected 1.34.2.7 (colored)

 Free jumbo mem structure correctly. Found by yamaguchi@ using with LOCKDEBUG.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Dec 16 02:50:54 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored) to selected 1.34.2.7 (colored)

No functional change:

 - Remove unused code.
 - Remove extra spaces.
 - KNF.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Nov 10 21:16:36 2019 UTC (4 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.56: +8 -38 lines
Diff to previous 1.56 (colored) to selected 1.34.2.7 (colored)

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

Revision 1.24.2.18 / (download) - annotate - [select for diffs], Sun Nov 10 13:36:29 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.17: +5 -2 lines
Diff to previous 1.24.2.17 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1431):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.56

Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Fri Nov 1 09:34:27 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RC1
Changes since 1.54.2.1: +5 -2 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #387):

	sys/net/if_gre.c: revision 1.176
	sys/net/if_l2tp.c: revision 1.40
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.56
	sys/net/if_tap.c: revision 1.114

Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Oct 16 06:36:00 2019 UTC (4 years, 6 months ago) by knakahara
Branch: MAIN
Changes since 1.55: +5 -2 lines
Diff to previous 1.55 (colored) to selected 1.34.2.7 (colored)

Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Thu Sep 5 09:11:03 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
Changes since 1.54: +4 -2 lines
Diff to previous 1.54 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #180):

	sys/dev/pci/ixgbe/ixv.c: revision 1.130
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.207
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.208
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.55
	sys/dev/pci/ixgbe/ixv.c: revision 1.129
	sys/dev/pci/ixgbe/ixgbe_netbsd.c: revision 1.10

 printf -> device_printf

 Set IFM_1000_BX10 correctly.

 Use aprint_*() in the attach function.

Revision 1.24.2.17 / (download) - annotate - [select for diffs], Thu Sep 5 09:06:07 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.16: +4 -2 lines
Diff to previous 1.24.2.16 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Apply patch, requested by msaitoh in ticket #1367, to pull up the following
revisions:

	sys/dev/pci/ixgbe/ixgbe_x550.c                  1.16
	sys/dev/pci/ixgbe/ixgbe.c                       1.180,1.203-1.204,
							1.207-1.208 via patch
	sys/dev/pci/ixgbe/ix_txrx.c                     1.55
	sys/dev/pci/ixgbe/ixgbe_netbsd.c                1.10
	sys/dev/pci/ixgbe/ixgbe_common.c                1.25
	sys/dev/pci/ixgbe/ixv.c                         1.129-1.130

- X550EM supports QSFP, so check ixgbe_media_type_fiber_qsfp too.
- An interrupt might not arrive when a module is inserted. When an link
  status change interrupt occurred and the driver still regard SFP as
  unplugged, issue the module softint before issuing LSC softint.
- Add 10000BASE-LX media if it's 1000BASE-BX.
- printf -> device_printf
- Avoid undefined behavior of VLAN filter setting.
- Simplify code.
- Fix typo in unused code.
- Fix typo in comment. Found by Wataru Ashihara.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Sep 4 07:29:34 2019 UTC (4 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.54: +4 -2 lines
Diff to previous 1.54 (colored) to selected 1.34.2.7 (colored)

 printf -> device_printf

Revision 1.24.2.16 / (download) - annotate - [select for diffs], Mon Jul 22 17:53:35 2019 UTC (4 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.15: +10 -11 lines
Diff to previous 1.24.2.15 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up the following revisions (via patch), requested by msaitoh in
ticket #1301:

	sys/dev/pci/ixgbe/if_sriov.c			1.5-1.6
	sys/dev/pci/ixgbe/ix_txrx.c			1.53-1.54
	sys/dev/pci/ixgbe/ixgbe_x550.h			1.5
	sys/dev/pci/ixgbe/ixgbe.c			1.169-1.170,1.176,1.179,1.181,1.185-1.186,1.188-1.192 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.53,1.55
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.21
	sys/dev/pci/ixgbe/ixgbe_api.c			1.22-1.23
	sys/dev/pci/ixgbe/ixgbe_api.h			1.14-1.15
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.14-1.15
	sys/dev/pci/ixgbe/ixgbe_common.c		1.23
	sys/dev/pci/ixgbe/ixgbe_common.h		1.14
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.11
	sys/dev/pci/ixgbe/ixgbe_mbx.h			1.14
	sys/dev/pci/ixgbe/ixgbe_netmap.c		1.2
	sys/dev/pci/ixgbe/ixgbe_features.h		1.2
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.9
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.9-1.10
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.18
	sys/dev/pci/ixgbe/ixgbe_type.h			1.37,1.39-1.40
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.18
	sys/dev/pci/ixgbe/ixv.c				1.112-1.114,1.117,1.119 via patch

Sync ixgbe up to 20190717 except ETHERCAP or ixv's VLAN stuff:
- Add firmware recovery mode for X550, X550A(Xeon D) and X550EM(C3000).
- Remove IXGBE_DEV_ID_82599_LS(0x154f) support again.
- On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of
  ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em()
  has extra check (e.g. exclude 1G copper).
- It's not required to calculate unused queues' statistics.
- Remove ETHERCAP_VLAN_HWFILTER's definition.
- Match 82598_BX(0x1508), 82599_KR(0x1517), 82599_SFP_EM(0x1507),
  X550EM_X_XFI(0x15b0), X550EM_A_QSFP(0x15ca) and
  X550EM_A_QSFP_N(0x15cc)
- Add missing XFI support into ixgbe_get_link_capabilities_X550em().
- Other than IXGBE_VF_RESET should wait ACK, so use
  ixgbevf_write_msg_read_ack() instead of write_posted() in
  ixgbe_update_mc_addr_list_vf().
- When ixv_check_link() failed in the watchdog function, reset the
  interface.
- Remove RXCSUM register modification in
  ixv_initialize_receive_units(). It seems it's not required.
- Remove some debug printf in ixv_print_debug_info().
- Calculate vector's bit location correctly when the vector >= 31
  in ixgbe_allocate_msix().
- Fix hung queue check when the queue number >= 31.
- On ENETRESET case, not continue and quit the ifflags_cb() function
  because if_init() will do the same thing.
- Fix bugs in unused code.
- Fix typo in comment.
- Fix typo in unused code.
- Whitespace fixes. KNF.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jul 4 08:56:35 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored) to selected 1.34.2.7 (colored)

 Fix hung queue check when the queue number >= 31.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jun 27 05:55:40 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.52: +9 -10 lines
Diff to previous 1.52 (colored) to selected 1.34.2.7 (colored)

Sync with FreeBSD ix-3.3.8 part 1. No functional change in this part:
 - Move ixgbe_toggle_txdctl() to ixgbe_common.c and modify a bit.
   No functional change because this function is currently used for SR-IOV
   and it's not used in NetBSD.
 - Some modification to match the latest netmap API.
 - Modify ixgbe_hic_unlocked(). No functional change because neither
   IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD(0x38) nor
   IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD(0x31) are used.
 - Add ixgbe_clear_mbx(). No functional change because this function is not
   used yet.
 - Add some not-yet-used register definitions.
 - Whitespace fixes.

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:28 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.48: +20 -19 lines
Diff to previous 1.48 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.24.2.15 / (download) - annotate - [select for diffs], Fri Mar 1 17:33:24 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.24.2.14: +3 -3 lines
Diff to previous 1.24.2.14 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1199):

	sys/dev/pci/ixgbe/ixv.c: revision 1.109
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.54
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.52
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.174

  Fix a bug that if_link_state_change(ifp, LINK_STATE_DOWN) isn't called unless
link goes up at least one time. Without this change, never linkup-ed media
keeps LINK_STATE_UNKNOWN instead of LINK_STATE_DOWN.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Feb 22 06:49:15 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored) to selected 1.34.2.7 (colored)

 Fix a bug that if_link_state_change(ifp, LINK_STATE_DOWN) isn't called unless
link goes up at least one time. Without this change, never linkup-ed media
keeps LINK_STATE_UNKNOWN instead of LINK_STATE_DOWN.

Revision 1.34.2.11 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:01 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.34.2.10: +2 -2 lines
Diff to previous 1.34.2.10 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.24.2.14 / (download) - annotate - [select for diffs], Thu Dec 20 11:34:33 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.13: +2 -2 lines
Diff to previous 1.24.2.13 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #1141):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.51

Apply the same fix as if_wm.c:r1.606 to ixg(4). Pointed out by msaitoh@n.o, thanks.

XXX pullup-8

Revision 1.51 / (download) - annotate - [select for diffs], Thu Dec 20 09:47:15 2018 UTC (5 years, 4 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.34.2.7 (colored)

Apply the same fix as if_wm.c:r1.606 to ixg(4). Pointed out by msaitoh@n.o, thanks.

XXX pullup-8

Revision 1.34.2.10 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:51 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.9: +4 -5 lines
Diff to previous 1.34.2.9 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Ssync with HEAD

Revision 1.24.2.13 / (download) - annotate - [select for diffs], Fri Sep 7 12:37:20 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.12: +4 -5 lines
Diff to previous 1.24.2.12 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1014):

	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.50

  Fix a bug that ixgbe_mq_start(an if_transmit function) returned wrong
value on error. pcq_put returns false on error, so returning it to caller
indicated no error.

XXX pullup-8

Revision 1.50 / (download) - annotate - [select for diffs], Thu Sep 6 08:20:12 2018 UTC (5 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.49: +4 -5 lines
Diff to previous 1.49 (colored) to selected 1.34.2.7 (colored)

 Fix a bug that ixgbe_mq_start(an if_transmit function) returned wrong
vaue on error. pcq_put returns false on error, so returning it to caller
indicated no error.

XXX pullup-8

Revision 1.34.2.9 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:02 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.8: +14 -12 lines
Diff to previous 1.34.2.8 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.24.2.12 / (download) - annotate - [select for diffs], Tue Aug 7 13:33:23 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.24.2.11: +14 -12 lines
Diff to previous 1.24.2.11 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #961):

	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.13
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.51
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.36
	sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.23
	sys/dev/pci/ixgbe/ixgbe_netbsd.c: revision 1.8
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.163
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.49

  Add force_10_100_autonego sysctl. The default value is 0(false).

This sysctl is only for 550EM_a with PHY firmware for a while.

  Make jcl allocation per queue to reduce mutex spin. Tested by me and
knakahara.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jul 31 09:19:34 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0906, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.48: +14 -12 lines
Diff to previous 1.48 (colored) to selected 1.34.2.7 (colored)

 Make jcl allocation per queue to reduce mutex spin. Tested by me and
knakahara.

Revision 1.34.2.8 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:56 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.7: +3 -3 lines
Diff to previous 1.34.2.7 (colored) to branchpoint 1.34 (colored)

Sync with HEAD

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:01 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728
Branch point for: phil-wifi
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.34.2.7 (colored)

 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

Revision 1.34.2.7 / (download) - annotate - [selected], Mon Jun 25 07:26:01 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.6: +8 -4 lines
Diff to previous 1.34.2.6 (colored) to branchpoint 1.34 (colored)

Sync with HEAD

Revision 1.24.2.11 / (download) - annotate - [select for diffs], Sat Jun 9 14:59:43 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.24.2.10: +28 -25 lines
Diff to previous 1.24.2.10 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #864):

	sys/dev/pci/ixgbe/ix_txrx.c			1.40-1.47 (patch)
	sys/dev/pci/ixgbe/ixgbe.c			1.148,1.149,1.151,
							1.152,1.154,
							1.155,1.157-1.160 (patch)
	sys/dev/pci/ixgbe/ixgbe.h			1.43,1.44,1.46,1.49 (patch)
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.7 (patch)
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.8 (patch)
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.22 (patch)
	sys/dev/pci/ixgbe/ixv.c				1.100-1.104 (patch)
	sys/dev/pci/ixgbe/ixv.c				1.94,1.95,1.99 (patch)

 Remove unused structure entries. No functional change.
 -
 Remove unused IXGBE_FC_HI and IXGBE_FC_LO. The watermark of the flow control
is automatically calculated from the size of the packet buffer.
 -
 Use ixgbe_eitr_write() when writing the EITR for the link interrupt like
queue's EITR to write the register safely. This change is not relatively
so important than queue's EITR because link's EITR is written in if_init().
 -
 Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

 One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

 Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

 I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
 -
Count some register correctly:
- QPRDC register is only for 82599 and newer.
- Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT].
 The TQSMR register is not for receiving but for transmitting, so move the
initialization from ixgbe_initialize_receive_units() to
ixgbe_initialize_transmit_units(). No functional change.
 -
 Whitespace fix. No functional change.
 -
 Add rxd_nxck (Receive Descriptor next to check) read only sysctl.
 Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor
with DD bit is worse than just processing the entry. And it's also racy to
check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING,
it would be better to do it in the upper layer.
 Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922).
 Add "bool txr_no_space" for TX descriptor shortage. Use it like IFF_OACTIVE.
 Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without this,
interrupt mask state and EIMS may mismatch and if_init doesn't recover
from TX/RX stall problem.
 This change itself doesn't fix PR#53294.
 -
 Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some registers
to console.
 -
Constify several variables in ixgbe/ so that they land in .rodata (1038
bytes).
 -
 Don't call ixgbe_rearm_queues() in ixgbe_local_timer1().
   ixgbe_enable_queue() and ixgbe_disable_queue() try to enable/disable queue
  interrupt safely. It has the internal counter. When a queue's MSI-X is
  received, ixgbe_msix_que() is called (IPL_NET). This function disable the
  queue's interrupt by ixgbe_disable_queue() and issues an softint.
  ixgbe_handle() queue is called by the softint (IPL_SOFTNET), process TX, RX
  and call ixgbe_enable_queue() at the end.

   ixgbe_local_timer1() is a callout and run always on CPU 0 (IPL_SOFTCLOCK).
  When ixgbe_rearm_queues() called, an MSI-X interrupt is issued for a specific
  queue. It may not CPU 0. If this interrupt's ixgbe_msix_que() is called and
  sofint_schedule() is called before the last sofint's softint_execute() is not
  called, the softint_schedule() fails because of SOFTINT_PENDING. It result
  in breaking ixgbe_{enable,disable}_queue()'s internal counter.
   ixgbe_local_timer1() is written not to call ixgbe_rearm_queues() if
  the interrupt is disabled, but it's called because of unknown bug or a race.

  One solution to avoid this problem is to not to use the internal counter,
  but it's little difficult. Another solution is stop using
  ixgbe_rearm_queues() at all. Essentially, ixgbe_rearm_queues() is not
  required (it was added in ixgbe.c rev. 1.43 (2016/12/01)).
  ixgbe_rearm_queues() helps for lost interrupt problem but I've never seen it
  other than ixgbe_rearm_queues() problem.

XXX pullup-8.

Revision 1.47 / (download) - annotate - [select for diffs], Wed May 23 10:11:07 2018 UTC (5 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.46: +8 -2 lines
Diff to previous 1.46 (colored) to selected 1.34.2.7 (colored)

 Add "bool txr_no_space" for TX descriptor shortage. Use it like IFF_OACTIVE.

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 23 04:45:24 2018 UTC (5 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (colored) to selected 1.34.2.7 (colored)

 Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor
with DD bit is worse than just processing the entry. And it's also racy to
check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING,
it would be better to do it in the upper layer.

 Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922).

Revision 1.34.2.6 / (download) - annotate - [select for diffs], Mon May 21 04:36:12 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.5: +19 -15 lines
Diff to previous 1.34.2.5 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 18 10:09:02 2018 UTC (5 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.44: +25 -17 lines
Diff to previous 1.44 (colored) to selected 1.34.2.7 (colored)

 Revert new watchdog timer commits. The new watchdog timer made stability
worse than before. It seems unknown problems exists.

http://mail-index.netbsd.org/source-changes/2018/05/08/msg095020.html
http://mail-index.netbsd.org/source-changes/2018/05/16/msg095240.html

Revision 1.44 / (download) - annotate - [select for diffs], Wed May 16 08:08:24 2018 UTC (5 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.43: +20 -15 lines
Diff to previous 1.43 (colored) to selected 1.34.2.7 (colored)

 Whitespace fix. No functional change.

Revision 1.43 / (download) - annotate - [select for diffs], Wed May 16 07:51:17 2018 UTC (5 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.42: +4 -1 lines
Diff to previous 1.42 (colored) to selected 1.34.2.7 (colored)

 Fix a problem that the watchdog timer sometimes mistakenly fires. Restore
TX sending check in the end of ixgbe_txeof which was wrongly removed in
ix_txrx.c rev. 1.42.

Revision 1.42 / (download) - annotate - [select for diffs], Tue May 8 09:45:54 2018 UTC (5 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.41: +14 -26 lines
Diff to previous 1.41 (colored) to selected 1.34.2.7 (colored)

- Fix broken watchdog timer. This change detects TX device timeout correctly.
  NOTE: It's supporsed not to be called {ixgbe,ixv}_rearm_queues() in the
  timer. Those are not required if any chip have no bug. In reality,
  ixgbe_rearm_queues() is required on 82599 and newer chip AND other than
  queue 0 to prevent device timeout. When it occured, packet was sent but the
  descriptor's DD bit wasn't set even though IXGBE_TXD_CMD_EOP and
  IXGBE_TXD_CMD_RS were set. After forcing interrupt by writing EICS register
  in ixgbe_rearm_queues(), DD is set. Why? Is this an undocumented errata? It
  might be possible not call rearm_queues on 82598 or queue 0, we call in any
  cases in case the problem occurs. On ixv(4), I have not seen this problem yet
  (though I tested only on X550_X(Xeon D 12xx)'s virtual function), but we
  do rearm in case TX device timeout happen.
- ixv(4): Call callout_stop() earlier in ixv_stop() like ixgbe_stop().
- KNF.

Revision 1.34.2.5 / (download) - annotate - [select for diffs], Wed May 2 07:20:11 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.4: +2 -2 lines
Diff to previous 1.34.2.4 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Synch with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Wed Apr 25 08:46:19 2018 UTC (5 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0502
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored) to selected 1.34.2.7 (colored)

 Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

 One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

 Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

 I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.

Revision 1.34.2.4 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:26 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.3: +2 -7 lines
Diff to previous 1.34.2.3 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 17 08:38:05 2018 UTC (6 years ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0422
Changes since 1.39: +2 -7 lines
Diff to previous 1.39 (colored) to selected 1.34.2.7 (colored)

 Remove unused structure entries. No functional change.

Revision 1.24.2.10 / (download) - annotate - [select for diffs], Sat Apr 14 10:25:11 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.24.2.9: +2 -2 lines
Diff to previous 1.24.2.9 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #750):

	sys/dev/pci/ixgbe/ixgbe_x540.h: revision 1.8
	sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.11
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: revision 1.6
	sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.12
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: revision 1.7
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.h: revision 1.6
	sys/dev/pci/ixgbe/ixgbe_fdir.h: revision 1.2
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.h: revision 1.6
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.6
	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.18
	sys/dev/pci/ixgbe/if_sriov.c: revision 1.3
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.7
	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.19
	sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.7
	sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.19
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.16
	sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.8
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.17
	sys/dev/pci/ixgbe/ixgbe_dcb.h: revision 1.6
	sys/dev/pci/ixgbe/if_bypass.c: revision 1.4
	sys/dev/pci/ixgbe/ixv.c: revision 1.91
	sys/dev/pci/ixgbe/ixgbe_rss.h: revision 1.4
	sys/dev/pci/ixgbe/ixv.c: revision 1.92
	sys/dev/pci/ixgbe/ixv.c: revision 1.93
	sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.4
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.12
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.12
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.33
	sys/dev/pci/ixgbe/if_fdir.c: revision 1.2
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.34
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.39
	sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.20
	sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.3
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.21
	sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.21
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.22
	sys/dev/pci/ixgbe/ixgbe_82599.h: revision 1.7
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.144
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.145
	sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.16
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.146
	sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.17
	sys/dev/pci/ixgbe/ixgbe_82598.h: revision 1.8
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.41
	sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.10
	sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.14
	sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.15
	sys/dev/pci/ixgbe/ixgbe_phy.h: revision 1.11

Sync with the remaining part of FreeBSD r328265 except sfp_reinit stuff:
 - Always schedule module intterrupt in ixgbe_config_link() when a device is
   SFP+ based.
 - Use not loop index but txr->me in ixv_initialize_{transmit,receive}_units().
   It's required for VMDQ but NetBSD doesn't use it, so it's not a bug in
   NetBSD.
 - Simplify ixgbe_bp_wd_set(). No functional change.
 - Whitespace.

Sync with FreeBSD r331224 except ixv_if_update_admin_status()'s change:
 - Fix length of reading buffer when the command is Read Flash in
   ixgbe_host_interface_command().
 - Add missing start_hw() call in ixv_init_locked(). This is not a real bug
   because start_hw just set hw->adapter_stopped to false and anyone refer it.
 - Style change.
 - Update comment.

Read sc_if_flags after taking core lock. Same as if_wm.c rev. 1.418.

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:18 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.2: +59 -6 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.24.2.9 / (download) - annotate - [select for diffs], Wed Apr 4 16:18:49 2018 UTC (6 years ago) by martin
Branch: netbsd-8
Changes since 1.24.2.8: +60 -7 lines
Diff to previous 1.24.2.8 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #690):
	sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.17
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.138
	sys/dev/pci/ixgbe/ixv.c: revision 1.90
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.139
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.19
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.11
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.38
	sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.12
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.39
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.10
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.11
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.37
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.38
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.140
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.20
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.141
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.142
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.143
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.40
	sys/dev/pci/ixgbe/ixgbe_x550.h: revision 1.4

Fix the problem between eitr and link_speed.

In ixgbe_msix_que(), que->eitr_setting is limited to IXGBE_MIN_RSC_EITR_10G1G
when link_speed is 1Gbps or 10Gbps. However, que->eitr_setting is set to EITR
register in the *next* Tx/Rx interrupt. If link_speed changes from 100Mbps to
1Gbps ro 10Gbps, que->eitr_setting which is not limited can be set to EITR
register, that is, the problem fixed by ixgbe.c:r1.124 can occur in this case.

To fix this case, que->eitr_setting should be clear when link_speed is changed
or link state is changed.

Furthermore, expand the variants used for AIM (txr->bytes, txr->packets,
rxr->bytes and rxr->packets) from u32 to u64 to avoid wraparound which causes
que->eitr_setting calculation mistake.
XXX pullup-8

Don't write EIMC directly. It is required to manage with struct ix_queue status.
XXX pullup-8

-  Add missing IFM_NONE support. If a interface support linkdown,
  "ifconfig ixgN media none" drpos link.  Not all interface can do link down.
 Tested:
        82598 AT2 (T)
        92599 SF+(SFI) (X520-DA2)
        X540
        X550-T1
        X550EM_x (X10SDV-8C-TLN4F)
        X550EM_a (A2SDi-H-TP4F port 0, 1 (T))
 Doesn't work:
        X550EM_a (A2SDi-H-TP4F port 2, 3 (SFP+ (KR)))
        X550EM_a (MA10-ST0 port 2, 3 (SFP+ (SFI)))
        (Denverton SFP+ can't force link down because SFP+'s TX_DISABLE pin is
        pull down. Is there a way to shutdown SFP+ cage's power?)
 Not tested:
        82598 fiber.
- Change some functions static.

Avoid issues caused by sending old packets at next link-up time.

This modification consists by the following two parts.
    - drain packets in if_snd queue or corresponding txr->txr_interq
      when link_active == false in ifp->if_start(), ifp->if_transmit(),
      and deferred Tx processing
    - drain packets in if_snd queue and all of txr->txr_interq's
      at link-down time
ok by msaitoh@n.o.

 Fix long standing bug that 82598 SFP+ panics in ixgbe_handle_mod() because
hw->mac.ops.setup_sfp is NULL. This change is a part of FreeBSD r327031.

Fix a bug that "ifconfig ixgN down up" forgot IFM_NONE setting.
 - Don't assume autoneg == 0 is the first call of ixgbe_config_link().
   Check ifm_media, too.
 - Don't override autoneg_advertised in ixgbe_get_phy_id_fw() to not to
   be inconsistent with if_media value.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Apr 4 08:13:07 2018 UTC (6 years ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0415, pgoyette-compat-0407
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored) to selected 1.34.2.7 (colored)

Sync with the remaining part of FreeBSD r328265 except sfp_reinit stuff:
 - Always schedule module intterrupt in ixgbe_config_link() when a device is
   SFP+ based.
 - Use not loop index but txr->me in ixv_initialize_{transmit,receive}_units().
   It's required for VMDQ but NetBSD doesn't use it, so it's not a bug in
   NetBSD.
 - Simplify ixgbe_bp_wd_set(). No functional change.
 - Whitespace.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 2 05:02:55 2018 UTC (6 years ago) by knakahara
Branch: MAIN
Changes since 1.37: +58 -5 lines
Diff to previous 1.37 (colored) to selected 1.34.2.7 (colored)

Avoid issues caused by sending old packets at next link-up time.

This modification consists by the following two parts.
    - drain packets in if_snd queue or corresponding txr->txr_interq
      when link_active == false in ifp->if_start(), ifp->if_transmit(),
      and deferred Tx processing
    - drain packets in if_snd queue and all of txr->txr_interq's
      at link-down time

ok by msaitoh@n.o.

Revision 1.24.2.8 / (download) - annotate - [select for diffs], Fri Mar 30 12:07:34 2018 UTC (6 years ago) by martin
Branch: netbsd-8
Changes since 1.24.2.7: +17 -17 lines
Diff to previous 1.24.2.7 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #673):

	sys/dev/pci/ixgbe/if_sriov.c: revision 1.2
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.135
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.136
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.137
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.17
	sys/dev/pci/ixgbe/if_bypass.c: revision 1.3
	sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.18
	sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.10
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.36
	sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.3
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.37
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.36
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.32
	sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.12
	sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.2
	sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.20
	sys/dev/pci/ixgbe/ixv.c: revision 1.88
	sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.15
	sys/dev/pci/ixgbe/ixv.c: revision 1.89
	sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.13
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.8
	sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.9

Add some changes from ix-3.2.17.tar.gz and r328265. Not fully synchronized.

Some others (e.g. sfp cage interrupt and bypass adapter  stuff) will be merged
later:

- Initialize firmware command buffer correctly in ixgbe_read_ee_hostif_X550()
  and ixgbe_read_ee_hostif_buffer_X550(). These functions are used when reading
  NVM.
- Fix a bug that ixgbe_mng_present() misunderstand management capability on
  X550 and newer on some environment. X550 changed FWSM bit definition.
  See X540 document and X550's document and compare them.
- Fix checksum calculation in ixgbe_set_fw_drv_ver_generic(). This function is
  not used in NetBSD.
- Add some unused funtions.
- Whitespace fix.
- Check offset correctly in ixgbe_get_oem_prod_version(). Note that this
  function is not used.
- Set PHY correctly in ixgbe_setup_mac_link_sfp_x550a() if a device is a
  C3000 KR SFP+.

Fix race about writing adapter->link_active for ixg(4).
adapter->link_active is updated by ixgbe_update_link_status() only.

The function is called from the following four functions.
    - ixgbe_media_status()
    - ixgbe_local_timer1()
    - ixgbe_stop()
    - ixgbe_handle_link()

The functions other than ixgbe_handle_link() call ixgbe_update_link_status()
with holding IXGBE_CORE_LOCK, however ixgbe_handle_link() calls it without
holding IXGBE_CORE_LOCK. That can cause race. So, add IXGBE_CORE_LOCK to
ixgbe_handle_link().

Tested by msaitoh@n.o and me.

Fix race about writing adapter->link_active for ixv(4).
adapter->link_active is updated by ixv_update_link_status() only.

The function is called from the following two functions.
    - ixv_media_status()
    - ixv_handle_link()

ixv_media_status() calls ixv_update_link_status() with holding
IXGBE_CORE_LOCK, however ixv_handle_link() calls it without
holding IXGBE_CORE_LOCK, the same as ixg(4).

ok by msaitoh@n.o.

- Add link related softint's counter.
- Fix indent.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Fri Mar 30 06:20:15 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34.2.1: +3 -3 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored) to selected 1.34.2.7 (colored)

Resolve conflicts between branch and HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Fri Mar 30 03:58:20 2018 UTC (6 years ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-0330
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored) to selected 1.34.2.7 (colored)

Don't write EIMC directly. It is required to manage with struct ix_queue status.

XXX pullup-8

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:05 2018 UTC (6 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.34: +24 -24 lines
Diff to previous 1.34 (colored) to selected 1.34.2.7 (colored)

Synch with HEAD

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 15 06:48:51 2018 UTC (6 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0322, pgoyette-compat-0315
Changes since 1.35: +17 -17 lines
Diff to previous 1.35 (colored) to selected 1.34.2.7 (colored)

 Add some changes from ix-3.2.17.tar.gz and r328265. Not fully synchronized.
Some others (e.g. sfp cage interrupt and bypass adapter  stuff) will be merged
later:
- Initialize firmware command buffer correctly in ixgbe_read_ee_hostif_X550()
  and ixgbe_read_ee_hostif_buffer_X550(). These functions are used when reading
  NVM.
- Fix a bug that ixgbe_mng_present() misunderstand management capability on
  X550 and newer on some environment. X550 changed FWSM bit definition.
  See X540 document and X550's document and compare them.
- Fix checksum calculation in ixgbe_set_fw_drv_ver_generic(). This function is
  not used in NetBSD.
- Add some unused funtions.
- Whitespace fix.

Revision 1.24.2.7 / (download) - annotate - [select for diffs], Tue Mar 13 14:59:06 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.24.2.6: +8 -8 lines
Diff to previous 1.24.2.6 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #626):
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.134
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.35
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.35
	sys/dev/pci/ixgbe/ixv.c: revision 1.87
  Make some event counters MP safe. Now all of the event counters are
MP safe.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Mar 9 06:27:53 2018 UTC (6 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.34: +8 -8 lines
Diff to previous 1.34 (colored) to selected 1.34.2.7 (colored)

 Make some event counters MP safe. Now all of the event counters are
MP safe.

Revision 1.24.2.6 / (download) - annotate - [select for diffs], Tue Mar 6 11:12:40 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.24.2.5: +41 -4 lines
Diff to previous 1.24.2.5 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #605):
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.32
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.33
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.34
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.128
	sys/dev/pci/ixgbe/ixv.c: revision 1.83
	sys/dev/pci/ixgbe/ixv.c: revision 1.84

Add hw.ixvM.q[01].{interrupt_rate,[tr]xd_head,[tr]xd_tail} sysctls as ixg(4).

ixg(4) supports workqueue poll mode, but not enabled by default yet. (that is, the default behavior is *not* changed)

At the time of high load near the wire rate, the turnaround time
of update/delete processing such as "ifconfig ixg0 inet XXX" or
"ifconfig ixg0 delete" is very long. The main reason is CPU
starvation caused by ixg(4)'s softint poll mode. ixg(4) uses
workqueue poll mode instead of softint poll mode, so that this
problem will be fix.

This change may cause performance issues, so it is not enabled
by default yet. Although there are that issues, if you want to use
workqueue poll mode, do "sysctl -w hw.ixgXX.txrx_workqueue=1" while
there is no traffic on the ixgXX.

ok by msaitoh@n.o.

ixv(4) also supports workqueue poll mode, but not enabled by default yet, either.
ok by msaitoh@n.o.

Move the location of "struct work" as FreeBSD's "struct task" in ixgbe.h.
No functional change.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Mar 2 10:19:20 2018 UTC (6 years, 1 month ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.33: +41 -4 lines
Diff to previous 1.33 (colored) to selected 1.34.2.7 (colored)

ixg(4) supports workqueue poll mode, but not enabled by default yet. (that is, the default behavior is *not* changed)

At the time of high load near the wire rate, the turnaround time
of update/delete processing such as "ifconfig ixg0 inet XXX" or
"ifconfig ixg0 delete" is very long. The main reason is CPU
starvation caused by ixg(4)'s softint poll mode. ixg(4) uses
workqueue poll mode instead of softint poll mode, so that this
problem will be fix.

This change may cause performance issues, so it is not enabled
by default yet. Although there are that issues, if you want to use
workqueue poll mode, do "sysctl -w hw.ixgXX.txrx_workqueue=1" while
there is no traffic on the ixgXX.

ok by msaitoh@n.o.

Revision 1.24.2.5 / (download) - annotate - [select for diffs], Thu Mar 1 19:02:15 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.24.2.4: +4 -1 lines
Diff to previous 1.24.2.4 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #597):
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.31
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.33
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.127
	sys/dev/pci/ixgbe/ixv.c: revision 1.82
Fix poll mode assumption breaking.
ixgbe_{enable,disable}_intr() forcibly enable/disable all interrupts
regardless of current state. That can break poll mode assumption,
that is, queue interrupts must not occur while polling Tx/Rx rings.
E.g. "ifconfig ixg0 delete && ifconfig ixg0 192.168.0.1" on heavy
load traffic can causes this issue.
This fix may have 1% or 2% performance impact at short packets.
XXX
ixgbe_rearm_queues() which is called only via watchdog can also break
this poll mode assumption because writing EICS casues interrupts
immediately when interrupt auto mask enabled.
We will fix it with other issues about watchdog later.
ok by msaitoh@n.o.
Apply ixgbe.c:r1.127 to ixv.c. Pointed out by msaitoh@n.o.

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Mon Feb 26 13:55:54 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.24.2.3: +6 -5 lines
Diff to previous 1.24.2.3 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #592):
	sys/dev/pci/ixgbe/ixv.c: revision 1.79
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.30
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.31
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.32
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.31
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.120
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.121
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.123
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.124
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.125
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.126
	sys/dev/pci/ixgbe/ixv.c: revision 1.80
	sys/dev/pci/ixgbe/ixv.c: revision 1.81
 CID-1427719: Integer handling issues  (BAD_SHIFT). Print bus/slot info
correctly on 82599_SFP_SF_QP(DID 0x154a) and 82599_QSFP_SF_QP(DID 0x1558).
 Fix a bug that RX may stall on heavy load on ixg(4). ixgbe_rxeof() has loop
limit and the function returns true if a packet are still in the RX ring.
ixgbe_handle_que() didn't check the return value. Check the return vaule
and issue a softint.
 This bug is derived from FreeBSD and ixv(4) has no this bug.
XXX pullup-8
 Fix a bug that the first call of ifflags_cb() causes linkdown. The first
call of ix(gbe|v)_ifflags_cb() refered uninitialized adapter->if_flags.
adapter->if_flags should be initialized in the end of xxx_init().
XXX pullup-[678] (ixgbe)
XXX pullup-8 (ixv)
- Fix a bug that RX may stall on heavy load on ixg(4) derived from FreeBSD's
 AIM (Auto Interrupt Moderation) bug.
 When I use a machine as a NFS client, sometimes one of queue pairs doesn't
 get any interrupt other than every second tick via ixgbe_local_timer1().
 When the problem occured, the queue pair's hw.ixgM.qN.interrupt_rate is
 always 500000. When this problem occuring, set hw.ixgM.qN.interrupt_rate lower
 than 166667 recover from stall. i.e.:
  sysctl -w hw.ixgM.qN.interrupt_rate=166667 (don't revocer)
  sysctl -w hw.ixgM.qN.interrupt_rate=166666 (recover)
  Relatios between the interrupt_rate and EICR's ITR_INTERVAL field is as
 follows:
 int_rate | EICR[11:0]   | interval in us | recover |
          |(ITR_INTERVAL)| (10G and 1G)   |         |
 ---------+--------------+----------------+---------+
   500000 | 0x008(0)     |              2 |     not |
   166667 | 0x010(1)     |              4 |     not |
   166666 | 0x018(2)     |              6 | recover |
  The reason why int_rate becomes 500000 is that xgbe_tx_eof() doesn't
 increment rxr->packets(*1). Even if we fix rxr->packets' bug, interrupt_rate
 might become greater than 166666 and it might cause stall.
  While reading datasheets, knakahara noticed a section titled with "ITR
 Affect on RSC Functionality". It says "When RSC is enabled on specific RX
 queues, the associated ITR interval with these queus must be enabled and must
 be larger (in time uints) than RSC delay". Currently, RSC_DELAY field in the
 GPIE register is 0 and it means 4us for 10G and 1G. The greater ITR_INTERVAL
 value of 4us is 6us == 166666. Yes, BINGO!
  This description is noted in 82599 and newer datasheets and not in 82598
 datasheet. I don't know if 82598 has this limitation but, I apply this
 limitation all of chips.
 (*1) Note that this bug is going to be fixed in the next commit to distinct
 between two different bugs.
- The bitfield of EITR register is different between 82598 and others.
 Only ixgbe_msix_que() taken care of it. Make new function ixgbe_eitr_write()
 and use it in all of functions which modify ITR_INTERVAL.
XXX pullup-8
 Increment rxr->packets correctly in ixgbe_rxeof() to calculate ITR value
of AIM (Auto Interrupt Moderation) correctly. See also ixgbe.c rev. 1.124.
XXX pullup-8
Improve a comment about reading EICS register defined write-only by spec.
It seems that is workaround for silicon errata.
ok by msaitoh@n.o.
- Apply ixgbe.c rev. 1.124 to ixv.c. Fix a bug that RX may stall on heavy load
 on ixv(4) derived from FreeBSD's AIM (Auto Interrupt Moderation) bug.
 ITR_INTERVAL value must be larger than 4us.
- The bitfield of EITR register is different between 82598 and others.
 ixv.c had a bug that it accessed 82598's way even though only 82599 and
 newer support virtual function. Fix it using with new ixv_eitr_write()
 function.
 Fix a potential bug that TX/RX might stall when TX rate limit reached.
This change is almost the same as the RX rate limit bug fix in ixgbe.c
rev. 1.121. I've never got any stall, but this must be a bug.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Feb 26 04:19:00 2018 UTC (6 years, 1 month ago) by knakahara
Branch: MAIN
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored) to selected 1.34.2.7 (colored)

Fix poll mode assumption breaking.

ixgbe_{enable,disable}_intr() forcibly enable/disable all interrupts
regardless of current state. That can break poll mode assumption,
that is, queue interrupts must not occur while polling Tx/Rx rings.

E.g. "ifconfig ixg0 delete && ifconfig ixg0 192.168.0.1" on heavy
load traffic can causes this issue.

This fix may have 1% or 2% performance impact at short packets.

XXX
ixgbe_rearm_queues() which is called only via watchdog can also break
this poll mode assumption because writing EICS casues interrupts
immediately when interrupt auto mask enabled.
We will fix it with other issues about watchdog later.

ok by msaitoh@n.o.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Feb 22 10:02:08 2018 UTC (6 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.31: +5 -5 lines
Diff to previous 1.31 (colored) to selected 1.34.2.7 (colored)

 Fix a potential bug that TX/RX might stall when TX rate limit reached.
This change is almost the same as the RX rate limit bug fix in ixgbe.c
rev. 1.121. I've never got any stall, but this must be a bug.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Feb 20 07:30:57 2018 UTC (6 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored) to selected 1.34.2.7 (colored)

 Increment rxr->packets correctly in ixgbe_rxeof() to calculate ITR value
of AIM (Auto Interrupt Moderation) correctly. See also ixgbe.c rev. 1.124.

XXX pullup-8

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Thu Dec 21 19:28:54 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.24.2.2: +664 -750 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #441):
	sys/dev/pci/files.pci: 1.390
	sys/dev/pci/ixgbe/if_bypass.c: new
	sys/dev/pci/ixgbe/if_fdir.c: new
	sys/dev/pci/ixgbe/if_sriov.c: new
	sys/dev/pci/ixgbe/ixgbe_bypass.h: new
	sys/dev/pci/ixgbe/ixgbe_fdir.h: new
	sys/dev/pci/ixgbe/ixgbe_features.h: new
	sys/dev/pci/ixgbe/ixgbe_netmap.c: new
	sys/dev/pci/ixgbe/ixgbe_netmap.h: new
	sys/dev/pci/ixgbe/ixgbe_rss.h: new
	sys/dev/pci/ixgbe/ixgbe_sriov.h: new
	sys/dev/pci/ixgbe/ix_txrx.c: 1.28, 1.30 via patch
	sys/dev/pci/ixgbe/ixgbe.c: 1.97-1.105, 1.107-1.111, 1.113-1.115
	sys/dev/pci/ixgbe/ixgbe.h: 1.26-1.29 via patch
	sys/dev/pci/ixgbe/ixv.c: 1.57-1.58, 1.60-1.61, 1.63-1.64, 1.66-1.72, 1.75 via patch
	sys/dev/pci/ixgbe/ixgbe_api.c: 1.17-1.18 via patch
	sys/dev/pci/ixgbe/ixgbe_type.h: 1.26-1.30 via patch
	sys/dev/pci/ixgbe/ixgbe_82598.c: 1.9-1.10 via patch
	sys/dev/pci/ixgbe/ixgbe_82598.h: 1.6-1.7
	sys/dev/pci/ixgbe/ixgbe_82599.c: 1.15-1.16 via patch
	sys/dev/pci/ixgbe/ixgbe_82599.h: 1.5-1.6
	sys/dev/pci/ixgbe/ixgbe_api.h: 1.10-1.11 via patch
	sys/dev/pci/ixgbe/ixgbe_common.c: 1.14-1.16 via patch
	sys/dev/pci/ixgbe/ixgbe_common.h: 1.8-1.9 via patch
	sys/dev/pci/ixgbe/ixgbe_dcb.c: 1.5-1.6
	sys/dev/pci/ixgbe/ixgbe_dcb.h: 1.4-1.5
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: 1.4-1.5
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.h: 1.4-1.5
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: 1.4-1.5
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.h: 1.4-1.5
	sys/dev/pci/ixgbe/ixgbe_mbx.c: 1.7-1.9 via patch
	sys/dev/pci/ixgbe/ixgbe_mbx.h: 1.11-1.12 via patch
	sys/dev/pci/ixgbe/ixgbe_osdep.c: 1.2
	sys/dev/pci/ixgbe/ixgbe_osdep.h: 1.18-1.19 via patch
	sys/dev/pci/ixgbe/ixgbe_phy.c: 1.12-1.14 via patch
	sys/dev/pci/ixgbe/ixgbe_phy.h: 1.9-1.10 via patch
	sys/dev/pci/ixgbe/ixgbe_vf.c: 1.13-1.15 via patch
	sys/dev/pci/ixgbe/ixgbe_vf.h: 1.9-1.11 via patch
	sys/dev/pci/ixgbe/ixgbe_x540.c: 1.10-1.12
	sys/dev/pci/ixgbe/ixgbe_x540.h: 1.6-1.7
	sys/dev/pci/ixgbe/ixgbe_x550.c: 1.6-1.7
	sys/dev/pci/ixgbe/ixgbe_x550.h: 1.3
Sync with FreeBSD's up to r326022, fix bugs and some improvements:
- Don't limit number of queue pair to 8. Take chip's max TX queues and
  max RX queues into account.
- Add C3000 (Denverton) support.
- Add bypass function support for bypass adapters.
- Change EEE sysctl.
- Remove thermal test sysctl.
- ixv(4): set RSS mapping.
- ixv(4): Add TSOv6.
- ixv(4): Fix hardware counter.
- ixv(4): Make TX/RX descriptors size the same as ixg(4).
- ixv(4): Print device name in ixv_attach().
- ixv(4): Make mailbox statistic counters evcnt(9).
- ixv(4): Fix a problem that mailbox interrupt never occurred.
- ixv(4): Don't check neither VTEICR nor VTEICS same as Linux. It
  seems that both registers can't be used to check which MSI-X vector
  is triggered.
- ixv(4): Print Mailbox API version.
- Print driver feature capabilities and enable bits when verbose boot.
- Fix a bug that X550EM_A (Denverton) can't force 10BaseT.
- Remove all half-duplex setting because of the chip specification.
- Add 2.5GBASE-T and 5GBASE-T support.
- Set ifm_baudrate correctly.
- Protect ec_multi* with mutex like other MP safe Ethernet drivers.
- On X550 and newer, print NVM Image Version with %u.%02x.
- On X540, print PHY FW Revision with %u.%x. 0x4030 will be printed
  as "Revision 4.3 ID 0x0"
- Fix value check of OEM_NVM_IMAGE_VER.
- Print PHY ID only for copper PHY.
- Fix a bug that X550 and newer didn't linkup if it forces
  100BaseTX-FDX or 10BaseT-FDX.
- Fix a bug that RX may accesses freed area. It also fixes a problem
  that if_init() takes long time on many core machine.
- Check ETHERCAP_VLAN_HWTAGGING in ixgbe_setup_vlan_hw_support(). This
  change has no influence to netbsd because it's enabled by default
  and NetBSD has no API to disable it.
- Whitespace fix.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Dec 4 09:29:42 2017 UTC (6 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.29: +11 -15 lines
Diff to previous 1.29 (colored) to selected 1.34.2.7 (colored)

- Fixes two problem:
  1) RX may accesses freed area.
  2) if_init() takes long time on many core machine.
  Call ixgbe_jcl_reinit() not in ixgbe_setup_receive_ring() but in the
  biginning of ixgbe_setup_receive_structures(). It was OK for pre multiqueue,
  but it's not OK now because we support multiqueue.
- Fix comment of ixgbe_free_receive_ring().

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:29 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.29.2.1: +2283 -0 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.34.2.7 (colored)

update from HEAD

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Tue Oct 24 08:38:59 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.24.2.1: +7 -16 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by knakahara in ticket #302):
	sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31
	sys/arch/x86/pci/if_vmx.c: 1.20
	sys/dev/ic/i82557.c: 1.148
	sys/dev/ic/rtl8169.c: 1.152
	sys/dev/pci/cxgb/cxgb_sge.c: 1.5
	sys/dev/pci/if_age.c: 1.51
	sys/dev/pci/if_alc.c: 1.25
	sys/dev/pci/if_ale.c: 1.23
	sys/dev/pci/if_bge.c: 1.311
	sys/dev/pci/if_bge.c: 1.312
	sys/dev/pci/if_bnx.c: 1.62
	sys/dev/pci/if_jme.c: 1.32
	sys/dev/pci/if_nfe.c: 1.64
	sys/dev/pci/if_sip.c: 1.167
	sys/dev/pci/if_stge.c: 1.63-1.64
	sys/dev/pci/if_ti.c: 1.102
	sys/dev/pci/if_txp.c: 1.48
	sys/dev/pci/if_vge.c: 1.61
	sys/dev/pci/if_wm.c: 1.538
	sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch
	sys/net/agr/if_agrether_hash.c: 1.4
	sys/net/if_ether.h: 1.67-1.68
	sys/net/if_ethersubr.c: 1.244
	sys/net/if_vlan.c: 1.100
	sys/net80211/ieee80211_input.c: 1.89
	sys/net80211/ieee80211_output.c: 1.59
	sys/sys/mbuf.h: 1.171
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.
I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html
--
only get vtag when we have vtag like the other drivers.
--
- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag
--
- add a constant for the vlan mask.
- enforce that we have a tag before we get it.
only get vtag when we have vtag like the other drivers.
like if_bge.c:1.312 and if_stge.c:1.64.
fixed by s-yamaguchi@IIJ, thanks.

Revision 1.29.2.1, Tue Sep 26 07:42:06 2017 UTC (6 years, 6 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.29: +0 -2283 lines
FILE REMOVED

file ix_txrx.c was added on branch tls-maxphys on 2017-12-03 11:37:29 +0000

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 26 07:42:06 2017 UTC (6 years, 6 months ago) by knakahara
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Branch point for: tls-maxphys
Changes since 1.28: +7 -16 lines
Diff to previous 1.28 (colored) to selected 1.34.2.7 (colored)

VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.

I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html

XXX need pullup to -8 branch

Revision 1.28 / (download) - annotate - [select for diffs], Wed Aug 30 08:49:18 2017 UTC (6 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.27: +664 -746 lines
Diff to previous 1.27 (colored) to selected 1.34.2.7 (colored)

- Sync with FreeBSD r320688 (and up to r322865):
  - Add C3000(Denvertion(-NS)) support.
  - Add bypass function support for bypass adapters. Sysctls are provided.
    Not tested because I have no any bypass adapter.
  - ixv(4): set RSS mapping.
  - Change EEE sysctl.
  - ixv(4): Add TSOv6.
  - ixv(4): Mailbox API 1.2 and more are implemented and comment says it
    negotiate with 1.2 but it really does 1.1...
  - Remove thermal test sysctl.
  - Fix unknown bugs.
- Print driver feature capabilities and enable bits when verbose boot.

Revision 1.10.2.4 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:25 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.10.2.3: +50 -52 lines
Diff to previous 1.10.2.3 (colored) next main 1.11 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Sat Aug 5 03:49:35 2017 UTC (6 years, 8 months ago) by snj
Branch: netbsd-8
Changes since 1.24: +16 -26 lines
Diff to previous 1.24 (colored) to selected 1.34.2.7 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #175):
	sys/dev/pci/ixgbe/ix_txrx.c: 1.25-1.27
	sys/dev/pci/ixgbe/ixgbe.c: 1.91-1.95
	sys/dev/pci/ixgbe/ixgbe_type.h: 1.23-1.25
	sys/dev/pci/ixgbe/ixgbe_api.c: 1.16
sync ixg(4) up to ixgbe.c rev. 1.95:
- Increase total number of RX buffers on multiqueue.
- Fix the partial chain check in ixgbe_rx_discard(). This bug was
  added in ixgbe.c rev. 1.33.
- Fix a double free in ixgbe_rxeof().
- Print verbose output in ixgbe_update_link_status() correctly on 5Gbps
  and 2.5Gbps (NBASE-T) for X550T[12] and newer.
- Change hw.ixgN.ts to hw.ixgN.thermal_test. Same as FreeBSD.
- Fix a bug that ifconfig ixgN media 1000baseT and 10Gbase-T advertised
  additional unwanted speeds.
- Print PHY ID.
- Remove unused variable.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jun 13 09:37:22 2017 UTC (6 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.26: +13 -24 lines
Diff to previous 1.26 (colored) to selected 1.34.2.7 (colored)

Sync with FreeBSD r316541:

 > Fix a double free in ixgbe_rxeof()
 >
 > Submitted by:	rstone
 > MFC after:	1 week
 > Differential Revision:	https://reviews.freebsd.org/D10255

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jun 13 09:35:12 2017 UTC (6 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.34.2.7 (colored)

 Fix the partial chain check in ixgbe_rx_discard(). This bug was addded in
rev. 1.33.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jun 9 03:19:55 2017 UTC (6 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored) to selected 1.34.2.7 (colored)

 Increase total number of RX buffers on multiqueue.

Revision 1.22.4.2 / (download) - annotate - [select for diffs], Fri May 19 00:22:57 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.22.4.1: +1 -2 lines
Diff to previous 1.22.4.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored) to selected 1.34.2.7 (colored)

Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 18 08:25:37 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored) to selected 1.34.2.7 (colored)

 Fix a bug that number of input packet counted twice. This bug was added
since sys/net/if.c rev.1.368.
http://mail-index.netbsd.org/source-changes/2016/12/15/msg079882.html

Revision 1.22.4.1 / (download) - annotate - [select for diffs], Thu May 11 02:58:39 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.22: +9 -1 lines
Diff to previous 1.22 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Mon May 8 10:00:41 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base2
Changes since 1.22: +9 -1 lines
Diff to previous 1.22 (colored) to selected 1.34.2.7 (colored)

 Fix a bug that if_obytes and if_omcasts aren't counted. This bug was added
in ixgbe.c rev. 1.27 by me. Reported by Uwe Toenjes.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:52 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.14: +65 -83 lines
Diff to previous 1.14 (colored) next main 1.15 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.14.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:37 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.14.2.2: +65 -83 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 2 05:35:01 2017 UTC (7 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.21: +23 -18 lines
Diff to previous 1.21 (colored) to selected 1.34.2.7 (colored)

 Fix a problem that m_defrag() isn't called in if_transmit path. Now both
if_start and if_transmit do m_defrag() correctly. This change improves the
performance of TSO.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 2 04:33:56 2017 UTC (7 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.20: +3 -4 lines
Diff to previous 1.20 (colored) to selected 1.34.2.7 (colored)

 Fix a bug that TSO doesn't work correctly. This bug was added in
ix_txrx.c rev. 1.17.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 13 10:13:54 2017 UTC (7 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.19: +3 -6 lines
Diff to previous 1.19 (colored) to selected 1.34.2.7 (colored)

Use percpuq.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Feb 10 06:35:22 2017 UTC (7 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.34.2.7 (colored)

- Both mbuf_defrag_failed and m_defrag_failed existed. Remove m_defrag_failed.
- rx_irq, dropped_pkts, morerx, moretx and txloops counters are uncounted, so
  remove them.
- Count handleq in ixv_handle_que().
- Detach event counters correctly.
- Set some per-queue event names correctly.

Revision 1.10.2.3 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:45 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.10.2.2: +56 -72 lines
Diff to previous 1.10.2.2 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.18 / (download) - annotate - [select for diffs], Wed Feb 1 10:47:13 2017 UTC (7 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.17: +29 -58 lines
Diff to previous 1.17 (colored) to selected 1.34.2.7 (colored)

 TX multiqueue. If you want to disable it, enable IXGBE_LEGACY_TX
in ixgbe_netbsd.h

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jan 30 05:02:43 2017 UTC (7 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.16: +9 -3 lines
Diff to previous 1.16 (colored) to selected 1.34.2.7 (colored)

- Count tso_err again. It was accidentally removed in ixgbe.c rev. 1.28.
- ixgbe.h: Sort entries to reduce diff against FreeBSD.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 19 06:56:33 2017 UTC (7 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored) to selected 1.34.2.7 (colored)

 Reduce diff against FreeBSD. No functional change.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 18 08:15:22 2017 UTC (7 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.14: +5 -1 lines
Diff to previous 1.14 (colored) to selected 1.34.2.7 (colored)

 Call ixgbe_free_transmit_buffers instead of ixgbe_free_transmit_structures()
in ixgbe_allocate_transmit_buffers()...

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:40 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.14.2.1: +2395 -0 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.14.2.1, Thu Jan 5 05:53:23 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.14: +0 -2395 lines
FILE REMOVED

file ix_txrx.c was added on branch pgoyette-localcount on 2017-01-07 08:56:40 +0000

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 5 05:53:23 2017 UTC (7 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored) to selected 1.34.2.7 (colored)

 Fix INIT_DEBUGOUT() messages.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Dec 16 08:24:40 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.12: +6 -1 lines
Diff to previous 1.12 (colored) to selected 1.34.2.7 (colored)

 The rx_bytes event counter is cleared when if_init() is called, but not for
rx_packets. It's inconsistent. It makes rx_packets is bigger than rx_bytes.
IMHO, it's not required to clear them. At least the above comment says
"/* Setup our descriptor indices */". It's not descriptor indice...

Revision 1.12 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.11: +1 -3 lines
Diff to previous 1.11 (colored) to selected 1.34.2.7 (colored)

Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 14 10:46:12 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.10: +5 -1 lines
Diff to previous 1.10 (colored) to selected 1.34.2.7 (colored)

Fix ip[46]csum-tx doesn't work other than TCP and UDP.

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:16 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.10.2.1: +2392 -0 lines
Diff to previous 1.10.2.1 (colored) to selected 1.34.2.7 (colored)

Sync with HEAD

Revision 1.10.2.1, Mon Dec 5 08:50:29 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.10: +0 -2388 lines
FILE REMOVED

file ix_txrx.c was added on branch nick-nhusb on 2016-12-05 10:55:16 +0000

Revision 1.10 / (download) - annotate - [select for diffs], Mon Dec 5 08:50:29 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Branch point for: nick-nhusb
Changes since 1.9: +5 -9 lines
Diff to previous 1.9 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r303890:
- Configure ixgbe phy & gbic power.
  Setup phy and gbic power as per Linux 4.3.13 driver.
  This fixes link not detected on X540-AT2 after booting to Linux which
  turns the phy power off on detach. (FreeBSD r295093)
- Fixup DA cable detection routine. (FreeBSD r303032)
- Some minor changes

Revision 1.9 / (download) - annotate - [select for diffs], Fri Dec 2 12:14:37 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.8: +6 -2 lines
Diff to previous 1.8 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r294578:
- Fixup SFP module insertion on the 82599 when insertion happens after
  the system is booted and running. Add PHY detection logic to
  ixgbe_handle_mod() and add locking to ixgbe_handle_msf() as well.
  FreeBSD r293334.
- Fix ix advertise value after media change. When ifconfig sets media then the
  values displayed by the advertise_speed value are invalidated.
  Fix this by setting the bits correctly including setting advertise to 0 for
  media = auto. FreeBSD r294578.
- Some others (e.g. LRO(not used by NetBSD)).

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 2 10:42:04 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.7: +72 -81 lines
Diff to previous 1.7 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r292674:
- Add X552 SFP+ and X550T single port.
- Bug fixes.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 2 10:34:23 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.6: +3 -7 lines
Diff to previous 1.6 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r289238:
- Add support for sysctl knobs to live tune the per interrupt rx/tx packet
  processing limits in ixgbe(4)
- Some others (netmap, etc.)

Revision 1.6 / (download) - annotate - [select for diffs], Fri Dec 2 10:24:31 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.5: +55 -45 lines
Diff to previous 1.5 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r285590:
- Fix igxbe SRIOV VF (if_ixv) initialization bugs.  The MAC address for
  an if_ixv instance can now set at creation time, and the receive ring
  tail pointer is correctly initialized (previously, things still worked
  because the receive ring tail pointer was being fixed up as a side
  effect of other activity).

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 2 10:21:43 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.4: +26 -11 lines
Diff to previous 1.4 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r283881:
- SRIOV support (not enabled because NetBSD doesn't support it).

Revision 1.4 / (download) - annotate - [select for diffs], Thu Dec 1 06:56:28 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.3: +45 -24 lines
Diff to previous 1.3 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r282299:
- Add support for X55x.
- ADD EEE support (not tested).
- Add WOL support (not tested).
- Add suspend/resume support (not testd).
- Add LPLU support (not tested).
- Add DMA Coalescing (note verified).
- Not tested well for sysctls.
- Fix ixgbe_set_advertise() a bit. At least, FreeBSD r294578 is required
  to work hw.ixg0.advertise_speed sysctl correctly.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Dec 1 06:27:18 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.2: +119 -45 lines
Diff to previous 1.2 (colored) to selected 1.34.2.7 (colored)

Update ixg(4) and ixv(4) up to FreeBSD r280197:
- Add support for 82599_QSFP_SF_QP and X540T1.
- Add partial support for X55x. It's required to sync with FreeBSD r282299
  to support X55x.
- Bugfixes.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 30 05:30:28 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.1: +1 -10 lines
Diff to previous 1.1 (colored) to selected 1.34.2.7 (colored)

 Extra "buf->map = NULL;"s in ixgbe_txeof() were removed in FreeBSD r282299.
This was fixed in NetBSD's ixgbe.c rev. 1.28. Remove our comment.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Nov 28 02:23:33 2016 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN
Diff to selected 1.34.2.7 (colored)

 FreeBSD r280182 made new file ix_txrx.c and moved ixgbe.c and ixv's common
code into it. Before sync with whole of them, just move ixgbe.c and ixv.c's
common code into ix_txrx.c from ixgbe.c. In this commit, only ixgbe.c is split
into the device dependent part and the common part. ixv.c isn't change to make
this commit no functional change. To use ixv.c with ix_txrx.c, it's required
to modify the common part's API and functions themselves.

 This commit is done to make the next change easy to understand.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>