Commit Graph

415032 Commits

Author SHA1 Message Date
wangweidong b055597697 tipc: make the code look more readable
In commit 3b8401fe9d ("tipc: kill unnecessary goto's") didn't make
the code look most readable, so fix it. This patch is cosmetic
and does not change the operation of TIPC in any way.

Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02 03:30:35 -05:00
Zhi Yong Wu fbe4d4565b tun, rfs: fix the incorrect hash value
The code incorrectly save the queue index as the hash, so this patch
is fixing it with the hash received in the stack receive path.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02 02:41:22 -05:00
Salam Noureddine 56022a8fdd ipv4: arp: update neighbour address when a gratuitous arp is received and arp_accept is set
Gratuitous arp packets are useful in switchover scenarios to update
client arp tables as quickly as possible. Currently, the mac address
of a neighbour is only updated after a locktime period has elapsed
since the last update. In most use cases such delays are unacceptable
for network admins. Moreover, the "updated" field of the neighbour
stucture doesn't record the last time the address of a neighbour
changed but records any change that happens to the neighbour. This is
clearly a bug since locktime uses that field as meaning "addr_updated".
With this observation, I was able to perpetuate a stale address by
sending a stream of gratuitous arp packets spaced less than locktime
apart. With this change the address is updated when a gratuitous arp
is received and the arp_accept sysctl is set.

Signed-off-by: Salam Noureddine <noureddine@aristanetworks.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02 00:08:38 -05:00
stephen hemminger e82435341f ipv6: namespace cleanups
Running 'make namespacecheck' shows:
  net/ipv6/route.o
    ipv6_route_table_template
    rt6_bind_peer
  net/ipv6/icmp.o
    icmpv6_route_lookup
    ipv6_icmp_table_template

This addresses some of those warnings by:
 * make icmpv6_route_lookup static
 * move inline's out of ip6_route.h since only used into route.c
 * move rt6_bind_peer into route.c

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:46:09 -05:00
stephen hemminger 1d143d9f0c net: core functions cleanup
The following functions are not used outside of net/core/dev.c
and should be declared static.

  call_netdevice_notifiers_info
  __dev_remove_offload
  netdev_has_any_upper_dev
  __netdev_adjacent_dev_remove
  __netdev_adjacent_dev_link_lists
  __netdev_adjacent_dev_unlink_lists
  __netdev_adjacent_dev_unlink
  __netdev_adjacent_dev_link_neighbour
  __netdev_adjacent_dev_unlink_neighbour

And the following are never used and should be deleted
  netdev_lower_dev_get_private_rcu
  __netdev_find_adj_rcu

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:46:09 -05:00
stephen hemminger 2173f8d953 netlink: cleanup tap related functions
Cleanups in netlink_tap code
 * remove unused function netlink_clear_multicast_users
 * make local function static

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:43:36 -05:00
stephen hemminger 6da67d2608 bonding: make more functions static
More functions in bonding that can be declared static because
they are only used in one file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:43:36 -05:00
stephen hemminger 3678a9d863 netlink: cleanup rntl_af_register
The function __rtnl_af_register is never called outside this
code, and the return value is always 0.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:42:19 -05:00
stephen hemminger 47d1f71f56 stmicro: make local variables static
Make variables only used in one file static. Also avoids possible
namespace collisions.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:42:19 -05:00
David S. Miller 8e769788b3 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series implements the Linux Virtual Function (VF) driver for
the Intel Ethernet Controller XL710 family.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 23:01:28 -05:00
David S. Miller 8169d10cd9 Merge branch 'bonding'
Ding Tianhong says:

====================
bonding: slight optimization for bonding

This serious of patches will slight optimize the mac address compare
and xmit path for bonding, also make some cleanups.

Julia was using ether_addr_equal_64bits to instead of ether_addr_equal,
it is really a hard work and she may did not make patch for bonding yet,
so I have do it in this patchset and that she could miss the bonding drivers.

resend and add cc for Julia.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:59:13 -05:00
dingtianhong 844223abe9 bonding: use ether_addr_equal_64bits to instead of ether_addr_equal
The net_device.dev_addr have more than 2 bytes of additional data after
the mac addr, so it is safe to use the ether_addr_equal_64bits().

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:55 -05:00
dingtianhong 359632e544 bonding: remove the return value for bond_3ad_bind_slave()
I'm sure the operand slave and bond for the function will not
be NULL, so the check for the bond will not make any sense, so
remove the judgement, and the return value was useless here,
remove the unwanted return value.

The comments for the bond 3ad is too old, cleanup some errors
and warming.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:55 -05:00
dingtianhong d316dedd4d bonding: remove unwanted return value for bond_dev_queue_xmit()
The return value for bond_dev_queue_xmit() will not be used anymore,
so remove the return value.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:55 -05:00
dingtianhong 3900f29021 bonding: slight optimizztion for bond_slave_override()
When the skb is xmit by the function bond_slave_override(),
it will have duplicate judgement for slave state, and I think it
will consumes a little performance, maybe it is negligible,
so I simplify the function and remove the unwanted judgement.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:15 -05:00
dingtianhong 4d4ac1b092 bonding: slight optimization for bond_alb_xmit()
The bond_alb_xmit will check the return value for
bond_dev_queue_xmit() every time, but the bond_dev_queue_xmit()
is always return 0, it is no need to check the value every time,
so remove the unneed judgement for the xmit path.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:15 -05:00
dingtianhong a742e1f545 bonding: slight optimization for bond_3ad_xmit_xor()
The bond_dev_queue_xmit() will always return 0, and as a fast path,
it is inappropriate to check the res value when xmit every package,
so remove the res check and avoid once judgement for xmit.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:15 -05:00
dingtianhong 815117adaf bonding: use ether_addr_equal_unaligned for bond addr compare
Use possibly more efficient ether_addr_equal_64bits
to instead of memcmp.

Modify the MAC_ADDR_COMPARE to MAC_ADDR_EQUAL, this looks more
appropriate.

The comments for the bond 3ad is too old, cleanup some errors
and warming.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:58:15 -05:00
David S. Miller 4b903e30bb Merge branch 'r8152'
Hayes Wang says:

====================
support new chip

Remove the trailing "/* CRC */" for patch #3.

Change the return value type of rtl_ops_init() from int to boolean
for patch #4.

Replace VENDOR_ID_SAMSUNG with SAMSUNG_VENDOR_ID for patch #6.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:40 -05:00
hayeswang 43779f8dfb r8152: support RTL8153
Support new chip RTL8153 which is the USB 3.0 giga ethernet adapter.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:15 -05:00
hayeswang 507605a835 r8152: split rtl8152_enable
Split the contents of rtl8152_enable() into rtl_set_eee_plus() and
rtl_enable().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:15 -05:00
hayeswang c81229c9d1 r8152: add rtl_ops
The different chips may have different settings. This makes it easy
to let different chips have the same flow with differnt settings.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:15 -05:00
hayeswang 8e1f51bd6a r8152: change some definitions
Replace RX_BUF_THR with RX_THR_HIGH.
Replace RWSUME_INDICATE with RESUME_INDICATE.
Add CRC_SIZE, TX_ALIGN, and RX_ALIGN.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:15 -05:00
hayeswang ac244d3ee7 r8152: modify the method of accessing PHY
The old method to access PHY is through mdio channel. Replace it
with the OCP channel.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:14 -05:00
hayeswang e3fe0b1a54 r8152: move rtl8152_unload and ocp_reg_write
Change the locations of rtl8152_unload() and ocp_reg_write().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:54:14 -05:00
David S. Miller 63d515c319 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:

====================
pull request: wireless-next 2014-01-01

These patches were tucked-in with me for my long winter's nap!
Please pull them for the 3.14 stream...

For the mac80211 bits, Johannes says:

"Here I just have a collection of fixes/improvements/cleanups, very
little really stands out apart from CSA fixes, vendor command support
and the RCU speedups."

For the iwlwifi bits, Emmanuel says:

"I have hear quite a few things. Alex continues his work on power
management. Arik is reworking the transport API by unifying redudant
APIs and making error handling more generic. Eyal keeps on digging in
the rate scaling code.
We also have two new features - Max is using the brand new generic
cipher infrastructure in mac80211, and Lilach implements the smart fifo
which allows to save power by making interrupt coalescing smarter."

Along with those, Arend and company bring a batch of brcmfmac.
Sujith and Felix bring the usual high level of ath9k activity as well.
Bing gives mwifiex some love as well, and a handful of other bits
get updates here and there.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:16:57 -05:00
Eddie Wai d15e2a92c4 cnic: Add a signature to indicate valid doorbell offset.
The buffer that is used to pass doorbell offset to the userspace UIO
driver may contain nonzero value in older versions of bnx2x driver.
Userspace cannot easily tell whether it contains a valid doorbell
offset or not.  With the added signature, userspace will only use
the doorbell offset if the signature is present.

Update version to 2.5.19.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:08:08 -05:00
Michael Chan 487d9edcd2 bnx2: Update version to 2.2.5.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:03:38 -05:00
Michael Chan 4016baddac bnx2: Report MDI/MDIX status to ethtool.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:03:38 -05:00
Michael Chan 41033b65b9 bnx2: Enable auto-mdix when autoneg is disabled.
Auto-mdix currently only works if autoneg is enabled.  This patch enables
auto-mdix all the time by setting a bit in a PHY register.  Define
meaningful constants for this PHY registers.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:03:38 -05:00
Michael Chan d17e53bdcd bnx2: Advertise nothing when speed is forced
The current code does not reset the advertisement register when the speed
is forced, leaving the default advertisement value of 10 Mbps.  This does
not work with some link partners when the next patch enables auto-mdix.

Set advertisement register to 0 if the speed is forced.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01 22:03:37 -05:00
John W. Linville ad86c55bac Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-01-01 15:39:56 -05:00
Greg Rose 90327e7dff i40evf: A0 silicon specific
A0 stepping silicon specific code

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 16:39:42 -08:00
Greg Rose 105bf2fe6b i40evf: add driver to kernel build system
Modify the existing Kconfig, Makefile, and MAINTAINERS to add the driver
to the kernel. Add a Makefile and a documentation

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 16:27:49 -08:00
Greg Rose d358aa9a7a i40evf: init code and hardware support
This patch implements the hardware specific init and management.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 16:18:25 -08:00
Greg Rose 5321a21c1c i40evf: driver core headers
This patch contains the main driver header files, containing structures
and data types specific to the linux driver.

i40e_osdep.h contains some code that helps us adapt our OS agnostic code
to Linux.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 16:09:05 -08:00
Greg Rose 62683ab51e i40evf: virtual channel interface
This PCI-E SR-IOV virtual function (VF) driver is dependant upon the
physical function (PF) driver (i40e) for nearly all of its hardware
configuration. Requests from the VF driver are passed to the PF using
the hardware's Admin Queue.

This patch contains the functionality for communicating with the PF
driver. Because of the delay inherent in this communications channel,
most of the replies from the PF driver are handled asynchronously. The
exceptions are the "send API version" and "get VF config" messages,
which busy-wait because they are done so early during init that
interrupts are not yet configured.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 16:01:28 -08:00
Greg Rose fbb7ddfef2 i40evf: core ethtool functionality
This patch contains the ethtool interface and related functionality.
Since the VF driver is mostly unaware of link, much of that
functionality is unused. The driver implements ethtool hooks for
statistics, driver info, and some basic non-link-related driver
settings.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 15:52:57 -08:00
Greg Rose 7f12ad741a i40evf: transmit and receive functionality
This file contains the transmit, receive, and NAPI functionality.

Some of the functions in this module are extracted from the i40e driver
but functions that are not appropriate for virtual function devices have
been removed.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 15:45:23 -08:00
Greg Rose 5eae00c57f i40evf: main driver core
This is the driver for the Intel(R) XL710 X710 Virtual Function.

This patch contains the main driver entry points, but does not include
transmit and receive or ethtool functionality, which are presented as
separate patches in this series.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31 15:37:03 -08:00
David S. Miller e971522864 Merge branch 'addr_compare'
Ding Tianhong says:

====================
slight optimization of addr compare for net modules

This is the second patchset for slight optimization of address compare,
mainly for net tree, just following the Joe's opinion, it will help review
the code for maintainers and supports.

v2: Change some style for patch 2.
    According Eric's suggestion, use the ether_addr_equal_64bits to instead
    of ether_addr_equal for patch 19.
    In fact, there are a lot of places which could use ether_addr_equal_64bits
    to instead of ether_addr_equal, but not this time, thanks for Joe's
    opinion.

v3: Change some style for patch 11/19:
    (net: packetengines: slight optimization of addr compare).
    Joe pointed out that is_broadcast_ether_addr(addr) would be appropriate here,
    but this should be left alone and not in this patch, so fix it later.

    In the patch (net: caif: slight optimization of addr compare), the operand for
    memcmp is not mac address, so it is unsuitable to use the ether_addr_equal
    to compare a non mac address, so remove the patch from the series.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:37 -05:00
dingtianhong 2d87650a3b net: plip: slight optimization of addr compare
Use possibly more efficient ether_addr_equal_64bits
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:33 -05:00
dingtianhong 7c3c299d22 net: fddi: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:33 -05:00
dingtianhong d9f394fe56 net: ti: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:33 -05:00
dingtianhong 00fa4ce9fd net: sun: optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00
dingtianhong 9116d7b06d net: seeq: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00
dingtianhong c4bde29cb0 net: renesas: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00
dingtianhong 6878f79a8b net: qlcnic: slight optimization of addr compare
Use the possibly more efficient ether_addr_equal or
ether_addr_equal_unaligned to instead of memcmp.

Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00
dingtianhong 202af853cc net: netxen: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Manish Chopra <manish.chopra@qlogic.com>
Cc: Sony Chacko <sony.chacko@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00
dingtianhong 3a8e87ec23 net: packetengines: slight optimization of addr
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31 16:48:32 -05:00