Commit Graph

50 Commits

Author SHA1 Message Date
jhb
e5444be4ae - Add missing newlines to some error messages.
- Add interrupt descriptions when using mulitple MSI-X interrupts.

Reviewed by:	jfv
2009-12-18 16:14:31 +00:00
jfv
3d6f6d0125 Add old read_mac_addr routine to this module since
a customer report of an Invalid MAC Address has occurred.
2009-12-14 19:05:16 +00:00
jfv
a0ba8f75c6 Remove the MTX_SPIN flag to the shared code MUTEX
as it was causing a panic, also took the opportunity
to rename the lock for clarity.
2009-12-14 18:43:18 +00:00
jfv
1225029505 Remove phantom line of code that somehow slipped
into the checkin.
2009-12-08 18:54:37 +00:00
jfv
fe4debf525 Resync with Intel versions of both the em and igb
drivers. These add new hardware support, most importantly
the pch (i5 chipset) in the em driver. Also, both drivers
now have the simplified (and I hope improved) watchdog
code. The igb driver uses the new RX cleanup that I
first implemented in ixgbe.

em  - version 6.9.24
igb - version 1.8.4
2009-12-08 01:07:44 +00:00
jfv
3a1c575a83 With an i386 kernel the igb driver can cause a
page fault panic on initialization due to a large
number of bounce pages being allocated. This is due
to the dma tag requiring page alignment on mbuf mapping.
This was removed some time back from the ixgbe driver
and is not needed here either.
2009-11-11 19:13:40 +00:00
jfv
9916d2ad2d Fix build issue with last commit. 2009-09-10 21:16:26 +00:00
jfv
cb0641a1c3 Fix build complaint from previous checkin 2009-09-10 21:14:55 +00:00
jfv
fd4a6d819a Fix an xmit mbuf leak, when transmit failed but you
still have an mbuf it was not being requeued.

MFC: 3 days
2009-09-10 18:56:45 +00:00
jfv
73d745d48d Fix for pr 138516
An mbuf is not requeued when a xmit fails.

MFC: 3 days
2009-09-10 18:53:34 +00:00
phk
5297261651 Revert previous commit and add myself to the list of people who should
know better than to commit with a cat in the area.
2009-09-08 13:19:05 +00:00
phk
2314521104 Add necessary include. 2009-09-08 13:16:55 +00:00
delphij
e28a844d86 Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
Without this changeset there will be no way to prevent these NICs from
sending ARP, which is harmful in server farms that is configured as
"Direct Server Return" behind a load balancer.

A better fix would remove the whole hack completely but it would be
later than 8.0-RELEASE.

Reviewed by:	jfv, yongari
Approved by:	re (kib)
2009-08-19 17:59:41 +00:00
jfv
7611813d49 Improvement on the last change, this gives a precise
way to tell the one and only interface that a vlan
event is for. Thanks to John Baldwin for the patch.

Approved by: re
2009-07-24 21:35:52 +00:00
jfv
a5f235cd3b This delta fixes two bugs:
- When a vlan event occurs a check was not made that
    the event was actually for the interface, thus resulting
    in a panic. All three drivers have this vulnerability. Add
    a check for this condition.
  - Secondly, there was a duplicate buf_ring free in the em
    driver resulting in a panic on unload. Remove.

Approved by:  re
2009-07-24 16:57:49 +00:00
jfv
a3c94456b5 A small number of systems in the ICH9/10 family have a flash
part that is made up of 8K banks rather than 4K, if these
systems are using bank 1 then the last change in this code
breaks the bank read, resulting in an invalid checksum of
the eeprom during driver load. This change fixes this.

Approved by:  re
2009-07-24 16:54:22 +00:00
bz
67487d4dab Re-add opt_inet.h, as we did in r193862 and lost yet again.
Approved by:	re (kib)
2009-07-14 19:32:36 +00:00
jfv
795d93a682 The new method of reading the mac address from the
RAR(0) register does not work on this old adapter,
provide a local routine that does it the older way.

Approved by:  re
2009-07-06 17:23:48 +00:00
jfv
a0406a1253 Type problem when FreeBSD is in a virtualized environment, the
result was when the RX index wrapped it was converted into some
sort of gibberish and written into the RDT register, effectively
killing the RX side of the thing :)

Approved by: re
2009-06-29 18:17:10 +00:00
rwatson
be5740a255 Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs.  This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.

For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 11:45:06 +00:00
jfv
9f3c79f860 Change intr_bind to bus_bind_intr, also limit this to
multiqueue setup which is not the shipping default for
igb (its set to 1).
2009-06-25 17:21:12 +00:00
jfv
7facd747d2 need to make intr_bind call architecture specific for
global builds (failing sun4v lint build)
2009-06-24 22:16:02 +00:00
jfv
cd9011977a Fix lint issue. 2009-06-24 21:32:51 +00:00
jfv
bd3587c757 Updates for both the em and igb drivers, add support
for multiqueue tx, shared code updates, new device
support, and some bug fixes.
2009-06-24 17:41:29 +00:00
bz
15dd648e3f Add opt_inet.h back lost with r190872.
This will bring back improved IPv4 SIOCSIFADDR ioctl handling
not re-initializing the interface if avoidable.
2009-06-09 21:43:04 +00:00
attilio
b523608331 When user_frac in the polling subsystem is low it is going to busy the
CPU for too long period than necessary.  Additively, interfaces are kept
polled (in the tick) even if no more packets are available.
In order to avoid such situations a new generic mechanism can be
implemented in proactive way, keeping track of the time spent on any
packet and fragmenting the time for any tick, stopping the processing
as soon as possible.

In order to implement such mechanism, the polling handler needs to
change, returning the number of packets processed.
While the intended logic is not part of this patch, the polling KPI is
broken by this commit, adding an int return value and the new flag
IFCAP_POLLING_NOCOUNT (which will signal that the return value is
meaningless for the installed handler and checking should be skipped).

Bump __FreeBSD_version in order to signal such situation.

Reviewed by:	emaste
Sponsored by:	Sandvine Incorporated
2009-05-30 15:14:44 +00:00
kmacy
a035677fd1 Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit 2009-05-14 03:33:04 +00:00
kmacy
2015077847 fix typo in conditional 2009-04-27 23:43:28 +00:00
kmacy
f60f067077 collapse the two em_start_locked routines in to one 2009-04-27 22:55:48 +00:00
jfv
875e2c2c82 Correct fat finger mistake 2009-04-27 18:35:06 +00:00
jfv
02ba5a6387 igb_txeof also has a case where the watchdog may not
get reset when it should be

MFC after: 2 weeks
2009-04-27 17:36:41 +00:00
jfv
6554abda25 Thanks for Michael Tuexen for tracking down a path where
the watchdog timer was not being rearmed in txeof, and also
a missing case in the new code.

MFC after:	2 weeks
2009-04-27 17:22:14 +00:00
kmacy
6335a05791 fix typo 2009-04-23 21:27:06 +00:00
kmacy
6dc4a1781e fix panic when using msix
Pointed out by Nate Whitehorn
2009-04-23 21:23:19 +00:00
kmacy
1ebe07a9d1 Make sure the ALTQ case is handle correctly by using drbr_dequeue 2009-04-23 21:19:35 +00:00
kmacy
d9986ad4bf call base if_qflush routine to flush if_snd 2009-04-16 23:08:02 +00:00
jfv
3c2ef149c0 Thanks to Michael Tuexen and Randall Scott for providing a
few important bug fixes found while they were doing SCTP
development, and that I somehow lost during the scramble.

Thanks guys!!
2009-04-14 17:14:35 +00:00
kmacy
7958bd2f5f - define em_transmit and em_qflush
- make buF_ring usage conditional but enabled by default

Reviewed by:	jfv
2009-04-14 03:36:59 +00:00
jfv
d8e863e5fb Fix build problem with data format. 2009-04-10 05:26:14 +00:00
jfv
fa07963f1d This delta syncs the em and igb drivers with Intel,
adds header split and SCTP support into the igb driver.
Various small improvements and fixes.

MFC after: 2 weeks
2009-04-10 00:05:46 +00:00
gnn
f29447f12d Fix a cut/paste bug which prevents us from setting the average
latency tunable.

Reviewed by:	jfv
MFC after:	1 day
2009-01-13 00:10:50 +00:00
thompsa
f2a032ddcc Restore opt_inet.h include which was lost in the last commit. 2008-12-07 21:32:56 +00:00
jfv
b9deff6e4e Thanks to the reminder from Ganbold, small fix in the RX failure
path for an infinite loop. Problem originally noticed in ixgbe
by Jeff Roberson and fixed there. Thanks to everyone involved.
2008-11-27 02:18:43 +00:00
jfv
acf860ad54 This delta is primarily a fix for es2lan devices that
will sometimes fail to initialize problem due to a lock
contention with management hardware. However, in order to
deliver that fix it was necessary to take a shared code
update as a whole, and this required scattered changes in
the core code to be compatible.

The em driver now has VLAN HW support added as the igb
driver had previously.

MFC after:  ASAP - in time for 7.1 RELEASE
2008-11-26 23:57:23 +00:00
bz
d3cda91959 Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after:	2 months
2008-11-06 11:11:25 +00:00
bz
c2d5d6f6fe Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after:	2 months
2008-11-06 11:00:57 +00:00
jfv
a98280bcbe Update to igb driver:
- changes in support of the VLAN filter fix to 126850
	- removal of a bunch of legacy code that was cruft, if not
	  possibly harmful.
	- removal of POLLING from this driver, with multiqueue and
	   MSIX it just makes no sense here.
	- Fix an LRO bug that I've been working on internally, intermittent
	  panics under stress, the problem was releasing the RX ring lock
	  before the LRO flushing.
	- Following the above fix I now enable LRO by default
	- For performance reasons increase the default number of RX queues
	  to 4.
	- Add AIM - "Adaptive Interrupt Moderation", a fancy way of saying
	  that the EITR value is dynamically changed based on the size of
	  packets in the last interrupt interval.

	- Much goodness to try, enjoy!!
2008-08-28 22:28:28 +00:00
jfv
569674d6d9 Data type fix 2008-07-31 02:22:53 +00:00
ps
ffceb287be Include netinet/tcp_lro.h, unbreak the build 2008-07-30 23:54:23 +00:00
jfv
cdddb20941 Merge of the source for igb and em into dev/e1000, this
proved to be necessary to make the static drivers work
in EITHER/OR or BOTH configurations. Modules will still
build in sys/modules/igb or em as before.

This also updates the igb driver for support for the 82576
adapter, adds shared code fixes, and etc....

MFC after:	ASAP
2008-07-30 21:56:53 +00:00