DSA drivers have a trick which consists in allocating "priv_size" more
bytes to account for the DSA driver private context. Add a helper
function to access that private context instead of open-coding it in
drivers with (void *)(ds + 1).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 28 Apr 2014 18:53:00 +0000 (14:53 -0400)]
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 contains updates to i40e and i40evf.
Jacob provides a i40e patch to remove ptp_tx_work() because it conflicts
with the interrupt-based handler and will cause spurious warning messages
to be displayed in the kernel log. Since the hardware can properly trigger
an interrupt, we do not need to poll for an available timestamp in a work
queue any more.
Greg provides two patches for i40e, first to retain the MAC filter list
when changing a port VLAN. Second fixes an issue where the function to
set the VF MAC address was not taking the port VLAN filter into account
when setting/clearing/resetting the VF's host administered MAC address.
Mitch provides three patches for i40evf, first adds support for getting
and setting RSS hashing options, RSS LUT entries, and getting the number
of device channels from ethtool. Fixes a panic that woudl occur in the VF
if the PF driver failed or was removed from the host kernel.
Shannon adds driver version string to the driver version command so that
can be passed down through the firmware to low-level NC-SI functions.
Neerav provides several patches, first redistributes queue vectors after
DCB reconfiguration because the total number of queues that are configured
for a VSI may change based on a change in the total number of TCs enabled
as a result of a change in the DCB configuration based on DCBX. Second,
allows the driver probe to continue when querying DCB config fails.
Lastly, provides changes to retrieve and store missing link config
information that was not being cached in the struct i40e_link_status.
Kevin provides a couple of patches, first to change a int variable type
to u16 to avoid a typecheck failure. Second to update a function
parameters to remove an argument which is no longer used.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
The opposite order of holding nametbl write lock and node lock on
above two different paths may result in a deadlock. If we move the
the delivery of named messages via link out of name nametbl lock,
the reverse order of holding locks will be eliminated, as a result,
the deadlock will be killed as well.
Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Mon, 28 Apr 2014 06:20:09 +0000 (08:20 +0200)]
tipc: fix out of bounds indexing
Commit 78acb1f9b898e85fa2c1e28e700b54b66b288e8d ("tipc: add
ioctl to fetch link names") introduced a buffer overflow bug where
specially crafted ioctl requests could cause out-of-bounds indexing
of the node->links array. This was caused by an incorrect check vs
MAX_BEARERS, and the static code checker complaint is:
net/tipc/node.c:459 tipc_node_get_linkname() error: buffer overflow 'node->links' 2 <= 2
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 28 Apr 2014 08:05:09 +0000 (10:05 +0200)]
qeth: Add new priority queueing options
The existing options for priority queueing within OSA devices were based on
the now partially defunct TOS field. This patch adds two new options as
follows:
- prio_queueing_skb: bases priority queueing on skb-priority
- prio_queueing_vlan: uses the priority code point in the 802.1Q header
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, 28 Apr 2014 08:05:08 +0000 (10:05 +0200)]
qeth: Extend priority queueing to IPv6
Make the current priority queueing logic apply to IPv6 traffic.
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>
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 28 Apr 2014 08:05:05 +0000 (10:05 +0200)]
qeth: Fix default queue setting in priority queueing
The default queue for queueing modes prio_queueing_prec and
prio_queueing_tos is supposed to be QETH_DEFAULT_QUEUE. However, neither
mode will reset the default default_out_queue value when enabled, leaving
a previously set value activate as the default.
E.g. enabling one of the fixed queueing modes, e.g. no_prio_queueing:0,
and successively switching to any of the prio_queueing_* modes will
leave default_out_queue at the previous (wrong) value 0.
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>
Richard Cochran [Sun, 27 Apr 2014 13:01:27 +0000 (15:01 +0200)]
ptp: validate the requested frequency adjustment.
PTP Hardware Clock drivers specify a maximum frequency adjustment that
their clocks can accommodate. Normally, user space programs will want to
respect the advertised limits. However, no kernel or driver code checks
that the dialed frequency offset is within the bounds, and out of range
values can lead to surprising results.
This patch fixes the issue by rejecting bad values.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jean Sacren [Sun, 27 Apr 2014 08:20:38 +0000 (02:20 -0600)]
ethtool: exit the loop when invalid index occurs
The commit 3de0b592394d ("ethtool: Support for configurable RSS hash
key") introduced a new function ethtool_copy_validate_indir() with
full iteration of the loop to validate the ring indices, which could
be an overkill. To minimize the impact, we ought to exit the loop as
soon as the invalid index occurs for the very first time. The
remaining loop simply doesn't serve any more purpose.
Signed-off-by: Jean Sacren <sakiwit@gmail.com> Cc: Venkata Duvvuru <VenkatKumar.Duvvuru@Emulex.Com> Signed-off-by: David S. Miller <davem@davemloft.net>
i40e/i40evf: Retrieve and store missing link config information
Some information returned via "Get Link Status" command was not
being cached in the struct i40e_link_status.
Add this so the driver can utilize this information as needed.
Change-ID: If084a0ae2a63b16b97572196b993742af2c67772 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Kevin Scott [Sat, 5 Apr 2014 07:46:10 +0000 (07:46 +0000)]
i40e: Update function formal parameters
Change the formal parameters to remove argument which is no longer used.
Change-ID: I493b56eba74a1f396fa1b7d24c0a4acbe536b5bf Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Kevin Scott [Tue, 1 Apr 2014 07:11:52 +0000 (07:11 +0000)]
i40e: Change variable type to avoid typecheck failure
Change the variable type to avoid compiler warning about int to u16
possible data truncation.
Change-ID: I5eb3b578c86513c9625ca32d2f0b57cc01d7dc98 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Mitch Williams [Tue, 1 Apr 2014 07:11:50 +0000 (07:11 +0000)]
i40evf: fix panic on PF driver fail
Fix a panic that would occur in the VF if the PF driver failed or was
removed from the host kernel. In this case, the VF driver calls
i40evf_close(), but this function does nothing because the driver is in
the resetting state. Because of this, the driver doesn't free its irqs
and causes a kernel panic when it tries to disable MSI-X.
Change-ID: If95644a89e554b4d7be0dca1b6add26f63047129 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
i40e: Redistribute queue vectors after DCB reconfiguration
The queue vectors are originally distributed among the total
number of queues that are configured for a given VSI. The number
of queues that are configured for a VSI depends on the number of
TCs that are enabled for the VSI at VSI setup/creation time.
But, the total number of queues that are configured for a VSI may
change based on change in the total number of TCs enabled as a
result of change in DCB configuration based on DCBX.
Hence, it is required for the queue vectors to be redistributed
when the total queues that are configured for a given VSI changes.
Without redistributing the vectors the queues that are configured
for the newly enabled TCs may not be able to do any Tx/Rx.
Shannon Nelson [Tue, 1 Apr 2014 07:11:45 +0000 (07:11 +0000)]
i40e/i40evf: add driver version string to driver version command
The driver version string was added to this struct to be passed
down through the firmware to low-level NC-SI functions. We tell
the firmware about the length of the ASCII string not counting
any terminating null.
Change-ID: I09ac98ff9b869e8661c55fc6a5c98808fc280c91 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: Anjali Singhai <anjali.singhai@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Tue, 1 Apr 2014 07:11:44 +0000 (07:11 +0000)]
i40e: Use port VLAN in MAC/VLAN filter configuration
The function to set the VF MAC address was not taking the port VLAN
filter into account when setting/clearing/resetting the VF's host
administered MAC address. Be sure to use the port VLAN for VF MAC
filtering configurations.
Change-ID: I12595331981c79529738f041dcdbdb667ef8f5e6 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Add support for getting and setting RSS hashing options, RSS LUT
entries, and getting the number of device channels from ethtool. Because
the LUT is so small for the VFs, we just read and write the device
registers directly instead of maintaining a shadow copy.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Fri, 14 Mar 2014 07:32:20 +0000 (07:32 +0000)]
i40e: Retain MAC filters when changing port VLAN
We were already taking care to retain the MAC filter list when deleting a
port VLAN. Take some additional care to retain the MAC filter list when
changing a port VLAN.
Change-ID: Iacf9599ea24ecb4dca8e419aacaf4b58ca361a9c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 15 Jan 2014 08:38:35 +0000 (08:38 +0000)]
i40e: remove ptp_tx_work timestamp work item
This patch removes the unnecessary ptp_tx_work item. It conflicts with
the interrupt-based handler, and will cause spurious warning messages to
be displayed in the kernel log. Since the hardware can properly trigger
an interrupt, we do not need to poll for an available timestamp in a
work queue any more.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cong Wang [Fri, 25 Apr 2014 20:55:30 +0000 (13:55 -0700)]
sched, act: allow to clear all actions as well
When we change the list of action on a given filter, currently we don't
change it to empty. This is a bug, we should allow to change to whatever
users given.
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>
Cong Wang [Fri, 25 Apr 2014 20:54:06 +0000 (13:54 -0700)]
sched, cls: check if we could overwrite actions when changing a filter
When actions are attached to a filter, they are a part of the filter
itself, so when changing a filter we should allow to overwrite the actions
inside as well.
In my specific case, when I tried to _append_ a new action to an existing
filter which already has an action, I got EEXIST since kernel refused
to overwrite the existing one in kernel.
This patch checks if we are changing the filter checking NLM_F_CREATE flag
(Sigh, filters don't use NLM_F_REPLACE...) and then passes the boolean down
to actions. This fixes the problem above.
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 [Mon, 28 Apr 2014 03:20:59 +0000 (23:20 -0400)]
Merge branch 'qlcnic-next'
Jitendra Kalsaria says:
====================
qlcnic driver updates
This patch series containes following changes -
* Optimize MAC learning code.
* Export board temperature using hwmon-sysfs interface.
* Add support for configuring Tx interrupt coalescing parameters from VF.
* Logging error messages in error path.
* Restrict extended vNIC support in legacy interrupt mode and log appropriate
message.
Please apply this series to net-next.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
* Use rx_mac_learn instead of mac_learn and eSwitch flag check in Rx path of
82xx adapter.
* Check for MAC filter overrun only after driver scans through cached MAC address list.
This will help to update the time stamp of cached MAC addresses even if
adapter runs out of MAC address filter limit.
* Remove expensive log thrown by driver when MAC address filters are exhausted
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com> Cc: Dept-HSGLinuxNICDev@qlogic.com Cc: netdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
FDDI: Reformat <linux/if_fddi.h> for 8-character tabs
Some of our FDDI support code has been apparently written with an
assumption that tabs are 4-character wide. In preparation to the next
change this update reformats <linux/if_fddi.h> so that it stays within 79
columns and otherwise renders correctly with 8-character tabs. No
functional change.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/discover.c:352 tipc_disc_create()
warn: possible memory leak of 'req'
The risk of memory leak really exists in practice. Especially when
it's failed to allocate memory for "req->buf", tipc_disc_create()
doesn't free its allocated memory, instead just directly returns
with ENOMEM error code. In this situation, memory leak, of course,
happens.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Fri, 25 Apr 2014 01:50:59 +0000 (18:50 -0700)]
qlge: Convert /n to \n
Use a newline character appropriately.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patchset adds support for the Broadcom SYSTEMPORT Ethernet MAC
controller which is used in the latest Broadcom BCM7xxx Set Top Box
System-on-a-Chip. This Ethernet MAC is interfaced to an internal
switch which will get a separate driver submitted later on.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver
SYSTEMPORT is the latest Ethernet MAC hardware block used on newer
BCM7xxx Set Top Box SoCs in conjunction with an internal Ethernet
switch. This patch adds support for this hardware block along with the
following hardware features:
- support for hardware checksum offload (transmit and receive)
- support for the 32 transmit queues
- MIB counters reading
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
xiao jin [Fri, 25 Apr 2014 00:53:29 +0000 (08:53 +0800)]
inetpeer_gc_worker: trivial cleanup
Do not initialize list twice.
list_replace_init() already takes care of initializing list.
We don't need to initialize it with LIST_HEAD() beforehand.
Signed-off-by: xiao jin <jin.xiao@intel.com> Reviewed-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
xiao jin [Fri, 25 Apr 2014 00:50:54 +0000 (08:50 +0800)]
net_namespace: trivial cleanup
Do not initialize net_kill_list twice.
list_replace_init() already takes care of initializing net_kill_list.
We don't need to initialize it with LIST_HEAD() beforehand.
Signed-off-by: xiao jin <jin.xiao@intel.com> Reviewed-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 26 Apr 2014 16:32:27 +0000 (12:32 -0400)]
Merge tag 'linux-can-next-for-3.16-20140425' of git://gitorious.org/linux-can/linux-can-next
Marc Kleine-Budde says:
====================
this is a pull request of 10 patches for net-next/master.
It consists of three patches by Alexander Shiyan, which improve the
mcp251x driver. Stefano Babic's patch move the SPI driver into a sub
folder. The three patches by Olivier Sobrie add support for the Kvaser
Leaf v2 and usb mini PCIe hardware to the existing driver. Alexander
Stein contributes eg20t support to the c_can pci driver. Together with
the patches on the net-tree, we'll be able to remove the pch_can driver
soon. Kurt Van Dijck's two patches clean up the sysfs attributes of the
softing driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 26 Apr 2014 16:21:20 +0000 (12:21 -0400)]
Merge branch 'at86rf230-next'
Alexander Aring says:
====================
at86rf230 cleanup
this is the first patch series to cleanup the at86rf230 driver. Later I want
to implement regmap and a asynchron spi handling for transmit and receiving
frames.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Aring [Thu, 24 Apr 2014 17:09:12 +0000 (19:09 +0200)]
at86rf230: add at86rf230_device_id table
This patch adds a at86rf230_device_id table to offers various module
aliases.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Aring [Thu, 24 Apr 2014 17:09:10 +0000 (19:09 +0200)]
at86rf230: add missing MODULE_DEVICE_TABLE
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Aring [Thu, 24 Apr 2014 17:09:05 +0000 (19:09 +0200)]
at86rf230: use irq_get_trigger_type
This patch removes the platform data for the irq_type. We use instead
the irq_get_trigger_type function to get these flags which should
already configured by the interrupt controller.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 26 Apr 2014 16:13:30 +0000 (12:13 -0400)]
Merge branch 'tipc-next'
Erik Hugne says:
====================
tipc: add support for link state subscriptions
Low level topology information like TIPC link up/down is useful for
applications like teamd to make smarter failover decisions in a
HA cluster environment. Fetching logical link names through an ioctl
may hurt the eyes of some. Suggestions for a more elegant way of doing
this would be appreciated in that case. :)
v2:
-Properly based on net-next
-Off-list comments from Billie Alsup:
-Add a string length parameter to tipc_node_get_linkname
-Use TIPC_MAX_LINK_NAME definition instead of hardcoded
value in tipc_sioc_ln_req linkname
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Thu, 24 Apr 2014 14:26:47 +0000 (16:26 +0200)]
tipc: add ioctl to fetch link names
We add a new ioctl for AF_TIPC that can be used to fetch the
logical name for a link to a remote node on a given bearer. This
should be used in combination with link state subscriptions.
The logical name size limit definitions are moved to tipc.h, as
they are now also needed by the new ioctl.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Thu, 24 Apr 2014 14:26:46 +0000 (16:26 +0200)]
tipc: add support for link state subscriptions
When links are established over a bearer plane, we create a node
local publication containing information about the peer node and
bearer plane. This allows TIPC applications to use the standard
TIPC topology server subscription mechanism to get notifications
when a link goes up or down.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kurt Van Dijck [Wed, 2 Apr 2014 19:17:47 +0000 (21:17 +0200)]
can: softing: drop 'channel' sysfs attribute
netdev->dev_id obsoletes this property.
None of the remaining properties contribute to udev detection methods.
The regular calls for the sysfs group can thus safely be restored.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Alexander Stein [Mon, 7 Apr 2014 06:52:03 +0000 (08:52 +0200)]
can: c_can: Add support for eg20t (pch_can)
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg()
On some Kvaser hardware, the firmware returns extra messages after the
request for card info. For instance on a Leaf Light v2:
--> CMD_GET_CARD_INFO
<-- CMD_USB_THROTTLE
<-- CMD_GET_CARD_INFO2
<-- CMD_GET_CARD_INFO_REQ
When it happens, the probing function fails because we only read
the first usb message.
To overcome this issue, we add a mechanism of retries to the
kvaser_usb_wait_msg() function.
I tested this patch with the following hardware:
- Kvaser Leaf Light
- Kvaser Leaf Light v2
- Kvaser USBCan R
This patch is necessary for the Leaf Light v2 hardware.
Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Alexander Shiyan [Fri, 28 Mar 2014 10:14:46 +0000 (14:14 +0400)]
can: mcp251x: Improve mcp251x_hw_probe()
This patch adds check for mcp251x_hw_reset() result on startup and
removes unnecessary checking for CANSTAT register since this value
is being checked in mcp251x_hw_reset().
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Alexander Shiyan [Fri, 28 Mar 2014 10:14:45 +0000 (14:14 +0400)]
can: mcp251x: Improve mcp251x_hw_reset()
The MCP251x utilizes an oscillator startup timer (OST), which holds the
chip in reset, to insure that the oscillator has stabilized before the
internal state machine begins to operate. The OST maintains reset for
the first 128 OSC clock cycles after power up or reset.
So, this patch removes unnecessary loops and reduce delay for power on
and reset to the safe value.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Alexander Shiyan [Fri, 28 Mar 2014 10:14:44 +0000 (14:14 +0400)]
can: mcp251x: Check return value of spi_setup()
This patch moves setup of SPI bus a bit earlier and adds check for spi_setup()
result to be sure SPI bus is communicating with the device properly.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Nicolas Dichtel [Thu, 24 Apr 2014 08:02:49 +0000 (10:02 +0200)]
vxlan: add x-netns support
This patch allows to switch the netns when packet is encapsulated or
decapsulated.
The vxlan socket is openned into the i/o netns, ie into the netns where
encapsulated packets are received. The socket lookup is done into this netns to
find the corresponding vxlan tunnel. After decapsulation, the packet is
injecting into the corresponding interface which may stand to another netns.
When one of the two netns is removed, the tunnel is destroyed.
Configuration example:
ip netns add netns1
ip netns exec netns1 ip link set lo up
ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
ip link set vxlan10 netns netns1
ip netns exec netns1 ip addr add 192.168.0.249/24 broadcast 192.168.0.255 dev vxlan10
ip netns exec netns1 ip link set vxlan10 up
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bonding: Add tlb_dynamic_lb parameter for tlb mode
The aggresive load balancing causes packet re-ordering as active
flows are moved from a slave to another within the group. Sometime
this aggresive lb is not necessary if the preference is for less
re-ordering. This parameter if used with value "0" disables
this dynamic flow shuffling minimizing packet re-ordering. Of course
the side effect is that it has to live with the static load balancing
that the hashing distribution provides. This impact is less severe if
the correct xmit-hashing-policy is used for the tlb setup.
The default value of the parameter is set to "1" mimicing the earlier
behavior.
Ran the netperf test with 200 stream for 1 min between two hosts with
4x1G trunk (xmit-lb mode with xmit-policy L3+4) before and after these
changes. Following was the command used for those 200 instances -
Transactions per second:
Before change: 1,367.11
After change: 1,470.65
Change-Id: Ie3f75c77282cf602e83a6e833c6eb164e72a0990 Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Re-organized the xmit function for the lb mode separating tlb xmit
from the alb mode. This will enable use of the hashing policies
like 802.3ad mode. Also extended use of xmit-hash-policy to tlb mode.
Now the tlb-mode defaults to BOND_XMIT_POLICY_LAYER2 if the xmit policy
module parameter is not set (just like 802.3ad, or Xor mode).
Change-Id: I140257403d272df75f477b380207338d0f04963e Signed-off-by: Mahesh Bandewar <maheshb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Separating the actual xmit part from the function in a separate
function that can be used in the tlb_xmit in the next patch. Also
there is no reason do_tx_balance to be an int so changing it to
bool type.
Change-Id: I9c48ff30487810f68587e621a191db616f49bd3b Signed-off-by: Mahesh Bandewar <maheshb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>