| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
already freed struct ifnet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.
Reviewed by: pjd, bz
MFC after: 7 days
|
|
|
|
|
|
|
|
| |
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintained list.
Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca>
MFC after: 1 week
|
|
|
|
|
| |
kldunload/kldload without a panic. The same (but worse) problem
is also present in ixgb(4).
|
|
|
|
|
| |
Pointed out by: Xuefeng DENG <dengxf at dengh com>
Approved by: re (scottl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.
Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Changed from using explicit devices id to using descriptive labels.
- Added support for 82573 and 82546 Quad adapters.
- Corrected support for 82547EI and 82541ER (mac_type was not assigned)
- Removed #ifdef DBG_STATS and extraneous code.
if_em_hw.c/if_em_hw.h
- Added support for 82573 and 82546 Quad adapters.
- Brought forward Intel's most current mac and phy changes.
|
|
|
|
|
|
|
| |
This makes gathering of error stats more precise, and netstat(1) output look
right.
Reviewed by: tackerman
|
| |
|
|
|
|
|
| |
PR: kern/76890
Reviewed by: rwatson, sam
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the interface when going to toggle VLAN support for
internal reasons. If the IFCAP_VLAN_HWTAGGING bit is
cleared, we should rely on the (re)init routine to turn
VLAN support off and never touch the relevant hardware bits.
This applies to other capability bits, too. The user
obviously has a reason for clearing a capability bit,
e.g., if his particular NIC is buggy and hangs if a
certain hardware capability is turned on even for a
fraction of a second.
The flag adapter->em_insert_vlan_header still is set or
reset irrespective of the IFCAP_VLAN_HWTAGGING setting,
as before, in order to handle the case when a user sets
promiscuous mode on an interface first and later turns
its IFCAP_VLAN_HWTAGGING bit on.
This change might look orthogonal to rev#1.85, but in fact
it is not. It introduces bugfixes that hopefully will make
implementing the general scheme mentioned in the commit
message of rev#1.85 easier.
|
|
|
|
|
|
|
|
|
|
| |
configuration: it appears to work properly in the non-promiscuous case, but
we've not yet implemented a more general solution that maintains full
functionality with promiscuous mode enabled. While my hope is that we can
get one implemented soon, this will improve functionality substantially in
the mean time.
MFC after: 3 days
|
|
|
|
| |
was really just a waste of cycles, so this streamlines it considerably.
|
| |
|
|
|
|
|
|
| |
was causing device hangs when incorrectly applied to other adapters.
PR: kern/66634
|
|
|
|
| |
PR: None
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Because em_encap() can now fail in a way that leaves us without an
mbuf chain, potentially set *m_headp to NULL if that happens, so that
the caller can do the right thing. This case can occur when we try
to prepend the vlan header mbuf but can't allocate additional memory.
- Modify the caller of em_encap() to detect a NULL m_head and not try
to queue the mbuf if that happens.
- When em_encap() fails, make sure to call bus_dmamap_destroy() to
clean up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
promiscuous mode introduced in 1.45, which programs the em card not
to strip or prepend tags when in promiscuous mode without also
modifying behavior to manually prepend a vlan header in the event
that the card isn't doing it on transmit. Due to a feature of card
operation, if the global VLAN prepend/strip register isn't set,
setting the VLAN tag flag on individual packet descriptors will
cause the packet to be transmitted using ISL encapsulation rather
than 802.1Q VLAN encapsulation.
This fix causes em_encap() to prepend the header by tracking whether
the card is configured to temporarily disable prepending/stripping
due to promiscuous mode. As a result, entering promiscuous mode on
the parent em interface no longer causes vlans to appear to "wedge"
or transmit ISL-encapsulated frames, which typically will not be
configured/spoken by the other endpoints on the VLAN trunk. This
bug may also exist in other drivers, and the additional vlan
encapsulation logic should be abstracted and centralized in
if_vlan.c if so.
RELENG_5_3 candidate.
MFC after: 1 week
Tested by: pjd, rwatson
Reported by: astesin at ukrtelecom dot net
Reported by: Mike Tancsa <mike at sentex dot net>
Reported by: Iasen Kostov <tbyte at OTEL dot net>
|
|
|
|
| |
Pointy hat to: bms
|
| |
|
|
|
|
|
| |
Reviewed by: mux
Prodded by: rwatson
|
|
|
|
|
| |
that we need to tell people about every cable in the network anymore. It can
be enabled for debugging purposes with "boot -v".
|
|
|
|
|
|
|
|
|
|
|
| |
with a weak memory model or x86 + PAE (or more specifically, your
driver is using bounce pages) and you have had problems with em(4),
this may fix it. At least this is needed to have em(4) work properly
on FreeBSD/arm.
Original version by: cognet
Reviewed by: tackerman
Tested by: cognet
|
|
|
|
|
|
|
|
|
|
| |
Since the e1000 DMA engines hava no constraints on the alignment of buffer
transfers, there is no reason to tell busdma that there is. This save a
minimum of 1 malloc call per packet, which translates to eliminating 4 locks.
It also means that buffers are not needlessly bounced when transfered. The
end result is a 38% improvement in pps in a 4 way bridging environment.
Obtained from: Sandvine, Inc.
|
|
|
|
|
|
| |
not really an error.
Submitted by: Gerrit Nagelhout
|
|
|
|
|
|
|
|
| |
This might fix some of the trouble around em(4) filling up its buffers.
Submitted by: mtm
Pointy hat to: mlaier
MFC after: 2 days
|
|
|
|
| |
reason, it results in corrupted descriptors.
|
|
|
|
|
|
|
|
|
|
|
| |
Removed support for Intel 82541ER
Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k.
Added fix for vlan tagged frames not being properly bridged.
Corrected TBI workaround.
Corrected incorrect LED operation issues
Submitted by: tackerman (Tony Ackerman)
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4),
sis(4) and xl(4)
More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take
a look and tell me if "your" driver is missing, so I can fix this.
Tested-by: many
No-objection: -current, -net
|
|
|
|
|
|
|
| |
This includes not only toggling the flag in if_capenable, but also really
reconfiguring the hardware.
Approved by: tackerman (as the em(4) maintainer)
|
| |
|
|
|
|
| |
for us.
|
|
|
|
|
|
|
| |
- since the number of supported capabilities is growing,
set bits in if_cap* in a consistent way;
- unexpand(1) leading SPACE characters.
|
|
|
|
|
|
|
|
|
| |
because VLAN hardware features are enabled in em(4) by default.
Note: Currently vlan(4) has a bug that it consults
if_capabilities, not if_capenable. This will be fixed
after all the network drivers set VLAN bits in
if_capenable properly.
|
| |
|
|
|
|
|
| |
Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde
|
|
|
|
|
|
|
| |
This should fix the issues with long *init* times when
you do ifconfig em0 alias.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
mutex to be locked. It is redundant since em_init() is called and this
correctly locks the mutex and calls em_stop().
5.2 release candidate since this can cause a panic if the watchdog
expires.
Tested by: kuriyama
|
|
|
|
|
| |
Submitted by: jroberson (Jeff Roberson)
Approved by: re (scottl)
|
|
|
|
|
|
|
|
| |
- In the receive routine handle the case where last descriptor could have
less than 4 bytes of data.
- Handle race between detach/ioctl routine.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.
Approved By: re (in principle)
Reviewed By: njl, imp
Tested On: i386, amd64, sparc64
Obtained From: NetBSD (if_xname)
|
|
|
|
|
|
|
|
|
| |
lock around a call to the original function. Make the timeout
function in callout_reset() use the wrapped function to avoid a
lock assertion panic.
Reviewed by: sam
Reported by: cgiordano@ids.net
|
|
|
|
|
|
|
|
| |
o correct recursive locking when polling and in em_82547_move_tail
o destroy mutex on detach
o add EM_LOCK_ASSERT and similar macros for creating+deleteing the mtx
Submitted by: Daniel Eischen <eischen@vigrid.com>
|
|
|
|
|
| |
Reviewed by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG>
Sponsored by: FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
| |
Bug Fixes:
- Allow users to use LAA
- Remember promiscuous mode settings while bridging
- Allow gratuitous arp's to be sent
PR: 52966/54488
MFC after: 1 week
|
|
|
|
| |
Also some minor style cleanups.
|
|
|
|
|
| |
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
recompiling the driver. See the comments near the top of "if_em.h"
for descriptions of these delays. Four new loader tunables control
the system-wide default values:
hw.em.tx_int_delay
hw.em.rx_int_delay
hw.em.tx_abs_int_delay
hw.em.rx_abs_int_delay
The tunables are specified in microseconds. The valid range is
0-67108 usec., and 0 means that the timer is disabled.
There are also four new sysctls (actually, a set of four for each
"em" device in the system) to query and change the interrupt delays
after the system is up:
hw.em0.tx_int_delay
hw.em0.rx_int_delay
hw.em0.tx_abs_int_delay (not present for 82542/3/4 adapters)
hw.em0.rx_abs_int_delay (not present for 82542/3/4 adapters)
It seems to be OK to change these values even while the adapter is
passing traffic.
Approved by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG>
MFC after: 4 weeks
|
|
|
|
| |
are not applicable to the 82544.
|