summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-10-23ixgbevf: Check for error on dma_map_single callGreg Rose
Ignoring the return value from a call to the kernel dma_map API functions can cause data corruption and system instability. Check the return value and take appropriate action. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbevf: make netif_napi_add and netif_napi_del symmetricJohn Fastabend
ixgbevf_alloc_q_vectors() calls netif_napi_add for each qvector where qvectors is determined by the number of msix vectors. This makes perfect sense. However on cleanup when ixgbevf_free_q_vectors() is called and for each qvector we should call netif_napi_del there is some extra logic to add a dependency on RX queues. This patch makes the add/del operations symmetric by removing the RX queues dependency. Without this if free_netdev() is called we see the general protection fault below in netif_napi_del when list_del_init() is called. # addr2line -e ./vmlinux ffffffff8140810c net-next/include/linux/list.h:88 general protection fault: 0000 [#1] SMP Modules linked in: bonding ixgbevf ixgbe(-) mdio libfc scsi_transport_fc scsi_tgt 8021q garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf ipv6 uinput coretemp lpc_ich i2c_i801 shpchp hwmon i2c_core serio_raw crc32c_intel mfd_core joydev pcspkr microcode ioatdma igb dca pata_acpi ata_generic usb_storage pata_jmicron [last unloaded: bonding] CPU 10 Pid: 4174, comm: rmmod Tainted: G W 3.6.0-rc3jk-net-next+ #104 Supermicro X8DTN/X8DTN RIP: 0010:[<ffffffff8140810c>] [<ffffffff8140810c>] netif_napi_del+0x24/0x87 RSP: 0018:ffff88027f5e9b48 EFLAGS: 00010293 RAX: ffff8806224b4768 RBX: ffff8806224b46e8 RCX: 6b6b6b6b6b6b6b6b RDX: 6b6b6b6b6b6b6b6b RSI: ffffffff810bf6c5 RDI: ffff8806224b46e8 RBP: ffff88027f5e9b58 R08: ffff88033200b180 R09: ffff88027f5e98a8 R10: ffff88033320b000 R11: ffff88027f5e9ae8 R12: 6b6b6b6b6b6b6aeb R13: ffff8806221d11c0 R14: 0000000000000000 R15: ffff88027f5e9cf8 FS: 00007f5e58b9b700(0000) GS:ffff880333200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00000000010ef2b8 CR3: 0000000281fff000 CR4: 00000000000007e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process rmmod (pid: 4174, threadinfo ffff88027f5e8000, task ffff88032f888000) Stack: ffff8806221d1160 6b6b6b6b6b6b6aeb ffff88027f5e9b88 ffffffff81408e46 ffff8806221d1160 ffff8806221d1160 ffff8806221d1ae0 ffff8806221d5668 ffff88027f5e9bb8 ffffffffa009153c ffffffffa0092a30 ffff8806221d5700 Call Trace: [<ffffffff81408e46>] free_netdev+0x64/0xd7 [<ffffffffa009153c>] ixgbevf_remove+0xa6/0xbc [ixgbevf] [<ffffffff8127a7a1>] pci_device_remove+0x2d/0x51 [<ffffffff8131f503>] __device_release_driver+0x6c/0xc2 [<ffffffff8131f640>] device_release_driver+0x25/0x32 [<ffffffff8131e821>] bus_remove_device+0x148/0x15d [<ffffffff8131cb6b>] device_del+0x130/0x1a4 [<ffffffff8131cc2a>] device_unregister+0x4b/0x57 [<ffffffff81275c27>] pci_stop_bus_device+0x63/0x85 [...] Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Acked-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23igb: Update versionCarolyn Wyborny
This patch updates the igb driver version to 4.0.17. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23igb: Update get cable length function for i210/i211Carolyn Wyborny
There was a problem in the initial implementation of the get cable length function for i210 and it did not work properly. This patch fixes that problem for i210/i211 devices. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23maintainers: update with official intel support link, new maintainerJesse Brandeburg
Add an official link which is designed to guide the user to the appropriate support resource (be it community, OEM, Intel phone, Intel email, etc) Add the current e1000 maintainer to the list of Intel maintainers. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23e1000e: Minimum packet size must be 17 bytesTushar Dave
This is a HW requirement. Although a buffer as short as 1 byte is allowed, the total length of packet before, padding and CRC insertion, must be at least 17 bytes. So pad all small packets manually up to 17 bytes before delivering them to HW. Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== This series contains updates to ixgbe only. Only change to this series is I dropped the "ixgbe: Add support for pipeline reset" due to change requested by Martin Josefsson. Alexander Duyck (7): ixgbe: Add support for IPv6 and UDP to ixgbe_get_headlen ixgbe: Add support for tracking the default user priority to SR-IOV ixgbe: Add support for GET_QUEUES message to get DCB configuration ixgbe: Enable support for VF API version 1.1 in the PF. ixgbevf: Add VF DCB + SR-IOV support ixgbe: Drop unnecessary addition from ixgbe_set_rx_buffer_len ixgbe: Fix possible memory leak in ixgbe_set_ringparam Don Skidmore (1): ixgbe: Add function ixgbe_reset_pipeline_82599 Emil Tantilov (1): ixgbe: add WOL support for new subdevice id Jacob Keller (1): ixgbe: (PTP) refactor init, cyclecounter and reset Tushar Dave (1): ixgbe: Correcting small packet padding Wei Yongjun (1): ixgbe: using is_zero_ether_addr() to simplify the code ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_mbim: Device Service Stream supportBjørn Mork
MBIM devices can support up to 256 generic streams called Device Service Streams (DSS). The MBIM spec says The format of the Device Service Stream payload depends on the device service (as identified by the corresponding UUID) that is used when opening the data stream. Example use cases are serial AT command interfaces and NMEA data streams. We cannot make any assumptions about these device services. Adding support for Device Service Stream by extending the MBIM session to VLAN mapping scheme, allocating VLAN IDs 256 to 511 for DSS, using the DSS SessionID as the lower 8bit of the VLAN ID. Using a netdev for DSS keeps the device framing intact and allows userspace to do whatever it want with the streams. For example, exporting an AT command interface using DSS session #0 to a PTY for use with a terminal application like minicom: vconfig add wwan0 256 ip link set dev wwan0 up ip link set dev wwan0.256 up socat INTERFACE:wwan0.256,type=2 PTY:,echo=0,link=/tmp/modem Device configuration must be done using MBIM control commands over the /dev/cdc-wdmx device. The userspace management application should coordinate host VLAN configuration and the device MBIM configuration using the device capabilities to find out if it needs to set up PTY mappings etc. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: map MBIM IPS SessionID to VLAN IDBjørn Mork
MBIM devices can support up to 256 independent IP Streams. The main network device will only handle SessionID 0. Mapping SessionIDs 1 to 255 to VLANs using the SessionID as VLAN ID allow userspace to use these streams with traditional tools like vconfig. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: do not bind to NCM compatible MBIM devicesBjørn Mork
The MBIM specification allows a MBIM device to disguise itself as NCM for backwards compatibility, using additional altsettings with different subclass (control) or protocol (data): C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_mbim E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=7ms I:* If#= 0 Alt= 1 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=7ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_mbim I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_mbim E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms If the MBIM driver is enabled then that should have priority for devices providing such a NCM 1.0 backward compatibility mode. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_mbim: build the MBIM driverBjørn Mork
Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_mbim: adding MBIM driverGreg Suarez
The CDC Mobile Broadband Interface Model (MBIM) specification extends CDC NCM by - removing the redundant ethernet header from the point-to-point USB channel - adding support for multiple IP (v4 and/or v6) sessions multiplexed on the same USB channel - adding a MBIM control channel encapsulated in CDC - adding Device Service Streams (DSS), which are non IP generic data streams multiplexed on the same USB channel as the IP sessions MBIM devices are managed using the dedicated control channel, and no data will flow on the data channel until a control session has been established. This driver has no knowledge of MBIM control messages. It just exports the control channel to a /dev/cdc-wdmX character device for userspace management applications. Such an application is therefore required to use this driver. This patch implements basic MBIM support, reusing the NCM and WDM driver APIs, currently limited to IP sessions with SessionID 0. DSS and multiplexed IP sessions are not yet supported. Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: export shared symbols and definitionsBjørn Mork
Move symbols and definitons which can be shared with a MBIM driver in a new header. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: refactoring for tx multiplexingBjørn Mork
Adding multiplexed NDP support to cdc_ncm_fill_tx_frame, allowing transmissions of multiple independent sessions within the same NTB. Refactoring the code quite a bit to avoid having to store copies of multiple NDPs being prepared for tx. The old code would still reserve enough room for a maximum sized NDP in the skb so we might as well keep them in the skb while they are being prepared. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: splitting rx_fixup for code reuseBjørn Mork
Verifying and handling received MBIM and NCM frames will need to be different in three areas: - verifying the NDP signature - checking valid datagram length - datagram header manipulation This makes it inconvenient to share rx_fixup in whole. But some verification parts are common. Split these out in separate functions. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: process chained NDPsBjørn Mork
The NCM 1.0 spefication makes provisions for linking more than one NDP into a single NTB. This is important for MBIM support, where these NDPs might be of different types. Following the chain of NDPs is also correct for NCM, and will not change anything in the common case where there is only one NDP Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: refactor bind preparing for MBIM supportGreg Suarez
NCM and MBIM can share most of the bind function. Split out the shareable part and add MBIM functional descriptor parsing. Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: adding MBIM support to ncm_setupGreg Suarez
MBIM and NCM are very similar, so we can reuse most of the setup and bind logic in cdc_ncm for CDC MBIM devices. Handle a few minor differences in ncm_setup. Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23USB: cdc: add MBIM constants and structuresGreg Suarez
Based on revision 1.0 of "Universal Serial Bus Communications Class Subclass Specification for Mobile Broadband Interface Model" available from www.usb.org Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> [bmork: added DSS defines] Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net: cdc_ncm: workaround NTB input size firmware bugBjørn Mork
Some devices do not support the 8 byte variants of the NTB input size control messages despite announcing such support in their NCM or MBIM functional descriptor. According to the NCM specification, all devices must support the 4 byte variant regardless of whether or not the flag is set: If bit D5 is set in the bmNetworkCapabilities field of function’s NCM Functional Descriptor, the host may set wLength either to 4 or to 8. If wLength is 4, the function shall assume that wNtbInMaxDatagrams is to be set to zero. If wLength is 8, then the function shall use the provided value as the limit. The function shall return an error response (a STALL PID) if wLength is set to any other value. We do not set wNtbInMaxDatagrams in any case, so we can just as well unconditionally use the 4 byte variant without losing any functionality. This works around the known firmware bug, and simplifies the code considerably. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net/at91_ether: add pdata flag for reverse Eth addrJoachim Eastwood
This will allow us to remove the last mach include from at91_ether and also make it easier to share address setup with macb. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net/at91_ether: select MACB in KconfigJoachim Eastwood
Now that HAVE_NET_MACB is gone let's just select MACB to satisfy the dependecies in at91_ether. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net/cadence: get rid of HAVE_NET_MACBJoachim Eastwood
macb is a platform driver and there is nothing that prevents this driver from being built on non-ARM/AVR32 platforms. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net/macb: fix truncate warningsJoachim Eastwood
When building macb on x86_64 the following warnings show up: drivers/net/ethernet/cadence/macb.c: In function macb_interrupt: drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c: In function macb_reset_hw: drivers/net/ethernet/cadence/macb.c:792:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:793:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:796:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] Use -1 insted of ~0UL, as done in other places in the driver, to silence these warnings. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23ipv6: add support of equal cost multipath (ECMP)Nicolas Dichtel
Each nexthop is added like a single route in the routing table. All routes that have the same metric/weight and destination but not the same gateway are considering as ECMP routes. They are linked together, through a list called rt6i_siblings. ECMP routes can be added in one shot, with RTA_MULTIPATH attribute or one after the other (in both case, the flag NLM_F_EXCL should not be set). The patch is based on a previous work from Luc Saillard <luc.saillard@6wind.com>. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23ixgbe: Fix possible memory leak in ixgbe_set_ringparamAlexander Duyck
We were not correctly freeing the temporary rings on error in ixgbe_set_ring_param. In order to correct this I am unwinding a number of changes that were made in order to get things back to the original working form with modification for the current ring layouts. This approach has multiple advantages including a smaller memory footprint, and the fact that the interface is stopped while we are allocating the rings meaning that there is less potential for some sort of memory corruption on the ring. The only disadvantage I see with this approach is that on a Rx allocation failure we will report an error and only update the Tx rings. However the adapter should be fully functional in this state and the likelihood of such an error is very low. In addition it is not unreasonable to expect the user to need to recheck the ring configuration should they experience an error setting the ring sizes. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Add function ixgbe_reset_pipeline_82599Don Skidmore
This patch adds a function that forces a full pipeline reset. This function will be used in following patches to completely reset the PHY during resets. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Drop unnecessary addition from ixgbe_set_rx_buffer_lenAlexander Duyck
We still had some code floating around from the old single buffer receive path. As a result we were adding VLAN_HLEN to max_frame although the resultant value was never used. Since that is the case we can drop this from the function. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Correcting small packet paddingTushar Dave
Driver pad skb up to 17 bytes because of the HW requirement. However, that code implementation mess up the skb tail pointer after padding. This patch sets skb->tail correctly. Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: using is_zero_ether_addr() to simplify the codeWei Yongjun
Using is_zero_ether_addr() to simplify the code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: (PTP) refactor init, cyclecounter and resetJacob Keller
This patch modifies when and where PTP registers and data are set. Previously a work-around was used inside cyclecounter_start in order to reset some of the time registers. This patch creates a new ixgbe_ptp_reset specifically for this purpose. The cyclecounter configuration has trimmed down to only modify what is necessary. Due to hardware conditions after probe and before open, PTP init has now moved into the ixgbe_open call. This allows the ptp device name in the sysfs to be the ethernet device name instead of the MAC address. The cyclecounter check flag is renamed to PTP_ENABLED and is used to prevent PTP init from happening when PTP has not been enabled. CC: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: add WOL support for new subdevice idEmil Tantilov
This patch adds a subdevice id for new 82599 device. The define is needed to allow enabling WOL support. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbevf: Add VF DCB + SR-IOV supportAlexander Duyck
This change adds support for DCB and SR-IOV from the VF. With this change in place the VF will correctly use a traffic class other than 0 in the case that the PF is configured with the default user priority belonging to a traffic class other than 0. Cc: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Enable support for VF API version 1.1 in the PF.Alexander Duyck
This change switches on the last few bits for us enabling version 1.1 VF support in the PF. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Robert Garrett <RobertX.Garrett@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Add support for GET_QUEUES message to get DCB configurationAlexander Duyck
This patch addresses several issues in regards to the combination of DCB and SR-IOV. Specifically it allows us to send information to the VF on which queues it should be using. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Add support for tracking the default user priority to SR-IOVAlexander Duyck
It is necessary to track the default user priority in the PF so that we can force it upon the VFs. The motivation behind this is to keep the VFs from getting access to user priorities meant for things like storage. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ixgbe: Add support for IPv6 and UDP to ixgbe_get_headlenAlexander Duyck
This change adds support for IPv6 and UDP to ixgbe_get_headlen. The advantage to this is that we can now handle ipv4/UDP, ipv6/TCP, and ipv6/UDP with a single memcpy instead of having to do them in multiple pskb_may_pull calls. A quick bit of testing shows that we increase throughput for a single session of netperf from 8800Mpbs to about 9300Mpbs in the case of ipv6/TCP. As such overall ipv6 performance should improve with this change. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-23ipvs: fix build errors related to config option combinationsJesper Dangaard Brouer
Fix two build error introduced by commit 63dca2c0: "ipvs: Fix faulty IPv6 extension header handling in IPVS" First build error was fairly trivial and can occur, when CONFIG_IP_VS_IPV6 is disabled. The second build error was tricky, and can occur when deselecting both all Netfilter and IPVS, but selecting CONFIG_IPV6. This is caused by "kernel/sysctl_binary.c" including "net/ip_vs.h", which includes "linux/netfilter_ipv6/ip6_tables.h" causing include of "include/linux/netfilter/x_tables.h" which then cannot find the typedef nf_hookfn. Fix this by only including "linux/netfilter_ipv6/ip6_tables.h" in case of CONFIG_IP_VS_IPV6 as its already used to guard the usage of ipv6_find_hdr(). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-10-22ipv4: 16 slots in initial fib_info hash tableEric Dumazet
A small host typically needs ~10 fib_info structures, so create initial hash table with 16 slots instead of only one. This removes potential false sharing and reallocs/rehashes (1->2->4->8->16) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22tcp: speedup SIOCINQ ioctlEric Dumazet
SIOCINQ can use the lock_sock_fast() version to avoid double acquisition of socket lock. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22tcp: RFC 5961 5.2 Blind Data Injection Attack MitigationEric Dumazet
RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] All TCP stacks MAY implement the following mitigation. TCP stacks that implement this mitigation MUST add an additional input check to any incoming segment. The ACK value is considered acceptable only if it is in the range of ((SND.UNA - MAX.SND.WND) <= SEG.ACK <= SND.NXT). All incoming segments whose ACK value doesn't satisfy the above condition MUST be discarded and an ACK sent back. Move tcp_send_challenge_ack() before tcp_ack() to avoid a forward declaration. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Yuchung Cheng <ycheng@google.com> Cc: Jerry Chu <hkchu@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22Merge branch 'master' of ↵Pablo Neira Ayuso
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Pull updates from Jesper Dangaard Brouer for IPVS mostly targeted to improve IPv6 support (7 commits): ipvs: Trivial changes, use compressed IPv6 address in output ipvs: IPv6 extend ICMPv6 handling for future types ipvs: Use config macro IS_ENABLED() ipvs: Fix faulty IPv6 extension header handling in IPVS ipvs: Complete IPv6 fragment handling for IPVS ipvs: API change to avoid rescan of IPv6 exthdr ipvs: SIP fragment handling
2012-10-22pkt_sched: use ns_to_ktime() helperEric Dumazet
ns_to_ktime() seems better than ktime_set() + ktime_add_ns() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Update driver versionPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Fix skyhawk VF PCI Device IDPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Fix FW flashing on Skyhawk-RPadmanabh Ratnakar
FW flash layout on Skyhawk-R is different from BE3-R. Hence the code needs to be fixed to flash FW on Skyhawk-R. Also cleaning up code in BE3-R flashing function. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Enabling Wake-on-LAN is not supported in S5 statePadmanabh Ratnakar
be_shutdown is enabling wake-on-lan by calling be_setup_wol. Emulex adapter do not support wake-on-lan in S5 state. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Fix VF driver load on newer Lancer FWPadmanabh Ratnakar
PF driver should enable VF so that VF goes to ready state in new Lancer FW. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Fix unnecessary delay in PCI EEHPadmanabh Ratnakar
During PCI EEH, driver waits for all functions in the card. Wait is needed only once per card. Fix is to wait only for the first PCI function. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-22be2net: Fix issues in error recovery due to wrong queue statePadmanabh Ratnakar
During recovery from a FW error, destroy queue operation may fail. Queue should be marked as destroyed so that recovery code can recreate the queue. Also fix queue created state not getting checked at one instance. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>