The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.161 / (download) - annotate - [select for diffs], Wed Jun 6 20:02:31 2018 UTC (2 weeks, 4 days ago) by kamil
Branch: MAIN
CVS Tags: HEAD
Changes since 1.160: +5 -1 lines
Diff to previous 1.160 (colored)

Comment out unused functions in order to fix Clang build

ixv_rearm_queues() and ixgbe_rearm_queues() are unused.

Sponsored by <The NetBSD Foundation>

Revision 1.160 / (download) - annotate - [select for diffs], Mon Jun 4 02:42:23 2018 UTC (3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.159: +4 -2 lines
Diff to previous 1.159 (colored)

 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.159 / (download) - annotate - [select for diffs], Sun Jun 3 10:24:24 2018 UTC (3 weeks, 1 day ago) by maxv
Branch: MAIN
Changes since 1.158: +7 -7 lines
Diff to previous 1.158 (colored)

Constify several variables in ixgbe/ so that they land in .rodata (1038
bytes).

Revision 1.158 / (download) - annotate - [select for diffs], Wed May 30 09:17:17 2018 UTC (3 weeks, 5 days ago) by msaitoh
Branch: MAIN
Changes since 1.157: +117 -1 lines
Diff to previous 1.157 (colored)

 Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some registers
to console.

Revision 1.157 / (download) - annotate - [select for diffs], Wed May 30 08:35:26 2018 UTC (3 weeks, 5 days ago) by msaitoh
Branch: MAIN
Changes since 1.156: +4 -1 lines
Diff to previous 1.156 (colored)

 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.

Revision 1.156 / (download) - annotate - [select for diffs], Fri May 25 04:40:27 2018 UTC (4 weeks, 3 days ago) by ozaki-r
Branch: MAIN
Changes since 1.155: +3 -2 lines
Diff to previous 1.155 (colored)

Ensure to call if_register after interface initializations finish

Revision 1.155 / (download) - annotate - [select for diffs], Wed May 23 10:11:07 2018 UTC (4 weeks, 5 days ago) by msaitoh
Branch: MAIN
Changes since 1.154: +3 -1 lines
Diff to previous 1.154 (colored)

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

Revision 1.154 / (download) - annotate - [select for diffs], Wed May 23 04:37:13 2018 UTC (4 weeks, 5 days ago) by msaitoh
Branch: MAIN
Changes since 1.153: +31 -1 lines
Diff to previous 1.153 (colored)

 Add rxd_nxck (Receive Descriptor next to check) read only sysctl.

Revision 1.153 / (download) - annotate - [select for diffs], Fri May 18 10:09:02 2018 UTC (5 weeks, 3 days ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.152: +54 -92 lines
Diff to previous 1.152 (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.152 / (download) - annotate - [select for diffs], Tue May 15 09:30:56 2018 UTC (5 weeks, 6 days ago) by msaitoh
Branch: MAIN
Changes since 1.151: +18 -16 lines
Diff to previous 1.151 (colored)

 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.

Revision 1.151 / (download) - annotate - [select for diffs], Thu May 10 03:15:28 2018 UTC (6 weeks, 4 days ago) by msaitoh
Branch: MAIN
Changes since 1.150: +44 -12 lines
Diff to previous 1.150 (colored)

Count some register correctly:
- QPRDC register is only for 82599 and newer.
- Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT].

Revision 1.150 / (download) - annotate - [select for diffs], Tue May 8 09:45:54 2018 UTC (6 weeks, 6 days ago) by msaitoh
Branch: MAIN
Changes since 1.149: +92 -54 lines
Diff to previous 1.149 (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.149 / (download) - annotate - [select for diffs], Thu Apr 19 07:40:12 2018 UTC (2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0502, pgoyette-compat-0422
Changes since 1.148: +8 -9 lines
Diff to previous 1.148 (colored)

 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().

Revision 1.148 / (download) - annotate - [select for diffs], Tue Apr 17 08:38:05 2018 UTC (2 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.147: +1 -2 lines
Diff to previous 1.147 (colored)

 Remove unused structure entries. No functional change.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Apr 17 05:23:58 2018 UTC (2 months, 1 week ago) by knakahara
Branch: MAIN
Changes since 1.146: +23 -2 lines
Diff to previous 1.146 (colored)

Fix panic when "sysctl -w hw.ixg0.txrx_workqueue=[01]" while there is traffic.

The operation is not supported, however causing panic is problem.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Apr 12 08:03:55 2018 UTC (2 months, 1 week ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0415
Changes since 1.145: +3 -2 lines
Diff to previous 1.145 (colored)

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

Revision 1.145 / (download) - annotate - [select for diffs], Wed Apr 4 08:59:22 2018 UTC (2 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0407
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

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.

Revision 1.144 / (download) - annotate - [select for diffs], Wed Apr 4 08:13:07 2018 UTC (2 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.143: +33 -36 lines
Diff to previous 1.143 (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.143 / (download) - annotate - [select for diffs], Wed Apr 4 06:30:09 2018 UTC (2 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.142: +10 -2 lines
Diff to previous 1.142 (colored)

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.142 / (download) - annotate - [select for diffs], Mon Apr 2 10:51:35 2018 UTC (2 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.141: +6 -2 lines
Diff to previous 1.141 (colored)

 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.

Revision 1.141 / (download) - annotate - [select for diffs], Mon Apr 2 05:02:55 2018 UTC (2 months, 3 weeks ago) by knakahara
Branch: MAIN
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (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.140 / (download) - annotate - [select for diffs], Fri Mar 30 06:44:30 2018 UTC (2 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.139: +5 -1 lines
Diff to previous 1.139 (colored)

-  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.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Mar 30 03:58:20 2018 UTC (2 months, 3 weeks ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-0330
Changes since 1.138: +52 -17 lines
Diff to previous 1.138 (colored)

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

XXX pullup-8

Revision 1.138 / (download) - annotate - [select for diffs], Fri Mar 30 03:56:38 2018 UTC (2 months, 3 weeks ago) by knakahara
Branch: MAIN
Changes since 1.137: +16 -1 lines
Diff to previous 1.137 (colored)

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

Revision 1.137 / (download) - annotate - [select for diffs], Mon Mar 26 06:40:28 2018 UTC (3 months ago) by msaitoh
Branch: MAIN
Changes since 1.136: +22 -3 lines
Diff to previous 1.136 (colored)

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

Revision 1.136 / (download) - annotate - [select for diffs], Tue Mar 20 09:46:25 2018 UTC (3 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-0322
Changes since 1.135: +7 -1 lines
Diff to previous 1.135 (colored)

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.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Mar 15 06:48:51 2018 UTC (3 months, 1 week ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0315
Changes since 1.134: +11 -16 lines
Diff to previous 1.134 (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.134 / (download) - annotate - [select for diffs], Fri Mar 9 06:27:53 2018 UTC (3 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.133: +39 -4 lines
Diff to previous 1.133 (colored)

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

Revision 1.133 / (download) - annotate - [select for diffs], Thu Mar 8 02:41:27 2018 UTC (3 months, 2 weeks ago) by knakahara
Branch: MAIN
Changes since 1.132: +36 -45 lines
Diff to previous 1.132 (colored)

Reduce duplicated code which schedule deferred packet processing. No functional change.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Mar 8 02:39:42 2018 UTC (3 months, 2 weeks ago) by knakahara
Branch: MAIN
Changes since 1.131: +11 -2 lines
Diff to previous 1.131 (colored)

Fix INTx/MSI handler did not schedule workqueue. Pointed out by msaitoh@n.o.

Revision 1.131 / (download) - annotate - [select for diffs], Wed Mar 7 11:18:29 2018 UTC (3 months, 2 weeks ago) by knakahara
Branch: MAIN
Changes since 1.130: +9 -2 lines
Diff to previous 1.130 (colored)

Fix another poll mode assumption breaking. Implemented by msaitoh@n.o, I just commit by proxy.

ixgbe_rearm_queues() writes EICS register(s). 82599, X540 and X550
specifications say "Following a write of 1b to any bit in the EICS register
(interrupt cause set), its corresponding bit in the EIMS register is auto
set as well enabling its interrupt." in "Extended Interrupt Auto Mask Enable
(EIAM) Register" section. That is, ixgbe_rearm_queues() causes interrupts
regardless of the status managed by ixgbe_enable_queue()/ixgbe_disable_queue().
That can break poll mode assumption.

In fact, the problem occurs in the following situation
    - CPU#A has high load traffic, in contrast, CPU#B has not so high load traffic
    - CPU#A is occurred interrupt by its NIC queue
      - CPU#A calls ixgbe_disable_queue() in interrupt handler(ixgbe_msix_que())
      - CPU#A kick softint handler(ixgbe_handle_que())
        - CPU#A begins softint
        - CPU#A's NIC queue is set que->txr->busy flag
        - With some reason, CPU#A can do ixg interrupt handler
          E.g. when one of CPU#A's softnet handlers sleeps, ipl is lowered
    - CPU#B starts callout
      - CPU#B calls ixgbe_local_timer1()
        - CPU#B writes EICS bit corresponding CPU#A's NIC queue bit
    - CPU#A's NIC queue causes interrupt whie CPU#A is running in poll mode
      - CPU#A calls ixgbe_disable_queue() in interrupt handler *again*
    - CPU#A has done polling, and then CPU#A calls ixgbe_enable_queue() *once*
    - CPU#A's NIC queue interrupt is disabled until ixg is detached as
      ixgbe_disable_queue() is called twice though ixgbe_disable_queue() is
      called once only

NOTE:
82598 does not say so, but it is treated in the same way because of no harm.

By the way, we will refactor ixgbe_local_timer(watchdog processing) later.

XXX pullup-8

Revision 1.130 / (download) - annotate - [select for diffs], Wed Mar 7 08:01:32 2018 UTC (3 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.129: +1 -2 lines
Diff to previous 1.129 (colored)

 Don't increment que->req.ev_count in MSI-X interrupt because it's not
reschedule.

Revision 1.129 / (download) - annotate - [select for diffs], Wed Mar 7 03:29:10 2018 UTC (3 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.128: +16 -21 lines
Diff to previous 1.128 (colored)

- Make "Handled queue in softint" and "Requeued in softint" evcnt(9) per queue
  and count them correctly.
- Remove #if 0'ed code.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Mar 2 10:19:20 2018 UTC (3 months, 3 weeks ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.127: +92 -8 lines
Diff to previous 1.127 (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.127 / (download) - annotate - [select for diffs], Mon Feb 26 04:19:00 2018 UTC (3 months, 4 weeks ago) by knakahara
Branch: MAIN
Changes since 1.126: +28 -8 lines
Diff to previous 1.126 (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.126 / (download) - annotate - [select for diffs], Thu Feb 22 10:02:08 2018 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (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.125 / (download) - annotate - [select for diffs], Tue Feb 20 08:49:23 2018 UTC (4 months ago) by knakahara
Branch: MAIN
Changes since 1.124: +7 -1 lines
Diff to previous 1.124 (colored)

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.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Feb 20 07:24:37 2018 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.123: +48 -13 lines
Diff to previous 1.123 (colored)

- 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

Revision 1.123 / (download) - annotate - [select for diffs], Fri Feb 16 10:11:21 2018 UTC (4 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.122: +4 -1 lines
Diff to previous 1.122 (colored)

 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)

Revision 1.122 / (download) - annotate - [select for diffs], Fri Feb 16 04:50:19 2018 UTC (4 months, 1 week ago) by knakahara
Branch: MAIN
Changes since 1.121: +6 -1 lines
Diff to previous 1.121 (colored)

Apply RSS utility to ixg(4) and ixv(4).

ok by msaitoh@n.o.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Feb 14 10:38:28 2018 UTC (4 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.120: +8 -5 lines
Diff to previous 1.120 (colored)

 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

Revision 1.120 / (download) - annotate - [select for diffs], Fri Jan 26 09:07:46 2018 UTC (4 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

 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).

Revision 1.119 / (download) - annotate - [select for diffs], Thu Dec 28 06:10:01 2017 UTC (5 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.118: +161 -77 lines
Diff to previous 1.118 (colored)

 Fallback from MSI-X to MSI or INTx if MSI-X setup failed.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Dec 21 09:24:45 2017 UTC (6 months ago) by msaitoh
Branch: MAIN
Changes since 1.117: +16 -3 lines
Diff to previous 1.117 (colored)

- If MSI can't be used on some environment, fallback to INTx correctly.
- Use single vector MSI when number of CPU is 1 to save interrupt slot.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Dec 21 06:49:26 2017 UTC (6 months ago) by msaitoh
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

 Fix panic when only link interrupt can't be established.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Dec 20 08:51:42 2017 UTC (6 months ago) by msaitoh
Branch: MAIN
Changes since 1.115: +5 -7 lines
Diff to previous 1.115 (colored)

 Don't panic when resource shortage occured. Fixes PR#52820 reported by
kardel@:
 - Don't use if_free() because ixgbe(4) don't use if_alloc().
 - Move location of {ixgbe,ixv}_setup_interface() call at a position that
   any error don't occur. One of the reason is that it should be. Another
   reason is that it's hard to call ether_ifdetach() and if_detach() when
   cold == 1 (because of pserialize_perform, xc_wait, timing of domaininit
   and maybe more).

Revision 1.115 / (download) - annotate - [select for diffs], Wed Dec 6 04:08:50 2017 UTC (6 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.114: +14 -12 lines
Diff to previous 1.114 (colored)

Sync with FreeBSD's r326022. All of the following changes have no influence
to netbsd:
- 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.
- Fix for netmap module.
- Remove never defined UDP_IPV4_EX
- Add SPDX-License-Identifier

Revision 1.114 / (download) - annotate - [select for diffs], Fri Nov 24 08:36:22 2017 UTC (7 months ago) by msaitoh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.113: +8 -3 lines
Diff to previous 1.113 (colored)

 On X540, print PHY FW Revision with %u.%x. 0x4030 will be printed
as "Revision 4.3 ID 0x0"

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 22 15:15:09 2017 UTC (7 months ago) by msaitoh
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

Fix a bug that bypass adapter's sysctls aren't set. Tested with non-genuine
X550-T2 bypass adapter:
- Call ixgbe_sysctl_instance() in ixgbe_bypass_init() to get sysctl's top node
  correctly.
- ixgbe_init_device_features() refers adapter->hw.bus.func for bypass adapter.
  Call set_lan_id() to set adapter->hw.bus.func before calling
  ixgbe_init_device_features(). Without this, bypass sysctl's are added to
  both the first and second port.
- Initalize node.sysctl_data before calling sysctl_lookup() to read correct
  value.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Nov 16 03:07:18 2017 UTC (7 months, 1 week ago) by ozaki-r
Branch: MAIN
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored)

Unify IFEF_*_MPSAFE into IFEF_MPSAFE

There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.

Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).

Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.

Proposed on tech-kern@ and tech-net@

Revision 1.111 / (download) - annotate - [select for diffs], Sun Nov 12 05:11:36 2017 UTC (7 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.110: +1 -2 lines
Diff to previous 1.110 (colored)

 Remove obsoleted comment. This comment should have been removed in rev. 1.97.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Nov 9 09:33:28 2017 UTC (7 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.109: +6 -2 lines
Diff to previous 1.109 (colored)

 On device which has SFP(+) cage and a module is inserted, hw->phy.id is not
MII PHY id but SFF 8024 ID. So checking hw->phy.id with 0 doesn't work.
Print PHY ID only for copper PHY.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Nov 2 08:41:15 2017 UTC (7 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.108: +4 -5 lines
Diff to previous 1.108 (colored)

- Handle hw.ixgN.advertise_speed correctly.
- Fix hw.ixgN.advertise_speed sysctl's description.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Oct 26 01:40:33 2017 UTC (7 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.107: +1 -10 lines
Diff to previous 1.107 (colored)

- Remove all half duplex setting.
- Remove special handling of IXGBE_DEV_ID_82598AT's 1000BaseT. The PHY is
  compliant with clause 45, so the media is added in the beginning of
  ixgbe_add_media_types().

Revision 1.107 / (download) - annotate - [select for diffs], Wed Oct 25 04:45:41 2017 UTC (8 months ago) by msaitoh
Branch: MAIN
Changes since 1.106: +11 -6 lines
Diff to previous 1.106 (colored)

- For X550 and newer, print NVM Image Version with %u.%02x (e.g. "0.05").
- Fix value check of OEM_NVM_IMAGE_VER.

Revision 1.106 / (download) - annotate - [select for diffs], Mon Oct 23 09:31:18 2017 UTC (8 months ago) by msaitoh
Branch: MAIN
Changes since 1.105: +7 -2 lines
Diff to previous 1.105 (colored)

 If if_initialize() failed in the attach function, free resources and return.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Oct 18 10:43:32 2017 UTC (8 months ago) by msaitoh
Branch: MAIN
Changes since 1.104: +7 -1 lines
Diff to previous 1.104 (colored)

 Protect ec_multi* with mutex like other MP safe Ethernet drivers.
See if_ether.h rev. 1.66 and related stuff:
http://mail-index.netbsd.org/source-changes/2016/12/28/msg080289.html

Revision 1.104 / (download) - annotate - [select for diffs], Fri Oct 13 04:52:40 2017 UTC (8 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.103: +3 -1 lines
Diff to previous 1.103 (colored)

 Set baudrate correctly. A device which use mii(4) interface can set
if_baudrate atomatically by mii_phy_statusmsg(). ixg(4) and ixv(4) don't
use mii(4), so calling ifmedia_baudrate() directly is required.

 XXX need the same same work for wm(4)'s TBI and SERDEV devices.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Oct 4 07:13:00 2017 UTC (8 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.102: +56 -27 lines
Diff to previous 1.102 (colored)

- Remove half-duplex setting for more than 1000Mbps in ixgbe_add_media_types()
  because those medias are not in the spec.
- Add 2.5GBASE-T and 5GBASE-T support. Tested with X550-T1.

Example:
ixg0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	capabilities=fff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx>
	capabilities=fff80<TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx>
	capabilities=fff80<TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6,LRO>
	enabled=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx>
	enabled=7ff80<TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx>
	enabled=7ff80<TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
	ec_capabilities=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
	ec_enabled=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
	address: a0:36:9f:b0:f5:b0
	media: Ethernet 2.5GBASE-T full-duplex
	status: active
	supported Ethernet media:
		media 10Gbase-T
		media 10Gbase-T mediaopt full-duplex
		media 1000baseT
		media 1000baseT mediaopt full-duplex
		media 100baseTX
		media 100baseTX mediaopt full-duplex
		media 2.5GBASE-T mediaopt full-duplex
		media 5GBASE-T mediaopt full-duplex
		media autoselect
	inet 172.16.0.1/24 broadcast 172.16.0.255 flags 0x0
	inet6 fe80::a236:9fff:feb0:f5b0%ixg0/64 flags 0x0 scopeid 0x1

Revision 1.102 / (download) - annotate - [select for diffs], Wed Oct 4 06:19:47 2017 UTC (8 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

 Fix a bug that X550EM (Denverton) can't force 10BaseT.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 27 10:31:29 2017 UTC (8 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.100: +1 -16 lines
Diff to previous 1.100 (colored)

 Print device name in ixv_attach().

Revision 1.100 / (download) - annotate - [select for diffs], Thu Aug 31 02:48:55 2017 UTC (9 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored)

 Fix 2500 KX media setting in last commit.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Aug 30 08:49:18 2017 UTC (9 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.98: +1806 -2397 lines
Diff to previous 1.98 (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.98 / (download) - annotate - [select for diffs], Wed Aug 30 08:24:57 2017 UTC (9 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.97: +4090 -4081 lines
Diff to previous 1.97 (colored)

 FreeBSD r320688 sorted a lot of functions. Merging that change by one commit
makes difficult to know what was really changed. To make change understandable,
commit only function sort and white space changes before real change.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Aug 30 01:25:07 2017 UTC (9 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.96: +5 -3 lines
Diff to previous 1.96 (colored)

 Don't limit number of queue pair to 8. Take max TX queues and max RX queues
into account. 82598 has 32 TX queue and 64 RX queues. Others has 128 TX queues
and 128 RX queues. Number of MSI-X table entries is 64, so the max queue pairs
is 63 (64 minus the Others (e.g. link status change)).

Revision 1.96 / (download) - annotate - [select for diffs], Thu Aug 24 10:43:42 2017 UTC (10 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.95: +1 -13 lines
Diff to previous 1.95 (colored)

 Remove unused counters.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jul 3 08:29:58 2017 UTC (11 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.94: +23 -1 lines
Diff to previous 1.94 (colored)

 Print PHY ID.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Jun 27 10:33:09 2017 UTC (11 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.93: +14 -5 lines
Diff to previous 1.93 (colored)

 Fix a bug of ixg(4)'s media setting.

Before:
 ifconfig ixg0 media 100baseTX	-> advertise 100Mbps only
 ifconfig ixg0 media 1000baseT	-> advertise 1Gbps and 1000Mbps (NG)
 ifconfig ixg0 media 10Gbase-T	-> advertise all (NG)
 ifconfig ixg0 media auto	-> advertise all

After:
 ifconfig ixg0 media 100baseTX	-> advertise 100Mbps only
 ifconfig ixg0 media 1000baseT	-> advertise 1Gbps only
 ifconfig ixg0 media 10Gbase-T	-> advertise 10Gbps only
 ifconfig ixg0 media auto	-> advertise all

Revision 1.93 / (download) - annotate - [select for diffs], Tue Jun 27 05:17:54 2017 UTC (11 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

 Reduce diff against FreeBSD. change hw.ixgN.ts to hw.ixgN.thermal_test
(FreeBSD r282289).

Revision 1.92 / (download) - annotate - [select for diffs], Tue Jun 27 05:01:51 2017 UTC (11 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

 Reduce diff against FreeBSD. No functional change.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jun 23 06:33:35 2017 UTC (12 months ago) by msaitoh
Branch: MAIN
Changes since 1.90: +7 -1 lines
Diff to previous 1.90 (colored)

 Print verbose outout in ixgbe_update_link_status() correctly on 5Gbps and
2.5Gbps (NBASE-T) for X550T[12] and newer.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jun 23 04:36:48 2017 UTC (12 months ago) by msaitoh
Branch: MAIN
Changes since 1.89: +7 -36 lines
Diff to previous 1.89 (colored)

 Use IFM_1000_KX more.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 12 03:03:22 2017 UTC (12 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.88: +7 -27 lines
Diff to previous 1.88 (colored)

Use IFM_1000_KX and IFM_2500_KX.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Jun 2 08:16:52 2017 UTC (12 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-8-base
Branch point for: netbsd-8
Changes since 1.87: +72 -6 lines
Diff to previous 1.87 (colored)

- Print NVM Image Version, PHY FW Revision, NVM Map version and OEM NVM
  Image version
- s/TrackID/ETrackID/

Revision 1.87 / (download) - annotate - [select for diffs], Fri May 26 09:17:32 2017 UTC (12 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.86: +3 -1 lines
Diff to previous 1.86 (colored)

 Add missing {ixgbe,ixv}_stop() in the detach function. Without this change,
shutdown won't finish or panic on heay traffic.

Revision 1.86 / (download) - annotate - [select for diffs], Fri May 26 08:36:41 2017 UTC (12 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.85: +9 -1 lines
Diff to previous 1.85 (colored)

 Count Bad SFD (Start Frame Delimiter). X550 and newer have this register.

Revision 1.85 / (download) - annotate - [select for diffs], Fri May 26 07:42:15 2017 UTC (13 months ago) by msaitoh
Branch: MAIN
Changes since 1.84: +120 -2 lines
Diff to previous 1.84 (colored)

 Clear all event counters when SIOCZIFDATA(ifconfig -z) is called.

Revision 1.84 / (download) - annotate - [select for diffs], Mon May 22 07:35:14 2017 UTC (13 months ago) by msaitoh
Branch: MAIN
Changes since 1.83: +22 -6 lines
Diff to previous 1.83 (colored)

 Fix a bug that the driver prints "Link is up 1 Gbps" even if the link is
100Mbps. This change is the same as a part of ixv.c rev. 1.42.

Revision 1.83 / (download) - annotate - [select for diffs], Mon May 22 07:23:55 2017 UTC (13 months ago) by msaitoh
Branch: MAIN
Changes since 1.82: +20 -3 lines
Diff to previous 1.82 (colored)

 Document says M[LR]FC are valid when link is up and 10Gbps, so:
 - Add those values when link is up and 10Gbps
 - Discard those vaules when link becomes up and the speed is 10Gbps

Revision 1.82 / (download) - annotate - [select for diffs], Thu May 18 08:27:19 2017 UTC (13 months, 1 week ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3
Changes since 1.81: +56 -2 lines
Diff to previous 1.81 (colored)

- Count "Total Packets Missed" by evcnt(9)
- Call evcnt_attach_dynamic()/detach() for stats->mngpdc
  (Management Packets Dropped).
- Make stats->rnbc (Receive No Buffers) evcnt(9). Only 82598 has this register.
- Set RQSMR, TQSM (or TQSMR on 82598) to count qprc, qptc, qbrc, qbtc and qprdc
  in each queue counter. Without this change, all queue's counts are counted in
  queue 0's. Even if with this change, only MPC[0] is counted and other MPCs
  are not counted.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Apr 28 10:24:45 2017 UTC (13 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base2, prg-localcount2-base1
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

 Fix a bug that reading hw.ixgM.qN.interrupt_rate cause the interrupt
throtting rate register to 0. Check sysctl read/write correctly...

Revision 1.80 / (download) - annotate - [select for diffs], Fri Mar 3 04:37:05 2017 UTC (15 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: 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.79: +49 -30 lines
Diff to previous 1.79 (colored)

 Set PCI_INTR_MPSAFE, SOFTINT_MPSAFE, CALLOUT_MPSAFE and IFEF_START_MPSAFE
if NET_MPSAFE is defined.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Feb 24 05:38:30 2017 UTC (15 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.78: +42 -2 lines
Diff to previous 1.78 (colored)

 Print mac.type and the TrackID.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Feb 16 08:01:11 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.77: +5 -4 lines
Diff to previous 1.77 (colored)

 Do if_snd check even if IXGBE_LEGACY_TX is used. It's used by ALTQ.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Feb 16 07:58:21 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.76: +1 -5 lines
Diff to previous 1.76 (colored)

 txt_si softint is used only for multiqueue (ixgbe_mq_start_locked()), so don't
schedule it in ixgbe_legacy_irq().

Revision 1.76 / (download) - annotate - [select for diffs], Mon Feb 13 10:37:37 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.75: +1 -12 lines
Diff to previous 1.75 (colored)

Remove more ix*_start_locked() from interrupt context like previous commit.
 > Fix a bug that ix*_start_locked() is called in interrput context
 > (ix*_msix_que). The function is called in softint(ix*_handle_que()). OK'd by
 >k-nakahara.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Feb 13 10:13:54 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.74: +3 -1 lines
Diff to previous 1.74 (colored)

Use percpuq.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Feb 13 06:38:45 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.73: +5 -9 lines
Diff to previous 1.73 (colored)

 Fix a bug that ix*_start_locked() is called in interrput context
(ix*_msix_que). The function is called in softint(ix*_handle_que()). OK'd by
k-nakahara.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Feb 10 08:41:13 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.72: +5 -8 lines
Diff to previous 1.72 (colored)

 Change the Interrupt Moderation flag from global variable to per device.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Feb 10 06:35:22 2017 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.71: +43 -52 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Wed Feb 8 09:00:37 2017 UTC (16 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored)

 Print CPU number correctly.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Feb 8 08:13:53 2017 UTC (16 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.69: +3 -7 lines
Diff to previous 1.69 (colored)

 Call IFQ_SET_MAXLEN() even if TX multiqueue is used. ALTQ uses it.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Feb 8 04:05:13 2017 UTC (16 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Add queue number into interrupt name.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Feb 8 03:59:12 2017 UTC (16 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored)

 Set ifm_active to IFM_NONE when the physical interface's link is down.
Now ifconfig shows "media: Ethernet autoselect '(none)'".

Revision 1.67 / (download) - annotate - [select for diffs], Wed Feb 1 10:47:13 2017 UTC (16 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.66: +45 -13 lines
Diff to previous 1.66 (colored)

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

Revision 1.66 / (download) - annotate - [select for diffs], Wed Jan 25 13:08:31 2017 UTC (16 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

 Call ixgbe_get_supported_physical_layer() before ixgbe_add_media_types() to
set new media types correctly.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Jan 25 07:49:23 2017 UTC (16 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.64: +2 -3 lines
Diff to previous 1.64 (colored)

Remove debug printf()s.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 25 07:46:53 2017 UTC (16 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.63: +13 -11 lines
Diff to previous 1.63 (colored)

 Fix SFP+ insersion or replacement stuff.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jan 19 09:42:08 2017 UTC (17 months ago) by msaitoh
Branch: MAIN
Changes since 1.62: +37 -35 lines
Diff to previous 1.62 (colored)

Reduce diff against FreeBSD. No functional change.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jan 18 10:22:09 2017 UTC (17 months ago) by msaitoh
Branch: MAIN
Changes since 1.61: +9 -8 lines
Diff to previous 1.61 (colored)

 Now we can use multiqueue. It's default on ixg(4). Not yet for ixv(4).

Revision 1.61 / (download) - annotate - [select for diffs], Wed Jan 18 10:18:40 2017 UTC (17 months ago) by msaitoh
Branch: MAIN
Changes since 1.60: +4 -1 lines
Diff to previous 1.60 (colored)

 Fix sysctl stuff. Make the top sysctl node and keep the pointer.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Jan 18 08:23:03 2017 UTC (17 months ago) by msaitoh
Branch: MAIN
Changes since 1.59: +5 -2 lines
Diff to previous 1.59 (colored)

 Use 64bit DMA tag. If not, a lot of bounce buffer is allocated.
Fixes PR#49968 reported by Hauke.

XXX pullup-[67].

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

 Fix INIT_DEBUGOUT() messages.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Dec 28 09:29:35 2016 UTC (17 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.57: +19 -15 lines
Diff to previous 1.57 (colored)

 Fix a bug that hw.ixgN.wol_enable=0 doesn't work correctly. Clear the WUC
and WUFC register if wol_enable is 0. ixgbe_setup_low_power_mode() calls
ixgbe_stop() and it resets the chip. The reset change WUC and WUFC registers to
the default, so clearing WUC and WUFC should be done after ixgbe_stop().

Revision 1.57 / (download) - annotate - [select for diffs], Wed Dec 28 07:05:11 2016 UTC (17 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.56: +14 -13 lines
Diff to previous 1.56 (colored)

 Allow 0 as the defalut of hw.ixgN.advertise_speed sysctl.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Dec 27 10:01:39 2016 UTC (17 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.55: +3 -1 lines
Diff to previous 1.55 (colored)

  Fix flow control setting sysctl. I don't know why disabling autonego when
the flow control parameter is changed. Now the ixgN.fc sysctl works as
expected.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Dec 16 08:41:01 2016 UTC (18 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.54: +65 -34 lines
Diff to previous 1.54 (colored)

Add missing IFM_FDX.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Dec 16 08:30:20 2016 UTC (18 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Remove extra newline in debug printfs. ixgbe's *DEBUGOUT* macros automatically
add newline.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Dec 5 10:05:11 2016 UTC (18 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.52: +7 -8 lines
Diff to previous 1.52 (colored)

- Fix wol_enable, fc and wufc sysctls to work correctly.
- Fix RCS Id.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Dec 5 08:50:29 2016 UTC (18 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.51: +104 -47 lines
Diff to previous 1.51 (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.51 / (download) - annotate - [select for diffs], Fri Dec 2 12:14:37 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.50: +61 -20 lines
Diff to previous 1.50 (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.50 / (download) - annotate - [select for diffs], Fri Dec 2 11:56:55 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Fix ix{gbe,v}_set_sysctlvalue().

Revision 1.49 / (download) - annotate - [select for diffs], Fri Dec 2 10:46:58 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.48: +7 -5 lines
Diff to previous 1.48 (colored)

- Add missing pmf_device_deregister() in ixgbe_detach()
- Remove extra newline from an sysctl description.
- Fix dmesg output when the number of PCIe lane can't get.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Dec 2 10:42:04 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.47: +337 -141 lines
Diff to previous 1.47 (colored)

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

Revision 1.47 / (download) - annotate - [select for diffs], Fri Dec 2 10:34:23 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.46: +40 -7 lines
Diff to previous 1.46 (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.46 / (download) - annotate - [select for diffs], Fri Dec 2 10:24:31 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.45: +10 -5 lines
Diff to previous 1.45 (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.45 / (download) - annotate - [select for diffs], Fri Dec 2 10:21:43 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.44: +992 -138 lines
Diff to previous 1.44 (colored)

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

Revision 1.44 / (download) - annotate - [select for diffs], Thu Dec 1 06:56:28 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.43: +963 -299 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Thu Dec 1 06:27:18 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.42: +540 -325 lines
Diff to previous 1.42 (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.42 / (download) - annotate - [select for diffs], Mon Nov 28 02:23:33 2016 UTC (18 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.41: +47 -2289 lines
Diff to previous 1.41 (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.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Nov 25 13:33:24 2016 UTC (18 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.40: +2 -41 lines
Diff to previous 1.40 (colored)

 Remove #ifdef NETBSD_MSI_OR_MSIX to be simple. ixv(4) isn't attached if
__HAVE_PCI_MSI_MSIX isn't set because MSI-X must be used.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 13 20:05:06 2016 UTC (20 months, 1 week ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.39: +16 -9 lines
Diff to previous 1.39 (colored)

provide intr xname

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jul 11 06:14:51 2016 UTC (23 months, 2 weeks ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored)

pci_intr_type() is required pci_chipset_tag_t argument by other than x86.

pointed out by nonaka@n.o.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (2 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (2 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.36: +14 -3 lines
Diff to previous 1.36 (colored)

Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!

Revision 1.36 / (download) - annotate - [select for diffs], Mon Aug 17 06:16:03 2015 UTC (2 years, 10 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Add kernel code to support intrctl(8).

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 13 10:03:37 2015 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.34: +22 -18 lines
Diff to previous 1.34 (colored)

 Reduce diff against FreeBSD r280181.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 13 04:56:43 2015 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.33: +175 -163 lines
Diff to previous 1.33 (colored)

 - Add MSI/MSI-X support. The multiqueue function is not supported yet.
 - Make ixv.c compilable. _NOT_TESTED_YET_

Revision 1.33 / (download) - annotate - [select for diffs], Wed Aug 5 04:08:44 2015 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.32: +591 -255 lines
Diff to previous 1.32 (colored)

 Sync ixg(4) up to FreeBSD r279805 (or r280181) which include some bugfixes.
TODO:
 - Merge r280182 and newer. It's required to support X55x.
 - MSI/MSI-X support.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Aug 5 03:42:11 2015 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.31: +7 -2 lines
Diff to previous 1.31 (colored)

 Fix error path in ixgbe_attach() and ixgbe_detatch() to prevent panic.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Aug 3 05:43:01 2015 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

 Add missing evcnt_detach(&rxr->rx_copies) in ixgbe_detach().

Revision 1.30 / (download) - annotate - [select for diffs], Sat May 9 13:08:26 2015 UTC (3 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.29: +1 -3 lines
Diff to previous 1.29 (colored)

remove unreachable code.

Revision 1.29 / (download) - annotate - [select for diffs], Wed May 6 09:21:22 2015 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.28: +4 -1 lines
Diff to previous 1.28 (colored)

 Fixes link error without vlan. PR#49879.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Apr 24 07:00:51 2015 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.27: +409 -401 lines
Diff to previous 1.27 (colored)

Sync ixg(4) up to FreeBSD r250108:
 - Cleanup some unused counters and some unused code.
 - Improve performance.
 - Fix flow control - don't override user value on re-init
 - Fix to make 1G optics work correctly
 - Change to interrupt enabling - some bits were incorrect
   for certain hardware.
 - Certain stats fixes, remove a duplicate increment of
   ierror, thanks to Scott Long for pointing these out.
 - Fix the setting of RX which related to multicast.
 - Some netmap related fixes.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 14 07:41:52 2015 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.26: +14 -13 lines
Diff to previous 1.26 (colored)

 Fix a bug that ifconfig -z (SOICZIFDATA) doesn't work.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 14 07:17:06 2015 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.25: +258 -366 lines
Diff to previous 1.25 (colored)

Sync ixg(4) up to FreeBSD r243716:
 - A lot of bugfixes. Some of them are realted to multi queue and those
   have not affected in NetBSD because we have not used it yet.
 - Show 1000Base-SX correctly.
 - Fix if_baudrate from 1G to 10G.
 - Improve performance.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Apr 2 09:26:55 2015 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.24: +154 -73 lines
Diff to previous 1.24 (colored)

Update our ixg(4) driver up to FreeBSD r238149:
- Add TSO6 support.
- The max size in dma tag is changed from 65535 to 262140 (IXGBE_TSO_SIZE).
  The value is the same as other *BSDs. The change might cause a address
  space shortage (ixgbe_dmamap_create() might fail) on some machines.
- Fix a lot of bugs.
- Improve performance.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Mar 27 05:57:28 2015 UTC (3 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.23: +212 -92 lines
Diff to previous 1.23 (colored)

Synchronize our ixg(4) driver up to FreeBSD r230775:
 - Add X540 support.
 - Add 100BaseTX support.
 - Fix a lot of bugs.
 - Improve performance.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Mar 25 12:53:55 2015 UTC (3 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.22: +4 -1 lines
Diff to previous 1.22 (colored)

 Fix a bug that vlan setting may not apply to the parent interface correctly.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 19 14:22:23 2015 UTC (3 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.21: +221 -24 lines
Diff to previous 1.21 (colored)

Sync ixg(4) up to FreeBSD r230572.

 - Fix in the interrupt handler to make sure the stack TX queue is processed.
   (FreeBSD r222588)
 - The maximum read size of incoming packets is done in 1024-byte increments.
   The current code was rounding down the maximum frame size instead of
   routing up, resulting in a read size of 1024 bytes, in the non-jumbo
   frame case, and splitting the packets across multiple mbufs.
   (FreeBSD r225045)
 - Consequently the above problem exposed another issue, which is when
   packets were splitted across multiple mbufs, and all of the mbufs in the
   chain have the M_PKTHDR flag set. (FreeBSD r225045)
 - Use the correct constant for conversion between interrupt rate
   and EITR values (the previous values were off by a factor of 2)
   (FreeBSD r230572)
 - Make dev.ix.N.queueM.interrupt_rate a RW sysctl variable. Changing
   individual values affects the queue immediately, and propagates to all
   interfaces at the next reinit. (FreeBSD r230572)
 - Add dev.ix.N.queueM.irqs rdonly sysctl, to export the actual interrupt
   counts. (FreeBSD r230572)
 - Some netmap related changes.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 24 14:49:28 2015 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored)

 Add 82599EN_SFP and 82599_SFP_SF_QP. Not tested.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 24 14:14:50 2015 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

 Change macro name IXGBE_DEV_ID_82599_SFP_DELL to IXGBE_DEV_ID_82599_SFP_SF2.
Same as OpenBSD and Linux. No binary change.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 7 00:02:09 2015 UTC (3 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.18: +9 -3 lines
Diff to previous 1.18 (colored)

disable preemption while scheduling the softint to configure the link.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Feb 4 09:05:53 2015 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (colored)

Fix mutex related problem reported by Uwe Toenjes in PR#49328:
 - Revert ixgbe_netbsd.c rev. 1.2
 - make CORE_LOCK adaptive
 - Release spin lock while reinitializing the jumb buffer structure.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 4 04:37:13 2015 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.16: +1 -3 lines
Diff to previous 1.16 (colored)

 Remove extra IXGBE_TX_LOCK()/IXGBE_TX_UNLOCK() from
ixgbe_free_transmit_structures(). This function is called in the end of
the detach function. if_stop was called and almost all resources were
freed, so it's not required to block the TX stuff.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 4 03:17:29 2015 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

 Add missing IXGBE_RX_LOCK_DESTROY() for the detach path.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 13 03:11:34 2015 UTC (3 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.14: +14 -11 lines
Diff to previous 1.14 (colored)

 Fix a legacy interrupt problem. If the INTx line was shared with another
device, the ixgbe_legacy_irq() enabled the interrupt even if the interface
was down. Check the interface state and call functions appropriately.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 21 16:35:06 2014 UTC (4 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, nick-nhusb-base, netbsd-7-base
Branch point for: nick-nhusb, netbsd-7
Changes since 1.13: +4 -7 lines
Diff to previous 1.13 (colored)

only attach/detach stats->mngptc once.
remove a low-value printf().

Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 17 16:22:48 2014 UTC (4 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.12: +11 -7 lines
Diff to previous 1.12 (colored)

CID/1008347, CID/1008348, CID/1008349:  overflow before widen
CID/1203198, CID/1203199:  Uninitialized scalar variable

Revision 1.12 / (download) - annotate - [select for diffs], Tue Apr 15 12:37:59 2014 UTC (4 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Add __diagused.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 11 06:50:26 2014 UTC (4 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Mark ixgbe_disable_queue as unused.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Apr 8 19:39:06 2014 UTC (4 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Add dell's flavor (from uwe, in current-users@)

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 30 13:14:40 2014 UTC (4 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.8: +15 -13 lines
Diff to previous 1.8 (colored)

Make this compile

	- Fix pci_intr_string usage
	- Remove ununsed
	- define variables with their usage

kern/48690: ixg* driver doesn't compile

Untested.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:25 2014 UTC (4 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)

make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:10 2014 UTC (4 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.6: +2 -7 lines
Diff to previous 1.6 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 9 12:27:37 2014 UTC (4 years, 4 months ago) by njoly
Branch: MAIN
Changes since 1.5: +1 -14 lines
Diff to previous 1.5 (colored)

Remove a few noisy debug printf.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 18 06:21:11 2012 UTC (6 years ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Missed one of the (void *) casts on the args to sysctl_createv().

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jun 16 19:54:01 2012 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

Add explicit (void *) casts for when sysctl_createv() is passed
CTLTYPE_INT but the address of a structure (and a function).

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jun 2 21:36:45 2012 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Add some pre-processor magic to verify that the type of the data item
  passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:24 2011 UTC (6 years, 7 months ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Branch point for: netbsd-6
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Aug 12 21:55:29 2011 UTC (6 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache

Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver
ported from FreeBSD.

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>