summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller347-1780/+3686
Conflicts: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c net/ipv6/ip6_tunnel.c net/ipv6/ip6_vti.c ipv6 tunnel statistic bug fixes conflicting with consolidation into generic sw per-cpu net stats. qlogic conflict between queue counting bug fix and the addition of multiple MAC address support. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06net_sched: act: action flushing missaccountingJamal Hadi Salim1-2/+3
action flushing missaccounting Account only for deleted actions Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06net_sched: Remove unnecessary checks for act->opsJamal Hadi Salim2-32/+16
Remove unnecessary checks for act->ops (suggested by Eric Dumazet). Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06bridge: use DEVICE_ATTR_xx macrossfeldma@cumulusnetworks.com1-141/+108
Use DEVICE_ATTR_RO/RW macros to simplify bridge sysfs attribute definitions. Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06bridge: use spin_lock_bh() in br_multicast_set_hash_maxCurt Brune1-2/+2
br_multicast_set_hash_max() is called from process context in net/bridge/br_sysfs_br.c by the sysfs store_hash_max() function. br_multicast_set_hash_max() calls spin_lock(&br->multicast_lock), which can deadlock the CPU if a softirq that also tries to take the same lock interrupts br_multicast_set_hash_max() while the lock is held . This can happen quite easily when any of the bridge multicast timers expire, which try to take the same lock. The fix here is to use spin_lock_bh(), preventing other softirqs from executing on this CPU. Steps to reproduce: 1. Create a bridge with several interfaces (I used 4). 2. Set the "multicast query interval" to a low number, like 2. 3. Enable the bridge as a multicast querier. 4. Repeatedly set the bridge hash_max parameter via sysfs. # brctl addbr br0 # brctl addif br0 eth1 eth2 eth3 eth4 # brctl setmcqi br0 2 # brctl setmcquerier br0 1 # while true ; do echo 4096 > /sys/class/net/br0/bridge/hash_max; done Signed-off-by: Curt Brune <curt@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06vxlan: keep original skb ownershipEric Dumazet1-21/+10
Sathya Perla posted a patch trying to address following problem : <quote> The vxlan driver sets itself as the socket owner for all the TX flows it encapsulates (using vxlan_set_owner()) and assigns it's own skb destructor. This causes all tunneled traffic to land up on only one TXQ as all encapsulated skbs refer to the vxlan socket and not the original socket. Also, the vxlan skb destructor breaks some functionality for tunneled traffic like wmem accounting and as TCP small queues and FQ/pacing packet scheduler. </quote> I reworked Sathya patch and added some explanations. vxlan_xmit() can avoid one skb_clone()/dev_kfree_skb() pair and gain better drop monitor accuracy, by calling kfree_skb() when appropriate. The UDP socket used by vxlan to perform encapsulation of xmit packets do not need to be alive while packets leave vxlan code. Its better to keep original socket ownership to get proper feedback from qdisc and NIC layers. We use skb->sk to A) control amount of bytes/packets queued on behalf of a socket, but prior vxlan code did the skb->sk transfert without any limit/control on vxlan socket sk_sndbuf. B) security purposes (as selinux) or netfilter uses, and I do not think anything is prepared to handle vxlan stacked case in this area. By not changing ownership, vxlan tunnels behave like other tunnels. As Stephen mentioned, we might do the same change in L2TP. Reported-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06tcp: out_of_order_queue do not use its lockEric Dumazet3-3/+6
TCP out_of_order_queue lock is not used, as queue manipulation happens with socket lock held and we therefore use the lockless skb queue routines (as __skb_queue_head()) We can use __skb_queue_head_init() instead of skb_queue_head_init() to make this more consistent. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06ipv6: don't install anycast address for /128 addresses on routersHannes Frederic Sowa1-2/+2
It does not make sense to create an anycast address for an /128-prefix. Suppress it. As 32019e651c6fce ("ipv6: Do not leave router anycast address for /127 prefixes.") shows we also may not leave them, because we could accidentally remove an anycast address the user has allocated or got added via another prefix. Cc: François-Xavier Le Bail <fx.lebail@yahoo.com> Cc: Thomas Haller <thaller@redhat.com> Cc: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06hso: fix handling of modem port SERIAL_STATE notificationsDan Williams1-2/+11
The existing serial state notification handling expected older Option devices, having a hardcoded assumption that the Modem port was always USB interface #2. That isn't true for devices from the past few years. hso_serial_state_notification is a local cache of a USB Communications Interface Class SERIAL_STATE notification from the device, and the USB CDC specification (section 6.3, table 67 "Class-Specific Notifications") defines wIndex as the USB interface the event applies to. For hso devices this will always be the Modem port, as the Modem port is the only port which is set up to receive them by the driver. So instead of always expecting USB interface #2, instead validate the notification with the actual USB interface number of the Modem port. Signed-off-by: Dan Williams <dcbw@redhat.com> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06bonding: fix kstrtou8() return value verification in num_peer_notifVeaceslav Falico1-1/+1
It returns 0 in case of success, !0 error otherwise. Fix the improper error verification. Fixes: 2c9839c143bbc ("bonding: add num_grat_arp attribute netlink support") CC: sfeldma@cumulusnetworks.com CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: replace the return value of rtl_ops_inithayeswang1-9/+11
Replace the boolean value with the error code for the return value of the rtl_ops_init(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: move the actions of saving the information of the devicehayeswang1-3/+4
Some information of the device may be used in other functions. Move the relative code to make sure it would be initialzed correctly before using it. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: replace some tabs with spaceshayeswang1-8/+8
Replace the tabs of the variables declaration with the spaces. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06isdn: Drop big endian cpp checks from telespci and hfc_pci driversGuenter Roeck2-8/+0
With arm:allmodconfig, building the Teles PCI driver fails with telespci.c:294:2: error: #error "not running on big endian machines now" Similar, building the driver for HFC PCI-Bus cards fails with hfc_pci.c:1647:2: error: #error "not running on big endian machines now" Remove the big endian cpp check from both drivers to fix the build errors. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06net: pkt_sched: PIE AQM schemeVijay Subramanian4-0/+594
Proportional Integral controller Enhanced (PIE) is a scheduler to address the bufferbloat problem. >From the IETF draft below: " Bufferbloat is a phenomenon where excess buffers in the network cause high latency and jitter. As more and more interactive applications (e.g. voice over IP, real time video streaming and financial transactions) run in the Internet, high latency and jitter degrade application performance. There is a pressing need to design intelligent queue management schemes that can control latency and jitter; and hence provide desirable quality of service to users. We present here a lightweight design, PIE(Proportional Integral controller Enhanced) that can effectively control the average queueing latency to a target value. Simulation results, theoretical analysis and Linux testbed results have shown that PIE can ensure low latency and achieve high link utilization under various congestion situations. The design does not require per-packet timestamp, so it incurs very small overhead and is simple enough to implement in both hardware and software. " Many thanks to Dave Taht for extensive feedback, reviews, testing and suggestions. Thanks also to Stephen Hemminger and Eric Dumazet for reviews and suggestions. Naeem Khademi and Dave Taht independently contributed to ECN support. For more information, please see technical paper about PIE in the IEEE Conference on High Performance Switching and Routing 2013. A copy of the paper can be found at ftp://ftpeng.cisco.com/pie/. Please also refer to the IETF draft submission at http://tools.ietf.org/html/draft-pan-tsvwg-pie-00 All relevant code, documents and test scripts and results can be found at ftp://ftpeng.cisco.com/pie/. For problems with the iproute2/tc or Linux kernel code, please contact Vijay Subramanian (vijaynsu@cisco.com or subramanian.vijay@gmail.com) Mythili Prabhu (mysuryan@cisco.com) Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com> Signed-off-by: Mythili Prabhu <mysuryan@cisco.com> CC: Dave Taht <dave.taht@bufferbloat.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06netfilter: Fix build failure in nfnetlink_queue_core.c.David S. Miller1-0/+1
net/netfilter/nfnetlink_queue_core.c: In function 'nfqnl_put_sk_uidgid': net/netfilter/nfnetlink_queue_core.c:304:35: error: 'TCP_TIME_WAIT' undeclared (first use in this function) net/netfilter/nfnetlink_queue_core.c:304:35: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [net/netfilter/nfnetlink_queue_core.o] Error 1 Just a missing include of net/tcp_states.h Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06Merge branch 'master' of ↵David S. Miller18-534/+872
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables Pablo Neira Ayuso says: <pablo@netfilter.org> ==================== nftables updates for net-next The following patchset contains nftables updates for your net-next tree, they are: * Add set operation to the meta expression by means of the select_ops() infrastructure, this allows us to set the packet mark among other things. From Arturo Borrero Gonzalez. * Fix wrong format in sscanf in nf_tables_set_alloc_name(), from Daniel Borkmann. * Add new queue expression to nf_tables. These comes with two previous patches to prepare this new feature, one to add mask in nf_tables_core to evaluate the queue verdict appropriately and another to refactor common code with xt_NFQUEUE, from Eric Leblond. * Do not hide nftables from Kconfig if nfnetlink is not enabled, also from Eric Leblond. * Add the reject expression to nf_tables, this adds the missing TCP RST support. It comes with an initial patch to refactor common code with xt_NFQUEUE, again from Eric Leblond. * Remove an unused variable assignment in nf_tables_dump_set(), from Michal Nazarewicz. * Remove the nft_meta_target code, now that Arturo added the set operation to the meta expression, from me. * Add help information for nf_tables to Kconfig, also from me. * Allow to dump all sets by specifying NFPROTO_UNSPEC, similar feature is available to other nf_tables objects, requested by Arturo, from me. * Expose the table usage counter, so we can know how many chains are using this table without dumping the list of chains, from Tomasz Bursztyka. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06Merge branch 'master' of ↵David S. Miller8-85/+169
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 only. Majority of this series contains patches from Greg and Mitch to fix up or add functionality to the PF/VF driver interactions. Notably, a fix for SR-IOV VF port VLAN which resolved the problem of port VLAN configurations not being persistent across VF driver loads and unloads and enable/disable of the feature. Also do not enable the default port on the VEB, which is designed only to bridge the PF to an Open vSwitch or bridge. Another fix to resolve a possible memory corruption condition where ARQ messages are written to random memory locations. Fix a problem where the 'ip link show' command would display stale link address information after the link address was set via the 'ip link set' command. Anjali provides several patches, one which saves information that can be used while cleaning the Tx ring and useful in detecting Tx hangs. Then provides a fixes to the admin queue shutdown function to ensure we are shutting down the queue in the shutdown path and ensure ASQ is alive before issuing the admin queue command. Shannon provides a fix for get/update vsi params where the incorrect struct was being used. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06Merge branch 'be2net'David S. Miller3-22/+43
Sathya Perla says: ==================== be2net: patch set Pls apply the following bug fixes to the 'net' tree. Thanks. Suresh Reddy (2): be2net: increase the timeout value for loopback-test FW cmd be2net: fix max_evt_qs calculation for BE3 in SR-IOV config Vasundhara Volam (1): be2net: disable RSS when number of RXQs is reduced to 1 via set-channels ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06be2net: fix max_evt_qs calculation for BE3 in SR-IOV configSuresh Reddy2-4/+9
The driver wrongly assumes 16 EQs/vectors are available for each BE3 PF. When SR-IOV is enabled, a BE3 PF can support only a max of 8 EQs. Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06be2net: increase the timeout value for loopback-test FW cmdSuresh Reddy3-12/+22
The loopback test FW cmd may need upto 15 seconds to complete on certain PHYs. This patch also fixes the name of the completion variable used to synchronize FW cmd completions as it not used by the flashing cmd alone anymore. Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06be2net: disable RSS when number of RXQs is reduced to 1 via set-channelsVasundhara Volam2-6/+12
When *only* the default RXQ is used, the RSS policy must be disabled so that all IP and no-IP traffic is placed into the default RXQ. If not, IP traffic is dropped. Also, issue the RSS_CONFIG cmd only if FW advertises RSS capability for the interface. 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>
2014-01-06i40e: Do not allow AQ calls from ndo-opsAnjali Singhai Jain1-17/+13
If the device is not in a working state avoid making admin queue (AQ) calls that rely on a working AQ. Change-Id: Ifbba6d257b3a5b51bfe92938c04088c0baa21433 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-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>
2014-01-06i40e: check asq alive before notifyAnjali Singhai Jain1-1/+2
Driver needs to make sure the send queue is alive before trying to use it. Chagne-Id: I9bd1f6159c45c98e63f562e3a8dfb57edfe50e13 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-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>
2014-01-06i40e: Admin queue shutdown fixesAnjali Singhai Jain4-28/+44
Always call the AQ call to shutdown the queue in the shutdown path. Check ASQ is alive before issuing the AQ command since we might be resetting to recover from a bad state in which case we should not issue the AQ command. Use the register variable for length so it can be used by PF, VF and GL AQ commands. Change-Id: Ic3d305687ea3f1a6afa84e864b7a27bd38a9af32 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-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>
2014-01-06i40e: Hide the Port VLAN VLAN IDGreg Rose1-1/+1
The VF VSI Port VLAN settings still allow the user to view VLAN tag in the descriptor. Fix the settings to hide the VLAN ID from the VF. The VF is not supposed to be aware it is on a VLAN in the Port VLAN scenario. Change-Id: I976f2bacb455dbb750f8c53a781c689f02cb8907 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: use correct struct for get and update vsi paramsShannon Nelson1-6/+6
The get_vsi_params and update_vsi_params functions were using a different command struct that just happened to have an seid element in the right place and so worked correctly anyway. This patch fixes the functions to use the right data struct. There is no actual logic change. Change-Id: I513b5e1dc293dfd5b2ba4fa443cbdbfa608d9d19 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-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>
2014-01-06i40e: Fix VF driver MAC address configurationGreg Rose2-13/+48
Fix a problem where the 'ip link show' command would display stale link address information after the link address was set via the 'ip link set' command. In addition, fix problem with the user being allowed to overwrite the administratively set VF MAC address. Change-Id: I669ed14e55f2b633ef7b456b713632b08468671c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: support VFs on PFs other than 0Mitch Williams1-8/+10
When communicating with VF devices over the AQ, the FW refers to the VF by its global VF ID, not local the VF ID with reference to its parent PF. Since the global and local VF IDs are identical for PF 0, the code worked correctly on PF 0. However, we cannot just use global IDs throughout the code as most of the other references to the VF (VSI setup, register offsets, etc.) require the local VF ID. Instead, we just add or subtract our base VF ID when sending and receiving AQ messages. Change-Id: I92f4332b4876bc68b2f9af9ebf48761f63b6bd97 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: acknowledge VFLR when disabling SR-IOVMitch Williams1-2/+13
When SR-IOV is disabled, the (now nonexistent) virtual function devices undergo a VFLR event. We don't need to handle this event because the VFs are gone, but we do need to tell the HW that they are complete. This fixes an issue with a phantom VFLR and broken VFs when SR-IOV is re-enabled. Change-Id: I7580b49ded0158172a85b14661ec212af77000c8 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: don't allocate zero sizeMitch Williams1-0/+1
Shockingly, the compiler didn't flag this uninitialized variable. This fixes a potential memory corruption condition where ARQ messages are written to random memory locations. Change-Id: Iac82f4562d2bf3f42df3f3b2163d9cbed2160135 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: use struct assign instead of memcpyMitch Williams1-1/+1
Use struct assignment rather than an expensive memory copy. Change-Id: I1d18d510774dfd41a9c1250cdef238a4187528f5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: Do not enable default port on the VEBGreg Rose1-1/+1
Enabling the default port on the VEB causes all outgoing traffic from virtual functions to be copied to the physical function. The default port is only supposed to be used if you wish to bridge the physical function to a SW switch such as Open vSwitch or the Linux bridge. That allows the SW switch to route traffic to VMs that are not using a virtual function. Eventually we'll want to implement the ndo_fdb_add, ndo_fdb_del, and ndo_fdb_dump functions. The ndo_fdb_add function would set the default port on the VEB in those cases where the MAC/VLAN address filters have overflowed. Normally we would not want to use it. Change-Id: I3990f0384fff2840c4e43bc0955dd0b701380852 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: avoid unnecessary register readMitch Williams1-2/+1
We don't need to read the base VF id. It's already stashed in the HW struct. Change-Id: Ib81e2f76fc40b12c966e014a856b481912cafefc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: fix whitespaceJesse Brandeburg1-0/+1
Trivial whitespace fix. Change-Id: Ib7c70891a33c4b3d200c69367549d0dbdee0f076 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Fix SR-IOV VF port VLANGreg Rose3-5/+20
This patch fixes two different problems. 1) The port VLAN configuration was not persistent across VF driver loads and unloads. 2) The port VLAN configuration was only correct the first time it was set. Switching the port VLAN on and off would cause subsequent VLAN configurations to be corrupted in the VSI. Ensure that the correct bits are being set for the VSI port VLAN configuration. Change-Id: I7ebf5329f77eb8d73ccd3324eb346b3abeea737d Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Record dma buffer info for dummy packetsAnjali Singhai Jain1-1/+8
Save information that we can use while cleaning the tx ring. Also record the time_stamp since we will need it to check tx hangs. Change-Id: Ia3f1c17f6fec9bcb7fef2542d77eac7f6c4f115c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-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>
2014-01-05net/mlx4_core: Warn if device doesn't have enough PCI bandwidthEyal Perry1-0/+84
Check if the device get enough bandwidth from the entire PCI chain to satisfy its capabilities. This patch determines the PCIe device's bandwidth capabilities by reading its PCIe Link Capabilities registers and then call the pcie_get_minimum_link function to ensure that the adapter is hooked into a slot which is capable of providing the necessary bandwidth capabilities. Signed-off-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05xen-netback: Include header for vmallocJosh Boyer1-0/+1
Commit ac3d5ac27735 ("xen-netback: fix guest-receive-side array sizes") added calls to vmalloc and vfree in the interface.c file without including <linux/vmalloc.h>. This causes build failures if the -Werror=implicit-function-declaration flag is passed. Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05Merge branch 'master' of ↵David S. Miller11-185/+162
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 only. Anjali provides two cleanups to remove unnecessary code and a fix to resolve debugfs dumping only half the NVM. Then provides a fix to ethtool NVM reads where shadow RAM was used instead of actual NVM reads. Jesse provides a couple of fixes, one removes custom i40e functions which duplicate existing kernel functionality. Second fixes constant cast issues by replacing __constant_htons with htons. Mitch provides a couple of fixes for the VF interfaces in i40e. First provides a fix to guard against VF message races with can cause a panic. Second fix reinitializes the buffer size each time we clean the ARQ, because subsequent messages can be truncated. Lastly adds functionality to enable/disable ICR 0 dynamically. Vasu adds a simple guard against multiple includes of the i40e_txrx.h file. Shannon provides a couple of fixes, first fix swaps a couple of lines around in the error handling if the allocation for the VSI array fails. Second fixes an issue where we try to free the q_vector that has not been setup which can panic the kernel. David provides a patch to save off the point to memory and the length of 2 structs used in the admin queue in order to store all info about allocated kernel memory. Neerav fixes ring allocation where allocation and clearing of rings for a VSI should be using the alloc_queue_pairs and not num_queue_pairs. Then removes the unused define for multi-queue enabled. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-058021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021QHannes Frederic Sowa1-19/+19
macvlan needs vlan_pcpu_stats so make it visible even if compiling without VLAN_8021Q support. Otherwise a very long compiler error happens. Fixes: cdf3e274cf1b36 ("macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats") Cc: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-By: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05net: netdev_kobject_init: annotate with __initDaniel Borkmann2-2/+2
netdev_kobject_init() is only being called from __init context, that is, net_dev_init(), so annotate it with __init as well, thus the kernel can take this as a hint that the function is used only during the initialization phase and free up used memory resources after its invocation. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05net: 6lowpan: fix lowpan_header_create non-compression memcpy callDaniel Borkmann1-1/+1
In function lowpan_header_create(), we invoke the following code construct: struct ipv6hdr *hdr; ... hdr = ipv6_hdr(skb); ... if (...) memcpy(hc06_ptr + 1, &hdr->flow_lbl[1], 2); else memcpy(hc06_ptr, &hdr, 4); Where the else path of the condition, that is, non-compression path, calls memcpy() with a pointer to struct ipv6hdr *hdr as source, thus two levels of indirection. This cannot be correct, and likely only one level of pointer was intended as source buffer for memcpy() here. Fixes: 44331fe2aa0d ("IEEE802.15.4: 6LoWPAN basic support") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05fec: Revert "fec: Do not assume that PHY reset is active low"Fabio Estevam1-10/+4
In order to keep DT compatibility we need to revert this, otherwise the original dts files will no longer work with this driver change. This reverts commit 7a399e3a2e05bc580a78ea72371b3896827f72e1. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05Merge branch 'bnx2x'David S. Miller7-120/+196
Yuval Mintz says: ==================== bnx2x: Bug fixes patch series Most of what this parch series contains is SR-IOV related bug fixes. Additionally, it contains some small fixes for legacy devices/modes. Please consider applying these patches to `net'. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: fix VLAN configuration for VFs.Yuval Mintz5-112/+174
If the hypervisor configures a vlan for the VF via the PF, the expected result is that only packets tagged by said vlan will be received by the VF (and that vlan will be silently removed). Due to an incorrect manipulation of vlan filters in the driver, the VF can receive untagged traffic even if the hypervisor configured some vlan for it. This patch corrects the behaviour. 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>
2014-01-05bnx2x: fix AFEX memory overflowYuval Mintz1-1/+4
There are 2 different (related) flows in the slowpath configuration that utilize the same pointer and cast it to different structs; This is obviously incorrect as the intended allocated memory is that of the smaller struct, possibly causing the flow utilizing the larger struct to corrupt other slowpath configuration. Since both flows are exclusive, set the allocated memory to be a union of both structs. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> 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>
2014-01-05bnx2x: Clean before update RSS arrivesMichal Kalderon2-1/+7
When a PF receives a VF message indicating a change in RSS properties it should clean the flags' bit-fields; Otherwise, it's possible that some random values will be considered as flags by the lower layers configuring the RSS in FW. Signed-off-by: Michal Kalderon <michals@broadcom.com> 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>
2014-01-05bnx2x: Correct number of MSI-X vectors for VFsMichal Kalderon1-3/+6
Number of VFs in PCIe configuration space is zero-based. Driver incorrectly sets the number of VFs to be larger by one than what actually is feasible by HW, which might cause later VFs to fail to allocate their MSI-X interrupts. Signed-off-by: Michal Kalderon <michals@broadcom.com> 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>
2014-01-05bnx2x: limit number of interrupt vectors for 57711Dmitry Kravkov2-3/+5
Original straightforward division may lead to zeroing number of SB and null-pointer dereference when device is short of MSIX vectors or lacks MSIX capabilities. Reported-by: Vladislav Zolotarov <vladz@cloudius-systems.com> 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: David S. Miller <davem@davemloft.net>