Alexander Duyck [Wed, 5 Dec 2012 06:51:29 +0000 (06:51 +0000)]
ixgbe: Inline Rx PTP descriptor handling
This change is meant to inline the Rx PTP descriptor handling. The main
motivation is to avoid unnecessary jumps into function calls that we then
immediately exit because we are not performing timestamps.
The net result of this change is that ixgbe_ptp_rx_tstamp drops from .5% CPU
utilization in my performance runs to 0%, and the only value tested is the Rx
descriptor which should already be warm in the cache if not stored in a
register.
Cc: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Jacob Keller <Jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 5 Dec 2012 07:53:38 +0000 (07:53 +0000)]
ixgbe: Fix overwriting of rx_mtrl in ixgbe_ptp_hwtstamp_ioctl
This patch corrects a bug introduced by commit
f3444d8b. The rxmtrl value for
the UDP port to timestamp on was moved above the switch statement, but was
overwritten to 0 if the ioctl selected one of the V1 filters.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Sat, 1 Dec 2012 07:57:17 +0000 (07:57 +0000)]
ixgbe: add warning when scheduling reset
This patch adds warnings when a reset of the adapter is scheduled so that the
user can see log of why the reset occurred.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 5 Dec 2012 07:24:46 +0000 (07:24 +0000)]
ixgbe: Add ptp work item to poll for the Tx timestamp
This patch copies the igb implementation of Tx timestamps, which uses a work
item to poll for the Tx timestamp. In addition it adds a timeout value of 15
seconds, after which it will stop polling.
This is necessary due to an issue with the descriptor being marked done before
the Tx timestamp event has occurred. These two events don't correlate, so using
the done bit on the descriptor as indication that the timestamp must already
have been taken leads to potentially dropped Tx timestamps (especially under
heavy packet load)
Reported-by: Matthew Vick <matthew.vick@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 5 Dec 2012 07:24:41 +0000 (07:24 +0000)]
ixgbe: Use watchdog check in favor of BPF for detecting latched timestamp
This patch removes ixgbe_ptp_match, and the corresponding packet filtering from
ixgbe driver. This code was previously causing some issues within the hotpath of
the driver. However the code also provided a check against possible frozen Rx
timestamp due to dropped packets when the Rx ring is full. This patch provides a
replacement solution based on the watchdog.
To this end, whenever a packet consumes the Rx timestamp it stores the jiffy
value in the rx_ring structure. Watchdog updates its own jiffy timer whenever
there is no valid timestamp in the registers.
If watchdog detects a valid timestamp in the registers, (meaning that no Rx
packet has consumed it yet) it will check which time is most recent, the last
time in the watchdog, or any time in the rx_rings. If the most recent "event"
was more than 5seconds ago, it will flush the Rx timestamp and print a warning
message to the syslog.
Reported-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 5 Dec 2012 07:24:35 +0000 (07:24 +0000)]
ixgbe: Update ptp_overflow check comment and jiffies
This patch fixes the comment on ptp_overflow_check to match up with what is
currently used as the parameters. Also change the jiffies check to use
time_is_after_jiffies macro.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Thu, 15 Nov 2012 01:10:37 +0000 (01:10 +0000)]
ixgbe: add missing supported filters to get_ts_info
This patch updates the filters for ethtool's get_ts_info to return support for
all filters which can be supported by upscaling to ptp_v2_event. The intent
behind this change is due to reasoning that we do in fact support the
filters. (hwtstamp_ioctl returns success after setting the filter to the
upscaled version). In this way we can remain consistent over which filters are
supported via the get_ts_info ioctl and which filters are in practice actually
supported.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Thu, 8 Nov 2012 07:07:08 +0000 (07:07 +0000)]
ixgbe: ethtool ixgbe_diag_test cleanup
This patch cleans up the ethtool diagnostics test by ensuring that the tests
work properly regardless of what state the adapter was in. The SRIOV VF check is
done at the beginning, forgoing the link test. The if_running -> dev_close is
moved before the link test, as well as a call to enable the Tx laser. This
ensures that the link test will return valid results even when adapter was
previously down. Also, a call to disable the Tx laser is added if the device
was down before the start. This ensures consistent behavior of the Tx laser
before and after the diagnostic checks. The end result is consistent behavior
regardless of device state.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
David S. Miller [Wed, 23 Jan 2013 19:00:16 +0000 (14:00 -0500)]
Merge branch 'testing' of git://git./linux/kernel/git/klassert/ipsec-next
Steffen Klassert says:
====================
1) Add a statistic counter for invalid output states and
remove a superfluous state valid check, from Li RongQing.
2) Probe for asynchronous block ciphers instead of synchronous block
ciphers to make the asynchronous variants available even if no
synchronous block ciphers are found, from Jussi Kivilinna.
3) Make rfc3686 asynchronous block cipher and make use of
the new asynchronous variant, from Jussi Kivilinna.
4) Replace some rwlocks by rcu, from Cong Wang.
5) Remove some unused defines.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Ariel Elior [Wed, 23 Jan 2013 03:21:54 +0000 (03:21 +0000)]
bnx2x: SR-IOV version compatibility bugfix
When posting a message on the bulletin board, the PF calculates crc
over the message and places the result in the message. When the VF
samples the Bulletin Board it copies the message aside and validates
this crc. The length of the message is crucial here and must be the
same in both parties. Since the PF is running in the Hypervisor and
the VF is running in a Vm, they can possibly be of different versions.
As the Bulletin Board is designed to grow forward in future versions,
in the VF the length must not be the size of the message structure
but instead it should be a field in the message itself.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:53 +0000 (03:21 +0000)]
bnx2x: Fix compilation with stop-on-error
Commit 823e1d9 caused bnx2x to fail once BNX2X_STOP_ON_ERROR is set.
Fixes compilation by moving function declarations between header files.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 23 Jan 2013 03:21:52 +0000 (03:21 +0000)]
cnic, bnx2x: Add CNIC_DRV_STATE_HANDLES_IRQ to ethdev->drv_state
In INTA mode, cnic and bnx2x share the same IRQ. During chip reset,
for example, cnic will stop servicing IRQs after it has shutdown the
cnic hardware resources. However, the shared IRQ is still active as
bnx2x needs to finish the reset. There is a window when bnx2x does
not know that cnic is no longer handling IRQ and things don't always
work properly.
Add a flag to tell bnx2x that cnic is handling IRQ. The flag is set
before the first cnic IRQ is expected and cleared when no more cnic
IRQs are expected, so there should be no race conditions.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:51 +0000 (03:21 +0000)]
bnx2x: correct memory release scheme
Fix an incorrect SR-IOV memory release which was committed in 1ab4434.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:50 +0000 (03:21 +0000)]
bnx2x: Remove many sparse warnings
Remove most of the sparse warnings in the bnx2x compilation
(i.e., thus resulting when compiling with `C=2 CF=-D__CHECK_ENDIAN__').
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:49 +0000 (03:21 +0000)]
bnx2x: Modify unload conditions
Don't unload the bnx2x driver if its in a recovery process, or if
the previous load have failed.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 23 Jan 2013 03:21:48 +0000 (03:21 +0000)]
bnx2x: Correct memory preparation and release
Since commit
15192a8cf there have been a memory leak upon rmmod
of the bnx2x driver.
This corrects the memory leak and corrects the zeroing of internal
memories upon driver load.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:47 +0000 (03:21 +0000)]
bnx2x: Add missing VFs reference in macros
Add missing 57712_VF and 57800_VF to CHIP_IS_E2 and CHIP_IS_E3
macros (missing from commit 8395be5).
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:46 +0000 (03:21 +0000)]
bnx2x: Add additional debug information
Add/Revise several debug prints in the bnx2x driver - on regular flows
as well as error flows.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:45 +0000 (03:21 +0000)]
bnx2x: correct usleep_range usage
Change the incorrect usage of `usleep_range(1000, 1000)' into
`usleep_range(1000, 2000)'.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:44 +0000 (03:21 +0000)]
bnx2x: reorganization and beautification
Slightly changes the bnx2x code without `true' functional changes.
Changes include:
1. Gathering macros into a single macro when combination is used multiple
times.
2. Exporting parts of functions into their own functions.
3. Return values after if-else instead of only on the else condition
(where current flow would simply return same value later in the code)
4. Removing some unnecessary code (either dead-code or incorrect conditions)
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Wed, 23 Jan 2013 03:21:43 +0000 (03:21 +0000)]
bnx2x: Semantic renovation
Mostly corrects white spaces, indentations, and comments.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Claudiu Manoil [Wed, 23 Jan 2013 00:18:36 +0000 (00:18 +0000)]
gianfar: Restore promisc mode on gfar_init_mac()
Reactivate promiscuous mode in H/W upon gfar_init_mac(), if the
net dev requires it (IFF_PROMISC flag set).
This way the promisc mode is preserved accross device reset conditions
like tx timeout, device restore, a.s.o.
Signed-off-by: Voncken C Acksys <cedric.voncken@acksys.fr>
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 23 Jan 2013 18:44:10 +0000 (13:44 -0500)]
Merge branch 'soreuseport'
Tom Herbert says:
====================
This series implements so_reuseport (SO_REUSEPORT socket option) for
TCP and UDP. For TCP, so_reuseport allows multiple listener sockets
to be bound to the same port. In the case of UDP, so_reuseport allows
multiple sockets to bind to the same port. To prevent port hijacking
all sockets bound to the same port using so_reuseport must have the
same uid. Received packets are distributed to multiple sockets bound
to the same port using a 4-tuple hash.
The motivating case for so_resuseport in TCP would be something like
a web server binding to port 80 running with multiple threads, where
each thread might have it's own listener socket. This could be done
as an alternative to other models: 1) have one listener thread which
dispatches completed connections to workers. 2) accept on a single
listener socket from multiple threads. In case #1 the listener thread
can easily become the bottleneck with high connection turn-over rate.
In case #2, the proportion of connections accepted per thread tends
to be uneven under high connection load (assuming simple event loop:
while (1) { accept(); process() }, wakeup does not promote fairness
among the sockets. We have seen the disproportion to be as high
as 3:1 ratio between thread accepting most connections and the one
accepting the fewest. With so_reusport the distribution is
uniform.
The TCP implementation has a problem in that the request sockets for a
listener are attached to a listener socket. If a SYN is received, a
listener socket is chosen and request structure is created (SYN-RECV
state). If the subsequent ack in 3WHS does not match the same port
by so_reusport, the connection state is not found (reset) and the
request structure is orphaned. This scenario would occur when the
number of listener sockets bound to a port changes (new ones are
added, or old ones closed). We are looking for a solution to this,
maybe allow multiple sockets to share the same request table...
The motivating case for so_reuseport in UDP would be something like a
DNS server. An alternative would be to recv on the same socket from
multiple threads. As in the case of TCP, the load across these threads
tends to be disproportionate and we also see a lot of contection on
the socket lock. Note that SO_REUSEADDR already allows multiple UDP
sockets to bind to the same port, however there is no provision to
prevent hijacking and nothing to distribute packets across all the
sockets sharing the same bound port. This patch does not change the
semantics of SO_REUSEADDR, but provides usable functionality of it
for unicast.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Tue, 22 Jan 2013 09:50:44 +0000 (09:50 +0000)]
soreuseport: UDP/IPv6 implementation
Motivation for soreuseport would be something like a DNS server. An
alternative would be to recv on the same socket from multiple threads.
As in the case of TCP, the load across these threads tends to be
disproportionate and we also see a lot of contection on the socket lock.
Note that SO_REUSEADDR already allows multiple UDP sockets to bind to
the same port, however there is no provision to prevent hijacking and
nothing to distribute packets across all the sockets sharing the same
bound port. This patch does not change the semantics of SO_REUSEADDR,
but provides usable functionality of it for unicast.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Tue, 22 Jan 2013 09:50:39 +0000 (09:50 +0000)]
soreuseport: TCP/IPv6 implementation
Motivation for soreuseport would be something like a web server
binding to port 80 running with multiple threads, where each thread
might have it's own listener socket. This could be done as an
alternative to other models: 1) have one listener thread which
dispatches completed connections to workers. 2) accept on a single
listener socket from multiple threads. In case #1 the listener thread
can easily become the bottleneck with high connection turn-over rate.
In case #2, the proportion of connections accepted per thread tends
to be uneven under high connection load (assuming simple event loop:
while (1) { accept(); process() }, wakeup does not promote fairness
among the sockets. We have seen the disproportion to be as high
as 3:1 ratio between thread accepting most connections and the one
accepting the fewest. With so_reusport the distribution is
uniform.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Tue, 22 Jan 2013 09:50:32 +0000 (09:50 +0000)]
soreuseport: UDP/IPv4 implementation
Allow multiple UDP sockets to bind to the same port.
Motivation soreuseport would be something like a DNS server. An
alternative would be to recv on the same socket from multiple threads.
As in the case of TCP, the load across these threads tends to be
disproportionate and we also see a lot of contection on the socketlock.
Note that SO_REUSEADDR already allows multiple UDP sockets to bind to
the same port, however there is no provision to prevent hijacking and
nothing to distribute packets across all the sockets sharing the same
bound port. This patch does not change the semantics of SO_REUSEADDR,
but provides usable functionality of it for unicast.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Tue, 22 Jan 2013 09:50:24 +0000 (09:50 +0000)]
soreuseport: TCP/IPv4 implementation
Allow multiple listener sockets to bind to the same port.
Motivation for soresuseport would be something like a web server
binding to port 80 running with multiple threads, where each thread
might have it's own listener socket. This could be done as an
alternative to other models: 1) have one listener thread which
dispatches completed connections to workers. 2) accept on a single
listener socket from multiple threads. In case #1 the listener thread
can easily become the bottleneck with high connection turn-over rate.
In case #2, the proportion of connections accepted per thread tends
to be uneven under high connection load (assuming simple event loop:
while (1) { accept(); process() }, wakeup does not promote fairness
among the sockets. We have seen the disproportion to be as high
as 3:1 ratio between thread accepting most connections and the one
accepting the fewest. With so_reusport the distribution is
uniform.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Tue, 22 Jan 2013 09:49:50 +0000 (09:49 +0000)]
soreuseport: infrastructure
Definitions and macros for implementing soreusport.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Wilson [Tue, 22 Jan 2013 08:08:25 +0000 (08:08 +0000)]
xen-netback: allow changing the MAC address of the interface
Sometimes it is useful to be able to change the MAC address of the
interface for netback devices. For example, when using ebtables it may
be useful to be able to distinguish traffic from different interfaces
without depending on the interface name.
Reported-by: Nikita Borzykh <sample.n@gmail.com>
Reported-by: Paul Harvey <stockingpaul@hotmail.com>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Matt Wilson <msw@amazon.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Tue, 22 Jan 2013 17:39:11 +0000 (17:39 +0000)]
netpoll: fix an uninitialized variable
Fengguang reported:
net/core/netpoll.c: In function 'netpoll_setup':
net/core/netpoll.c:1049:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
in !CONFIG_IPV6 case, we may error out without initializing
'err'.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Tue, 22 Jan 2013 17:22:07 +0000 (17:22 +0000)]
ipv6: remove duplicated declaration of ip6_fragment()
It is declared in:
include/net/ip6_route.h:187:int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
and net/ip6_route.h is already included.
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 22 Jan 2013 19:47:13 +0000 (14:47 -0500)]
Merge branch 'legacy-isa-delete' of git://git./linux/kernel/git/paulg/linux
Paul Gortmaker says:
====================
The Ethernet-HowTo was maintained for roughly 10 years, from 1993 to 2003.
Fortunately sane hardware probing and auto detection (via PCI and ISA/PnP)
largely made the document a relic of the past, hence it being abandoned
a decade ago.
However, there is one last useful thing that we can extract from the
effort made in maintaining that document. We can use it to guide us
with respect to what rare, experimental and/or super ancient 10Mbit
ISA drivers don't make sense to maintain in-tree anymore.
Nobody will argue that ISA is obsolete. Availability went away at about
the time Pentium3 motherboards moved from 500MHz Slot1/SECC processors
to the green 500MHz Socket 370 Pentium3 chips, at the turn of the century.
In theory, it is possible that someone could still be running one of these
12+ year old P3 machines and want 3.9+ bleeding edge kernels (but unlikely).
In light of the above (remote) possibility, we can defer the removal of some
ISA network drivers that were highly popular and well tested. Typically
that means the stuff more from the mid to late '90s, some with ISA PnP
support, like the 3c509, the wd/SMC 8390 based stuff, PCnet/lance etc.
But a lot of other drivers, typically from the early 1990s were for rare
hardware, and experimental (to the point of requiring a cron job that would
do a test ping, and then ifconfig down/up and/or a rmmod/insmod!). And
some of these drivers (znet, and lp486e to name two) are physically tied
to platforms with on motherboard ethernet -- of 486 machines that date
from the early 1990s and can only have single digit amounts of memory.
What I'd like to achieve here with this series, is to get rid of those old
drivers that are no longer being used. In an earlier discussion where
I'd proposed deleting a single driver, Alan suggested we instead dump
all the historical stuff in one go, to make it "...immediately obvious
where the break point is..."[1] and that it was "perfectly reasonable it
(and a pile of other ISA cards) ought to be shown the door"[2]. So that
is the goal here - make a clear line in the sand where the really ancient
stuff finally gets kicked to the curb.
Two old parallel port drivers are considered for removal here as well,
since in early 386/486 ISA machines, the parallel port was typically found
with the UARTS on the multi-I/O ISA controller card. These drivers also date
from the early 1990's; parallel ports are no longer found on modern boards,
and their performance was not even capable of 10% of 10Mbit bandwidth.
Allow me a preemptive justification against the inevitable comments from
well meaning bystanders who suggest "why not just leave all this alone?".
Dead drivers cost us all if they are left in tree. If you think that
is false, then please first consider:
-every time you type "git status", you are checking to see if modifications
have been made by you to all that dead code.
-every time you type "git grep <regex>" you are searching through files
which contain that dead code that simply does not interest you.
-every time you build a "allyesconfig" and an "allmodconfig" (don't tell
me you skip this step before submitting your changes to a maintainer),
you waste CPU cycles building this dead code.
-every time there is a tree wide API change, or cleanup, or file relocation,
we pay the cost of updating dead code, or moving dead code.
-daily regression tests (take linux-next as the most transparent
example) spend time building (and possibly running) this dead code.
-hard working people who regularly run auditing tools looking for lurking
bugs (sparse/coverity/smatch/coccinelle) are wasting time checking for,
and fixing bugs in this dead code.
This last one is key. Please take a look at the git history for the
files that are proposed for removal here. Look at the git history for
any one of them ("git whatchanged --follow drivers/net/.../driver.c")
Mentally sort the changes into two bins -- (1) the robotic tree-wide
changes, and (2) the "look I found a real run-time bug while using this"
category. You will see that category #2 is essentially empty.
Further to that, realize that drivers don't simply disappear. We are
not operating in the binary-only distribution space like other OS. All
these drivers remain in the git history forever. If a person is an
enthusiast for extreme legacy hardware, they are probably already
customizing their kernel source and building it themselves to support
such systems. Also keep in mind that they could still build the 3.8
kernel exactly as-is, and run it (or a 3.8.x stable variant of it) for
several more years if they were really determined to cling to these old
experimental ISA drivers for some reason.
In summary, I hope that folks can be pragmatic about this, and not
get swept up in nostalgia. Ask yourself whether it is realistic to
expect a person would have a genuine use case where they would
need to build a 3.9+ modern kernel and install it on some legacy hardware
that has no option but to absolutely _require_ one of the drivers
that are deleted here.
The following series was created with --irreversible-delete for
ease of review (it skips showing the content of files that are
deleted); however the complete patches can be pulled as per below.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:33:09 +0000 (06:33 +0000)]
netfilter: Use IS_ERR_OR_NULL().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:54 +0000 (06:32 +0000)]
ipv6: Use IS_ERR_OR_NULL().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:49 +0000 (06:32 +0000)]
ipv4: Use IS_ERR_OR_NULL().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:44 +0000 (06:32 +0000)]
net: Use IS_ERR_OR_NULL().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 05:20:05 +0000 (05:20 +0000)]
neigh: Keep neighbour cache entries if number of them is small enough.
Since we have removed NCE (Neighbour Cache Entry) reference from
routing entries, the only refcnt holders of an NCE are its timer
(if running) and its owner table, in usual cases. As a result,
neigh_periodic_work() purges NCEs over and over again even for
gateways.
It does not make sense to purge entries, if number of them is
very small, so keep them. The minimum number of entries to keep
is specified by gc_thresh1.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Tue, 22 Jan 2013 10:18:03 +0000 (11:18 +0100)]
ipmr: fix sparse warning when testing origin or group
mfc_mcastgrp and mfc_origin are __be32, thus we need to convert INADDR_ANY.
Because INADDR_ANY is 0, this patch just fix sparse warnings.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Tue, 22 Jan 2013 00:13:26 +0000 (19:13 -0500)]
drivers/net: delete old x86 variant of the seeq8005 driver
The last update to the Ethernet HowTo (over 10 years ago) listed this:
------------------------
SEEQ 8005
Status: Obsolete, Driver Name: seeq8005
There is little information about the card included in the driver,
and hence little information to be put here. If you have a question,
you are probably best trying to e-mail the driver author as listed
in the source.
It was marked obsolete as of the 2.4 series kernels.
------------------------
If it was obsolete over a decade ago, the situation can not have
improved with the passage of time, so let us act on that. Even with
today's improved search engines, I was unable to locate any real
meaningful information on the ISA implementation of this rare chip.
There are ARM and SGI variants of the driver in tree, but they do
not depend on the original x86 driver source or header file. We
leave those non-x86 drivers to be deleted by the arch maintainers
when they decide to expire those legacy platforms as a whole.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 20 Jan 2013 22:14:45 +0000 (17:14 -0500)]
drivers/net: delete Digital EtherWorks-3 support.
This is another one that makes sense to target for obsolescence, since
it (a)appeared pre-1995, and (b)was rather rare, and (c)did not
really have any statistically significant active linux user base.
Removing this ISA 10Mbit driver support is unlikely to be even noticed
by the user base of 3.9+ linux kernels, especially when the documentation
clearly indicates the vintage with this text:
"...designed to work with all kernels > 1.1.33"
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 17 Jan 2013 00:32:34 +0000 (19:32 -0500)]
drivers/net: delete old DEC depca ISA drivers support.
These are old ISA 10Mbit cards from the 1st 1/2 of the 1990s and
required manual jumper settings in order to configure them. Here
we remove them on the premise that they are no longer used in any
modern 3.9+ kernels.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Tue, 15 Jan 2013 01:32:46 +0000 (20:32 -0500)]
drivers/net: delete the really obsolete 8390 based 10Mbit ISA drivers
This is an area I know all too well, after being author of several 8390
drivers, and maintainer of all 8390 drivers during a large part of their
active lifecycle.
To that end, I can say this with a reasonable degree of confidence.
The drivers deleted here represent the earliest (as in early 1990)
hardware and/or rare hardware. The remaining hardware not deleted
here is the more modern/sane of the lot, with ISA-PnP and jumperless
"soft configuration" like the wd and smc cards had.
The original ne2000 driver (ne.c) gets a pass at this time since
AT/LANTIC based cards that could be both ne2000 or wd-like (with
shared memory) and with jumperless configuration were made in the
mid to late 1990's, and performed reasonably well for their era.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Mon, 14 Jan 2013 00:41:14 +0000 (19:41 -0500)]
drivers/net: delete old fujitsu based eth16i driver
This is another driver for relatively rare 10Mbit hardware that
originated in the early 1990's. So we select it for removal at
this point in time as well.
Cc: Mika Kuoppala <miku@iki.fi>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Fri, 11 Jan 2013 00:19:43 +0000 (19:19 -0500)]
drivers/net: delete at1700 ISA 10Mbit driver
These Fujitsu MB86965 based ISA 10Mbit cards were another of the
relatively rare cards dating from the early 1990s that for one reason
or another didn't seem to get a lot of use in linux. So we retire it
now with a reasonable degree of confidence that it won't impact anyone.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 23:25:04 +0000 (18:25 -0500)]
drivers/net: delete old 8 bit ISA Racal ni5010 support.
These cards were only available in 8bit format, and in addition
they only had AUI and BNC(10-Base2) interfaces (i.e. no RJ-45).
In fact, they are so rare, that an internet search on these old
cards almost comes up empty, unless the "Micom interlan" name
is used.
This puts them in the equivalent domain as the 3c501, so there
should be no strong opposition to the driver removal, as nobody
is seriously using 3.9+ with 8 bit ISA hardware.
In doing so, the whole "ethernet/racal" category becomes empty,
so we clean up the Makefile/Kconfig and subdir appropriately.
Cc: Andreas Mohr <andi@lisas.de>
Cc: Jan-Pascal van Best <janpascal@vanbest.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 23:12:04 +0000 (18:12 -0500)]
drivers/net: delete Racal Interlan ISA ni52 (i825xx) driver
Like the other drivers that were in the ISA i825xx family, the ni52
was rather rare, not widely used, and hence perhaps not as reliable
as the more mainstream ISA drivers that were heavily used. Given
that, it is chosen for retirement at this time as well.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 23:09:44 +0000 (18:09 -0500)]
drivers/net: delete intel i825xx based znet notebook driver
This driver supported early to mid 1990's Zenith laptops, of the
2" thick variety. The driver was already dead 10+ years ago, but
we see this in the source:
----------------
/* 10/2002
[...]
Tested on a vintage Zenith Z-Note 433Lnp+. Probably broken on
anything else. Testers (and detailed bug reports) are welcome :-).
----------------
To clarify, a 433 translates into a 486 at 33MHz, and a system with
a default of 4MB RAM. I can't fault the noble effort to keep things
working a decade ago, but at this point in time, there is no valid
justification to continue carrying this driver along.
Note that there is no associated Space.c cleanup here since this
driver was using module_init to hook itself in.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 02:01:40 +0000 (21:01 -0500)]
drivers/net: delete ISA intel eexpress and eepro i825xx drivers
These old drivers should not be confused with the very common PCI
cards that are supported by e100.c -- these older 10Mbit ISA only
drivers were not as commonly used as some of the other ISA drivers,
simply due to hardware availability and pricing.
Given the rarity of the hardware, and the subsequent less extensive
use of the drivers, it makes sense to obsolete them at this point
in time, along with other rare/experimental ISA drivers.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:51:58 +0000 (20:51 -0500)]
drivers/net: delete the 3Com 3c505/3c507 intel i825xx support
For those of us who were around in the early to mid 1990's, we
will remember that the i825xx ethernet support was not something
that was considered sufficiently vetted for 24/7 use.
Folks might be inclined to use *functional* ISA hardware on some
near expired P3 ISA machines for dedicated workhorse applications,
but the odds of using (and relying on) one of these old/experimental
drivers is essentially nil. So lets remove them.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:30:26 +0000 (20:30 -0500)]
drivers/net: delete old parallel port de600/de620 drivers
The parallel port is largely replaced by USB, and even in the
day where these drivers were current, the documented speed was
less than 100kB/s. Let us not pretend that anyone cares about
these drivers anymore, or worse - pretend that anyone is using
them on a modern kernel.
As a side bonus, this is the end of legacy parallel port ethernet,
so we get to drop the whole chunk relating to that in the legacy
Space.c file containing the non-PCI unified probe dispatch.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:25:05 +0000 (20:25 -0500)]
drivers/net: delete old 8bit ISA 3c501 driver.
It was amusing that linux was able to make use of this 1980's
technology on machines long past its intended lifespan, but
it probably should go now.
To set some context, the 3c501 was designed in the 1980's to be
used on 8088 PC-XT 8bit ISA machines. It was built using a large
number of discrete TTL components and truly looks like a relic
of the ancient past before large scale integration was common.
But from a functional point of view, the real issue, as stated
in the (also obsolete) Ethernet-HowTo, is that "...the 3c501 can
only do one thing at a time -- while you are removing one packet
from the single-packet buffer it cannot receive another packet,
nor can it receive a packet while loading a transmit packet."
You know things are not good when the Kconfig help text suggests
you make a cron job doing a ping every minute.
Hardware that old and crippled is simply not going to be used by
anyone in a time where 10 year old 100Mbit PCI cards (that are
still functional) are largely give-away items.
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Wed, 9 Jan 2013 03:11:54 +0000 (22:11 -0500)]
drivers/net: delete intel 486 panther onboard ethernet support
This driver was specific to a "professional workstation" line
of products from around 1993 that used the i82596 ethernet chip
as an on-board ethernet solution.
With a 486 processor, and the premium top of the line model maxing
out at a clock speed of 50MHz, we can safely retire this support.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Wed, 9 Jan 2013 03:00:39 +0000 (22:00 -0500)]
drivers/net: delete 486 Apricot support
The Apricot was a 486 PC with 4MB RAM, and an on-board ethernet
via an intel i82596 hard-wired to i/o 0x300.
Those who were using linux in the 1990's will recall that the
i82596 driver was not one of the more stable or widely used
drivers of its day. Combine that with the extremely limited
resources of the platform, and it is truly time to expire the
support for this thing.
There are some old m68k targets who were also using this chip,
so rather than poll the m68k user base, we simply cut out the
x86/Apricot support here in this commit.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:21 +0000 (11:57 +0000)]
isdn/gigaset: beautify ev-layer.c
Cosmetic changes to drivers/isdn/gigaset/ev-layer.c and
drivers/isdn/gigaset/gigaset.h to improve readability.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:21 +0000 (11:57 +0000)]
isdn/gigaset: beautify common.c
Rearrange the gigaset_freecs() function to make it more readable,
and adapt gigaset_initcs() accordingly.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/gigaset: beautify interface.c
Avoid forward declarations and remove a needless initialization.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/gigaset: leave DLE mode before hanging up
Some firmware releases of Gigaset M105 do not accept AT+VLS=0 command
in DLE mode, so always leave DLE mode before sending the command.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/divert: fix readability damage
Fix up some of the readibility deterioration caused by last year's
ISDN whitespace coding style cleanup.
Note that the checkpatch complaints all apply to the state of the
source before this patch as well, and in many cases even more so.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Mon, 21 Jan 2013 03:02:48 +0000 (03:02 +0000)]
drivers/net/ethernet/sfc/ptp.c: adjust duplicate test
Delete successive tests to the same location. rc was previously tested and
not subsequently updated. efx_phc_adjtime can return an error code, so the
call is updated so that is tested instead.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
{ ... when forall
return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
{ ... when forall
return ...; }
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 09:58:50 +0000 (09:58 +0000)]
ndisc: Do not try to update "updated" time if neighbour has already gone.
Commit
2152caea ("ipv6: Do not depend on rt->n in rt6_probe().")
introduce a bug to try to update "updated" time in neighbour
structure.
Update the "updated" time only if neighbour is available.
Bug was found by Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 20:40:47 +0000 (15:40 -0500)]
Merge branch 'dsa'
Florian Fainelli says:
====================
These two patches are non-critical bugfixes based on net-next which I
stumbled upon while working on Device Tree bindings for DSA (will comme
as a separate patch later).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Mon, 21 Jan 2013 09:58:51 +0000 (09:58 +0000)]
dsa: make dsa_switch_setup check for valid port names
This patch changes dsa_switch_setup() to ensure that at least one valid
valid port name is specified and will bail out with an error in case we
walked the maximum number of port with a valid port name found.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Mon, 21 Jan 2013 09:58:50 +0000 (09:58 +0000)]
dsa: use an unique and non conflicting bus name for the slave MII bus
The slave MII bus registered by the DSA code is using the parent MII bus
as part of its name (ds->master_mii_bus_id), in case the parent MII bus
name is already 16 characters long (such as
d0072004.mdio-mi) we will
get the following WARN_ON in dsa_switch_setup() when calling
mdiobus_register():
[ 79.088782] ------------[ cut here ]------------
[ 79.093448] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x80/0xa0()
[ 79.099831] sysfs: cannot create duplicate filename
'/class/mdio_bus/
d0072004.mdio-mi'
This is a genuine warning, because the DSA slave MII bus will also be
named
d0072004.mdio-mi, and since MII_BUS_ID_SIZE is 17 characters long
(with null-terminator) the following will truncate the slave MII bus id:
snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "%s-%d:%.2x",
ds->master_mii_bus->id, ds->pd->sw_addr);
Fix this by using dsa-<switch index->:<sw_add> which is guaranteed to be
unique.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Mon, 21 Jan 2013 00:39:24 +0000 (00:39 +0000)]
net: move rx and tx hash functions to net/core/flow_dissector.c
__skb_tx_hash() and __skb_get_rxhash() are all for calculating hash
value based by some fields in skb, mostly used for selecting queues
by device drivers.
Meanwhile, net/core/dev.c is bloating.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 19:14:09 +0000 (14:14 -0500)]
Merge branch 'virtio_mac'
Amos Kong says:
====================
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Third patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle
V5: rebase patches to net-next tree
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Amos Kong [Mon, 21 Jan 2013 01:17:23 +0000 (01:17 +0000)]
virtio-net: introduce a new control to set macaddr
Currently we write MAC address to pci config space byte by byte,
this means that we have an intermediate step where mac is wrong.
This patch introduced a new control command to set MAC address,
it's atomic.
VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Hajnoczi [Mon, 21 Jan 2013 01:17:22 +0000 (01:17 +0000)]
net: split eth_mac_addr for better error handling
When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.
This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amos Kong [Mon, 21 Jan 2013 01:17:21 +0000 (01:17 +0000)]
move virtnet_send_command() above virtnet_set_mac_address()
We want to send vq command to set mac address in
virtnet_set_mac_address(), so do this function moving.
Fixed a little issue of coding style.
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 19:06:34 +0000 (14:06 -0500)]
Merge branch 'mcast'
Nicolas Dichtel says:
====================
The goal of this serie is to add the support of proxy multicast, ie being able
to build a static multicast tree. In other words, it adds the support of (*,G)
mf[6]c entries.
v2: use INADDR_ANY instead of 0 for IPv4 addresses
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:26 +0000 (06:00 +0000)]
mcast: add multicast proxy support (IPv4 and IPv6)
This patch add the support of proxy multicast, ie being able to build a static
multicast tree. It adds the support of (*,*) and (*,G) entries.
The user should define an (*,*) entry which is not used for real forwarding.
This entry defines the upstream in iif and contains all interfaces from the
static tree in its oifs. It will be used to forward packet upstream when they
come from an interface belonging to the static tree.
Hence, the user should define (*,G) entries to build its static tree. Note that
upstream interface must be part of oifs: packets are sent to all oifs
interfaces except the input interface. This ensures to always join the whole
static tree, even if the packet is not coming from the upstream interface.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:25 +0000 (06:00 +0000)]
mcast: define and use MRT[6]_MAX in ip[6]_mroute_opt()
This will ease further addition of new MRT[6]_* values and avoid to update
in6.h each time.
Note that we reduce the maximum value from 210 to 209, but 210 does not match
any known value in ip[6]_mroute_setsockopt().
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Mon, 21 Jan 2013 06:17:41 +0000 (06:17 +0000)]
Documentation: remove obsolete networking/multicast.txt file
The original intent of this file was to list limitations in
drivers/hardware relating to multicast use, back when some
modest hardware from the early 1990s did not support things
we might take for granted today.
I was intending to delete some now-gone MCA/token ring entries
in this file, but once I opened it, I found it only contained
information on the earliest (pre-2000) linux networking drivers.
Checking the git history shows that the file hasn't been touched
since 2005. Clearly nobody is actively consulting this file
as a meaningful reference.
Rather than add a "YES YES YES" line for all of the drivers we
currently have, lets just take advantage of the fact that nobody
is using the file to delete it.
This has the side benefit of not having to do a line-by-line
deletion of the file content as each older driver is expired.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 18:51:24 +0000 (13:51 -0500)]
Merge branch 'qeth'
Merge s390 networking changes from Frank Blaschka.
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:23 +0000 (02:30 +0000)]
qeth: Fix HiperSockets performance regression
Commit
46d3ceab "tcp: TCP Small Queues" has severly degraded
performance for single connection RR workloads on HiperSockets with
MTU >=16K due to a conflict of the TCP Small Queues approach with our
buffer scan threshold which releases buffers not frequently enough yet.
This fix restores performance to the same level as before cited commit.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:22 +0000 (02:30 +0000)]
qeth: Make s390dbf card entries persistent
As of now, s390dbf entries for the cards are discarded as soon as the
device is removed. However, this will also bar us of all chances of
getting valuable debug information after a device has been removed.
This patch will keep the s390dbf entries around until the qeth module
is removed.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:21 +0000 (02:30 +0000)]
qeth: Update Kconfig wording
Refer to virtual NICs instead of GuestLANs.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:20 +0000 (02:30 +0000)]
qeth: Support VEPA mode
The existing port isolation mode 'forward' will now verify that the adjacent
switch port supports the required reflective relay (RR) mode. This patch adds
the required error handling for the cases where enabling port isolation mode
'forward' can now fail.
Furthermore, once established, we never fall back from one of the port
isolation modes to a non-isolated mode without further user-interaction.
This includes cases where the isolation mode was enabled successfully, but
ceases to work e.g. due to configuration changes at the switch port.
Finally, configuring an isolation mode with the device being offline
will make onlining the device fail permanently upon errors encountered until
either errors are resolved or the isolation mode is changed by the user to a
different mode.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:19 +0000 (02:30 +0000)]
qeth: Remove unused exports
Remove exports that are not used anywhere else.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:18 +0000 (02:30 +0000)]
qeth: Fix retry logic in hardsetup
The previous code did never retry any idx setup unless retries were done
for device offline/online at the beginning of the function.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 18:50:10 +0000 (13:50 -0500)]
Merge branch 'ipv6_ndisc'
YOSHIFUJI Hideaki says:
====================
This series of changes basically clean up NDISC logic,
especially on sender side.
We originally do For NS/NA/RS:
1) build temporary ICMPv6 header
2) ndisc_build_skb() with temporary ICMPv6 header and rather
criptic arguments.
- Calculate total length and allocate sk_buff
- Build IPv6 header.
- copy ICMPv6 header, additional data and ND options.
- Fill-in ICMPv6 checksum.
Here, structures defined for message format was not used
at all, it is difficult to understand what is being sent,
and it was not generic.
3) __ndisc_send()
- Allocate temporary dst.
- Send it.
Several issues:
- We could not defer decision if we should/can send some ND
option.
- It is hard to see the packet format at a glance.
- ICMPv6 header was built as temporary variable, and then
copied to the buffer.
- Some code path for Redirect was not shared.
With these patches, we do:
1) Calculate (or estimate) message length and option length.
2) Allocate skb (via new ndisc_skb_alloc()).
3) Fill-in ICMPv6 message directly using compound literals.
4) Fill-in ICMPv6 checksum
5) Build IPv6 header (including length)
6) Send the packet (via ndisc_send_skb()).
- allocate temporary dst and send it.
- We can defer calculating real length of the packet.
For example, we can give up filling some option at when
filling in.
- Message is built directly without temporary buffer.
- Structures defined for message format is easier to understand
what is being built.
- NS/NA/RS/Redirect share same logic.
- Reduced code/data size:
text data bss dec hex filename
265407 14133 3488 283028 45194 old/net/ipv6/ipv6.o
264955 14109 3488 282552 44fb8 new/net/ipv6/ipv6.o
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:25 +0000 (06:49 +0000)]
ndisc: Use compound literals to build redirect message.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:17 +0000 (06:49 +0000)]
ndisc: Break down ndisc_build_skb() and build message directly.
Construct NS/NA/RS message directly using C99 compound literals.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:13 +0000 (06:49 +0000)]
ndisc: Break down __ndisc_send().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:08 +0000 (06:49 +0000)]
ndisc: Fill in ICMPv6 checksum and IPv6 header in ndisc_send_skb().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:03 +0000 (06:49 +0000)]
ndisc: Use ndisc_send_skb() for redirect.
Reuse dst if one is attached with skb.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:58 +0000 (06:48 +0000)]
ndisc: Remove icmp6h argument from ndisc_send_skb().
skb_transport_header() (thus icmp6_hdr()) is available here,
use it.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:53 +0000 (06:48 +0000)]
ndisc: Make ndisc_fill_xxx_option() for sk_buff.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:49 +0000 (06:48 +0000)]
ndisc: Calculate message body length and option length separately.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:44 +0000 (06:48 +0000)]
ndisc: Reset skb->trasport_headner inside ndisc_alloc_send_skb().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:39 +0000 (06:48 +0000)]
ndisc: Defer building IPv6 header.
Build ICMPv6 message first and make buffer management easier;
we can use skb->len when filling checksum in ICMPv6 header,
and then build IP header with length field.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:34 +0000 (06:48 +0000)]
ndisc: Remove dev argument for ndisc_send_skb().
Since we have skb->dev, use it.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:29 +0000 (06:48 +0000)]
ndisc: Set skb->dev and skb->protocol inside ndisc_alloc_skb().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:24 +0000 (06:48 +0000)]
ndisc: Simplify arguments for ip6_nd_hdr().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:19 +0000 (06:48 +0000)]
ipv6: Unshare ip6_nd_hdr() and change return type to void.
- move ip6_nd_hdr() to its users' source files.
In net/ipv6/mcast.c, it will be called ip6_mc_hdr().
- make return type to void since this function never fails.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:14 +0000 (06:48 +0000)]
ndisc: Introduce ndisc_alloc_skb() helper.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:09 +0000 (06:48 +0000)]
ndisc: Introduce ndisc_fill_redirect_hdr_option().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:03 +0000 (06:48 +0000)]
ndisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).
Suggested by Eric Dumazet <edumazet@google.com>.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:47:56 +0000 (06:47 +0000)]
ndisc: Move ndisc_opt_addr_space() to include/net/ndisc.h.
This also makes ndisc_opt_addr_data() and ndisc_fill_addr_option()
use ndisc_opt_addr_space().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:47:50 +0000 (06:47 +0000)]
ndisc: Reduce number of arguments for ndisc_fill_addr_option().
Add pointer to struct net_device (dev) and remove
data_len (= dev->addr_len) and addr_type (= dev->type).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thierry Reding [Mon, 21 Jan 2013 09:38:39 +0000 (10:38 +0100)]
net: ethernet: davinci: Fix build breakage
The correct name of the transmit DMA channel field in struct emac_priv
is txchan, not txch.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: David S. Miller <davem@davemloft.net>