David S. Miller [Tue, 22 Jul 2014 03:22:52 +0000 (20:22 -0700)]
Merge branch 'enic-next'
Govindarajulu Varadarajan says:
====================
enic: Display classifier filters using ethtool
This series adds ethtool support to show classifier filters added by driver.
v2:
The patch 1/2 removes the $ifdef's around the filter structure. Making it
available always. So that .get_rxnfc() can be implimented without any #ifdefs
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
enic: remove #ifdef CONFIG_RFS_ACCEL around filter structures
This patch removes the #ifdef CONFIG_RFS_ACCEL around the classifier filter
structures. This makes the filter structures available when CONFIG_RFS_ACCEL = n.
Introduce enic_rfs_timer_start() & enic_rfs_timer_stop() to start/stop the
timer. These two functions are nop when CONFIG_RFS_ACCEL = n.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
af_iucv: avoid path quiesce of severed path in shutdown()
An af_iucv stress test showed -EPIPE results for sendmsg()
calls. They are caused by quiescing a path even though it has
been already severed by peer. For IUCV transport shutdown()
consists of 2 steps:
(1) sending the shutdown message to peer
(2) quiescing the iucv path
If the iucv path between these 2 steps is severed due to peer
closing the path, the quiesce step is no longer needed.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reported-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jul 2014 10:54:43 +0000 (12:54 +0200)]
qeth: Display adjacent switch attributes
Add support to display the adjacent switch port's forwarding
attributes. Currently supports info on forwarding modes '802.1'
and 'rr' (reflective relay).
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: bcmgenet: only update UMAC_CMD if something changed
The link adjustment callback can be called as frequently as desired
by the PHY library, as such, let's avoid doing a Read/Modify/Write
sequence if nothing changed, since these register accesses can be
expensive.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jul 2014 23:04:37 +0000 (16:04 -0700)]
Merge branch 'bcmgenet-next'
Florian Fainelli says:
====================
net: bcmgenet: PM and Wake-on-LAN
This patchset brings S2/S3 Power Management support to the GENET driver
as well as Wake-on-LAN using Magic Packets with or without SecureOn
passwords.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net: bcmgenet: suspend and resume from Wake-on-LAN
Update bcmgenet_suspend() to prepare the hardware for being put into
Wake-on-LAN mode if the device can wakeup the system, and Wake-on-LAN is
enabled. Whether we resume from Wake-on-LAN or not, make sure that
bcmgenet_resume() disables the UniMAC MagicPacket matching mode and puts
the hardware in a state where it can receive all incoming packets.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bcmgenet_wol_resume() will create an unbalanced clock state for the
wol_clk clock pointer since everywhere else in the code, we always call
clk_prepare_enable() and clk_disable_unprepare(). This function also
calls init_umac() which is neither correct nor necessary since
bcmgenet_resume() and bcmgenet_open() already does that.
Finally calling bcmgenet_wol_resume() in bcmgenet_open() is not correct,
since the interface would not have been able to put us in Wake-on-LAN
mode if it was not UP before.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: bcmgenet: handle UMAC_IRQ_MPD_R interrupt bit
Handle UMAC_IRQ_MPD_R interrupt bit in our workqueue to make sure that
we properly re-configure the GENET adapter from Wake-on-LAN.
bcmgenet_power_up() makes sure that we will not leave the UniMAC
hardware in MagicPacket matching mode, since that would prevent any
other packet from being received.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Implement suspend/resume callbacks in the GENET driver. This makes sure
that we de-initialize and re-initialize the hardware correctly before
entering suspend and when resuming.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Introduce a bunch of helper functions: bcmgenet_netif_start,
bcmgenet_netif_stop and bcmgenet_intr_disable to help reuse code that is
going to be necessary for suspend/resume.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Checking for wol_enabled in bcmgenet_close() is bogus, since no other
code places set priv->wol_enabled. Remove that as it will conflict with
the upcoming and functional Wake-on-LAN implementation.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c:545:5: warning:
symbol 'tipc_sk_proto_rcv' was not declared. Should it be static?
net/tipc/socket.c:2015:5: warning:
symbol 'tipc_ioctl' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jul 2014 04:30:28 +0000 (21:30 -0700)]
Merge branch 'break_after_return'
Fabian Frederick says:
====================
drivers/net: remove unnecessary break after return
Second patchset after "remove unnecessary break after goto" addressing break redundancy on drivers/net branch
(suggested by Joe Perches)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/ar-key.c: drop negativity check on unsigned value
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80611 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
====================
Netfilter updates for net-next
The following patchset contains updates for your net-next tree,
they are:
1) Use kvfree() helper function from x_tables, from Eric Dumazet.
2) Remove extra timer from the conntrack ecache extension, use a
workqueue instead to redeliver lost events to userspace instead,
from Florian Westphal.
3) Removal of the ulog targets for ebtables and iptables. The nflog
infrastructure superseded this almost 9 years ago, time to get rid
of this code.
4) Replace the list of loggers by an array now that we can only have
two possible non-overlapping logger flavours, ie. kernel ring buffer
and netlink logging.
5) Move Eric Dumazet's log buffer code to nf_log to reuse it from
all of the supported per-family loggers.
6) Consolidate nf_log_packet() as an unified interface for packet logging.
After this patch, if the struct nf_loginfo is available, it explicitly
selects the logger that is used.
7) Move ip and ip6 logging code from xt_LOG to the corresponding
per-family loggers. Thus, x_tables and nf_tables share the same code
for packet logging.
8) Add generic ARP packet logger, which is used by nf_tables. The
format aims to be consistent with the output of xt_LOG.
9) Add generic bridge packet logger. Again, this is used by nf_tables
and it routes the packets to the real family loggers. As a result,
we get consistent logging format for the bridge family. The ebt_log
logging code has been intentionally left in place not to break
backward compatibility since the logging output differs from xt_LOG.
10) Update nft_log to explicitly request the required family logger when
needed.
11) Finish nft_log so it supports arp, ip, ip6, bridge and inet families.
Allowing selection between netlink and kernel buffer ring logging.
12) Several fixes coming after the netfilter core logging changes spotted
by robots.
13) Use IS_ENABLED() macros whenever possible in the netfilter tree,
from Duan Jiong.
14) Removal of a couple of unnecessary branch before kfree, from Fabian
Frederick.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Currently it's done silently (from the kernel part), and thus it might be
hard to track the renames from logs.
Add a simple netdev_info() to notify the rename, but only in case the
previous name was valid.
CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Vlad Yasevich <vyasevic@redhat.com> CC: stephen hemminger <stephen@networkplumber.org> CC: Jerry Chu <hkchu@google.com> CC: Ben Hutchings <bhutchings@solarflare.com> CC: David Laight <David.Laight@ACULAB.COM> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jul 2014 03:39:16 +0000 (20:39 -0700)]
Merge branch 'netdev_print'
Veaceslav Falico says:
====================
net: print net_device name/state more often
Currently we use net_device->name only if it's the NETREG_REGISTERED
reg_state, otherwise we return "(unregistered device)".
However, we always populate net_device->name on creation, so it's always
available to us for use. The only caveat is that we might have a name like
"eth%d", in which case we cannot use it as it might change in the future.
Also, the net_device might not be NETREG_UNREGISTERED when the function is
called (_UNINITIALIZED, _UNREGISTERING, _RELEASED, _DUMMY), so it's
misleading.
So, a better way would be to always return the dev->name in netdev_name(),
unless it's in the form of "eth%d" or it's empty, then return
"unnamed net_device". This way we'll always return the name in
NETREG_REGISTERED reg_state, and also return it in other states, when
possible.
Also, to be more verbose on non-NETREG_REGISTERED states, add a function
netdev_reg_state(), which returns a string describing the state, and use it
in netdev_printk()-related functions. If the dev is in NETREG_REGISTERED
state then a void string is regurned and, thus, nothing changes.
After these two patches we'll have the same behaviour in the usual cases,
and more verbose in non-standardad/buggy ones.
v2->v3:
Correct the string for _UNINITIALIZED and warn on a bad reg_state,
per Joe Perches's comments.
v1->v2:
As Tom Gundersen suggested, there might be a case when we have an empty
string as a name for a device, so account this also and return "unnamed
device" for that case too.
====================
Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: print net_device reg_state in netdev_* unless it's registered
This way we'll always know in what status the device is, unless it's
running normally (i.e. NETDEV_REGISTERED).
Also, emit a warning once in case of a bad reg_state.
CC: "David S. Miller" <davem@davemloft.net> CC: Jason Baron <jbaron@akamai.com> CC: Eric Dumazet <edumazet@google.com> CC: Vlad Yasevich <vyasevic@redhat.com> CC: stephen hemminger <stephen@networkplumber.org> CC: Jerry Chu <hkchu@google.com> CC: Ben Hutchings <bhutchings@solarflare.com> CC: Joe Perches <joe@perches.com> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: use dev->name in netdev_pr* when it's available
netdev_name() returns dev->name only when the net_device is in
NETREG_REGISTERED state.
However, dev->name is always populated on creation, so we can easily use
it.
There are two cases when there's no real name - when it's an empty string
or when the name is in form of "eth%d", then netdev_name() returns "unnamed
net_device".
CC: "David S. Miller" <davem@davemloft.net> CC: Tom Gundersen <teg@jklm.no> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Acked-by: Tom Gundersen <teg@jklm.no> Signed-off-by: David S. Miller <davem@davemloft.net>
bonding: make it possible to have unlimited nested upper vlans
Currently we're limited by a constant level of vlan nestings, and fail to
find anything beyound that level (currently 2).
To fix this - remove the limit of nestings when going through device tree,
and when the end device is found - allocate the needed amount of vlan tags
and return them, instead of found/not found.
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Wed, 16 Jul 2014 21:25:31 +0000 (14:25 -0700)]
net_sched: hold tcf_lock in netdevice notifier
We modify mirred action (m->tcfm_dev) in netdev event, we need to
prevent on-going mirred actions from reading freed m->tcfm_dev.
So we need to acquire this spin lock.
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <cwang@twopensource.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
libcxgbi:cxgb4i Guard ipv6 code with a config check
Fixes: fc8d0590d914 ("libcxgbi: Add ipv6 api to driver") Fixes: 759a0cc5a3e1 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6
api") Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fixed error introduced in commit id 7730b4c (" cxgb4/iw_cxgb4: work request
logging feature") while compiling on 32 bit architecture reported by kbuild.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 17 Jul 2014 23:38:23 +0000 (16:38 -0700)]
Merge branch 'be2net-next'
Sathya Perla says:
====================
be2net: patch set
Patches 1 to 6 address issues with return values of some ndo/ethtool
driver methods. In error scenarios, either an inappropriate error or
a +ve return value (where the stack expects a -ve value) was being returned.
Patch 7 updates description strings for certain UE bits.
Patch 8 cleans up (reduces) argument passing for a few routines in be_cmds.c.
Patch 9 removes some unused code (unused definitions.)
Patch 10 updates NULL check in the driver to a consistent "if (!foo)" style.
Patchs 11 to 13 fix a few minor issues with the earlier patch bec84e6
("create optimal number of queues on SR-IOV config"):
- patch 11 fixes BEx_get_resources() code to use be_max_vfs() macro
- patch 12 skips SR-IOV config code for BE2 that doesn't support SRIOV
- patch 13 uses adapter->flags to track SRIOV enabled state
Patch 14 updates the driver version.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
The driver so far used adapter->num_vfs value to check if SR-IOV is enabled
or not. But, the patch bec84e6("create optimal number of queues on SR-IOV
config") changed this logic. The adapter->num_vfs value is validated and set
much before SR-IOV is enabled. So, we now use an explicit flag to track
SR-IOV enabled state.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
max-vfs value must be accessed via the macro be_max_vfs(adapter).
The earlier patch "create optimal number of queues on SR-IOV config"
by mistake, did not use this macro. This patch fixes it.
fixes: bec84e6b ("be2net: create optimal number of queues on SR-IOV config") Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:28 +0000 (16:20 +0530)]
be2net: use "if (!foo)" test style
Replace "if (foo == NULL)" statements with "if (!foo)" to be consistent
across the driver.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:27 +0000 (16:20 +0530)]
be2net: remove unused structures in be_cmds.h
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:26 +0000 (16:20 +0530)]
be2net: reduce arguments passed to FW-cmd routines
A pointer to adapter struct is passed anyway to all of the FW-cmd routines
in be_cmds.c. For routines which query data from FW, the adapter pointer
is enough to return the queried fields.
There is no need to separately pass pointers to individual members of
the adapter structure. This patch fixes this for be_cmd_get_fw_ver()
and be_cmd_get_fw_cfg() routines.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch updates some description strings for BEx/Skyhawk-R
UE (unrecoverable error) status register bits. The appropriate strings
are logged when a UE is detected in the adapter. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:24 +0000 (16:20 +0530)]
be2net: fix return status of some ndo methods
The netlink layer expects a -ve status value to be returned when a driver
ndo method encounters an error. The driver was directly passing the
error status returned by FW (a positive value) to the stack.
This patch fixes this by returning -EIO status when a FW-cmd reports an error.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:23 +0000 (16:20 +0530)]
be2net: fix return status of some ethtool methods
ethtool expects a -ve status value to be returned when a driver method
encounters an error. The driver was directly passing the
error status returned by FW (a positive value) to ethtool.
This patch fixes this by returning -EIO status in cases where FW returns
an error. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:21 +0000 (16:20 +0530)]
be2net: return -ETIMEDOUT when a FW-cmd times out
When the FW stops responding with completions, return -ETIMEDOUT error
(instead of -1) to the stack. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:20 +0000 (16:20 +0530)]
be2net: fix error status for FW-download
For FW download ethtool cmd, if the user provides an FW-image incompatible
with the chip, return -EINVAL instead of -1.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Thu, 17 Jul 2014 10:50:19 +0000 (16:20 +0530)]
be2net: use -ENETDOWN error status when interface is down
Updating VF's tx-rate and FW-download are not allowed when the interface is
down. In such cases return -ENETDOWN to the stack. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bonding: destroy proc directory only after all bonds are gone
Currently we might arrive to bond_net_exit() with some bonds left (that
were created while the module is unloading). We take care of that by
destroying sysfs (the last possibility to add new bonds) and then
destroying all the remaining bonds.
However, we destroy the /proc/net/bonding directory before destroying those
last bonds, and get a warning that we're trying to destroy a non-empty
proc directory (containing /proc/net/bonding/bondX).
Fix this by moving bond_destroy_proc_dir() after all the bonds are
destroyed, so that we're sure that no bonds exist.
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
Also, remove the wrong comment.
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 17 Jul 2014 23:06:09 +0000 (16:06 -0700)]
Merge branch 'cxgb4-next'
Anish Bhatt says:
====================
cxgb4i: Add ipv6 support
The following patchset add ipv6 support for the cxgb4i(iscsi) driver.
Patch 1 moves a define from the iw_cxgb4 to cxgb4 to prevent code duplication,
as it is used by cxgb4i and iw_cxgb4 both.
Patch 2 exports symbols needed by cxgb4i for ipv6 support from cxgb4.
Patch 3 & 4 deal with actual ipv6 code in libcxgbi/cxgb4i.
Submitting to net-next as changes were needed in cxgb4/iw_cxgb4, and submitting
to scsi separately would break compilation, cc-ing scsi & rdma.
v2 : Cleanup macro that prints ip addresses by using %pIS in patch 3
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
bonding: update bonding.txt for Layer2 hash factors
Document the Layer 2 hash factors with packet type ID field.
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: David S. Miller <davem@davemloft.net> CC: Pan Jiafei <Jiafei.Pan@freescale.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Current L2 hash helper calculates destination eth addr and
source ether addr as L2 hash factors. This patch is adding
packet type ID field into L2 hash factors. While one of
BOND_XMIT_POLICY_LAYER2 or BOND_XMIT_POLICY_{LAYER|ENCAP}23
is applied, for the 2nd level hash, enhanced hash method can
help to distribute different types of packets like IPv4/IPv6
packets to different slave devices.
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: David S. Miller <davem@davemloft.net> CC: Pan Jiafei <Jiafei.Pan@freescale.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Wed, 16 Jul 2014 21:25:30 +0000 (14:25 -0700)]
net_sched: cancel nest attribute on failure in tcf_exts_dump()
Like other places, we need to cancel the nest attribute after
we start. Fortunately the netlink message will not be sent on
failure, so it's not a big problem at all.
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Cong Wang <cwang@twopensource.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 17 Jul 2014 06:52:18 +0000 (23:52 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2014-07-16
This series contains updates to i40e only.
Neerav adds support to get the port MAC address from firmware and adds
support to the ndo_get_phys_port_id() callback to provide port specific
unique ids to the netdev layer.
Jakub Kicinski provides 2 fixes, first fixes i40e to never generate a software
time stamp if the hardware time stamp is provided. Second fixes a race
condition on queueing skb for hardware time by using a simple bit lock to
avoid race conditions and leaking skbs when multiple transmit rings try
to claim time stamping.
Paul does some general cleanup of the driver to remove unneeded spaces,
comments that are no longer valid, and break that will never get touched.
Jacob Keller adds a verbose warning message when the incorrect PF attempts
to control timestamping for a port to which it was not assigned. The primary
intent of this message is to help debugging the reason why the SIOCSHWSTAMP
ioctl has failed and to help narrow the cause of the issue.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
bonding: Do not try to send packets over dead link in TLB mode.
In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
group are selected based on the hash distribution. This does not
exclude dead links which are part of the bond. Also if there is a
temporary link event which brings down the interface, packets
hashed on that interface would be dropped too.
This patch fixes these issues and distributes flows across the
UP links only. Also the array construction of links which are
capable of sending packets happen in the control path leaving
only link-selection during the data-path.
One possible side effect of this is - at a link event; all
flows will be shuffled to get good distribution. But impact of
this should be minimum with the assumption that a member or
members of the bond group are not available is a very temporary
situation.
Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 17 Jul 2014 06:33:25 +0000 (23:33 -0700)]
Merge branch 'davinci_mdio'
Grygorii Strashko says:
====================
net: davinci_mdio: reuse for keystone2 arch
The similar MDIO HW blocks is used by keystone 2 SoCs as
in Davinci SoCs:
- one in Gigabit Ethernet (GbE) Switch Subsystem
See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
- one in 10 Gigabit Ethernet Subsystem
See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf
Hence, reuse Davinci MDIO driver for Keystone 2 and
enable TI networking for Keystone 2 devices.
Also, as part of this series, enable PHY's creation from DT, because
Keystone 2 supports DT boot mode only.
Changes in v2:
- review comments applied.
Keystone 2 compatibility string changed to "ti,keystone_mdio".
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch allows to create PHYs from DT in case
if they are explicitly defined. The of_mdiobus_register() is
used for such purposes.
For backward compatibility, call of_mdiobus_register() only in case
if at least one PHY's child is defined in DT, otherwise rollback to
mdiobus_register().
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
The similar MDIO HW blocks is used by keystone 2 SoCs as
in Davinci SoCs:
- one in Gigabit Ethernet (GbE) Switch Subsystem
See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
- one in 10 Gigabit Ethernet Subsystem
See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf
Hence, reuse Davinci MDIO driver for Keystone 2 and
enable TI networking for Keystone 2 devices
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Layton [Wed, 16 Jul 2014 10:55:46 +0000 (06:55 -0400)]
net: clean up some sparse endianness warnings in ipv6.h
sparse is throwing warnings when building sunrpc modules due to some
endianness shenanigans in ipv6.h. Specifically:
CHECK net/sunrpc/addr.c
include/net/ipv6.h:573:17: warning: restricted __be64 degrades to integer
include/net/ipv6.h:577:34: warning: restricted __be32 degrades to integer
include/net/ipv6.h:573:17: warning: restricted __be64 degrades to integer
include/net/ipv6.h:577:34: warning: restricted __be32 degrades to integer
Sprinkle some endianness fixups to silence them. These should all get
fixed up at compile time, so I don't think this will add any extra work
to be done at runtime.
Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fix performance issues with listening to many different multicast
sockets on different addresses with the same port. Instead of always
using hash1, fall back to hash2 lookup when hash1 lookup is long.
Patch 1 is a general cleanup and simplification which also makes the
main implementation in Patch 2 simpler.
Eric's recent change 63c6f81cdde5 avoided this being an issue in early
demux. This makes it work for regular delivery as well.
v1->v2
- updated hash collision detection
v2->v3
- avoid flushing under lock unnecessarily at ARRAY_SIZE boundary
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David Held [Wed, 16 Jul 2014 03:28:32 +0000 (23:28 -0400)]
udp: Use hash2 for long hash1 chains in __udp*_lib_mcast_deliver.
Many multicast sources can have the same port which can result in a very
large list when hashing by port only. Hash by address and port instead
if this is the case. This makes multicast more similar to unicast.
On a 24-core machine receiving from 500 multicast sockets on the same
port, before this patch 80% of system CPU was used up by spin locking
and only ~25% of packets were successfully delivered.
With this patch, all packets are delivered and kernel overhead is ~8%
system CPU on spinlocks.
Signed-off-by: David Held <drheld@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net/mlx4_core: Remove MCG in case it is attached to promiscuous QPs only
In B0 steering mode if promiscuous QP asks to be detached from MCG entry,
and it is the only one in this entry then the entry will never be deleted.
This is a wrong behavior since we don't want to keep those entries after
the promiscuous QP becomes non-promiscuous. Therefore remove steering
entry containing only promiscuous QP.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>