summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* packet: if hw/sw ts enabled in rx/tx ring, report which ts we gotDaniel Borkmann2013-04-252-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no way to find out which timestamp is reported in tpacket{,2,3}_hdr's tp_sec, tp_{n,u}sec members. It can be one of SOF_TIMESTAMPING_SYS_HARDWARE, SOF_TIMESTAMPING_RAW_HARDWARE, SOF_TIMESTAMPING_SOFTWARE, or a fallback variant late call from the PF_PACKET code in software. Therefore, report in the tp_status member of the ring buffer which timestamp has been reported for RX and TX path. This should not break anything for the following reasons: i) in RX ring path, the user needs to test for tp_status & TP_STATUS_USER, and later for other flags as well such as TP_STATUS_VLAN_VALID et al, so adding other flags will do no harm; ii) in TX ring path, time stamps with PACKET_TIMESTAMP socketoption are not available resp. had no effect except that the application setting this is buggy. Next to TP_STATUS_AVAILABLE, the user also should check for other flags such as TP_STATUS_WRONG_FORMAT to reclaim frames to the application. Thus, in case TX ts are turned off (default case), nothing happens to the application logic, and in case we want to use this new feature, we now can also check which of the ts source is reported in the status field as provided in the docs. Reported-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: minor: convert status bits into shifting formatDaniel Borkmann2013-04-251-11/+11
| | | | | | | | | This makes it more readable and clearer what bits are still free to use. The compiler reduces this to a constant for us anyway. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: enable hardware tx timestamping on tpacket ringDaniel Borkmann2013-04-251-25/+25
| | | | | | | | | | | Currently, we only have software timestamping for the TX ring buffer path, but this limitation stems rather from the implementation. By just reusing tpacket_get_timestamp(), we can also allow hardware timestamping just as in the RX path. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: tx timestamping on tpacket ringWillem de Bruijn2013-04-252-6/+39
| | | | | | | | | | | | When transmit timestamping is enabled at the socket level, record a timestamp on packets written to a PACKET_TX_RING. Tx timestamps are always looped to the application over the socket error queue. Software timestamps are also written back into the packet frame header in the packet ring. Reported-by: Paul Chavent <paul.chavent@onera.fr> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2013-04-2512-94/+212
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== This series contains updates to ixgbe, igb and pci. The ixgbe changes contains a fix to a possible divide by zero by bailing out of the ixgbe_update_itr() function if the last interrupt timeslice is zero. In addition, support is added for the new OCP x520 adapter as well as LX support for 82599 devices. Jacob provides a patch to change variable wol_supported to wol_enabled to better reflect what the code is actually doing (i.e. checking if WoL is enabled). Alex adds SRIOV helper function to pci that will determine if a PF has any VFs that are currently assigned to a guest. The remaining 8 patches are against igb and contain the following changes: * implement SERDES loopback configuration for i210 devices by unsetting sigdetect bit, so as to fix Ethtool loopback test failure * add support for the SMBI semaphore for I210/I211 devices * implement the new generic pci_vfs_assigned helper function (Alex's PCI helper function) * display warning when link speed is downgraded due to Smartspeed * ensure that VLAN hardware filtering remains enabled when the device is in promiscuous mode and VT mode simultaneously * cleanup dead code in igb * bump the driver version v2: updated the PCI patch to add SRIOV helper function to remove extern from the declaration of pci_vfs_assigned in pci.h and return 0 if SR-IOV is disabled which is inline with other PCI SR-IOV functions ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * igb: Bump version of driverCarolyn Wyborny2013-04-251-3/+3
| | | | | | | | | | | | 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>
| * igb: Remove id's that will not be productized for Linux.Carolyn Wyborny2013-04-252-4/+0Star
| | | | | | | | | | | | | | | | | | | | This patch removes id defines from the hardware files that will not be productized for Linux. These id's were not implemented for support in the base driver itself, they were just available defines. 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>
| * igb: Remove dead code pathMatthew Vick2013-04-251-4/+0Star
| | | | | | | | | | | | | | | | | | | | The 82575 manual initialization scripts are not supported on 82580 and above. Rather than call the function to immediately return, clarify the code by removing this pointless function call. Signed-off-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Retain HW VLAN filtering while in promiscuous + VT modeGreg Rose2013-04-251-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the new bridge FDB interface to allow SR-IOV virtual function network devices to communicate with SW bridged network devices the physical function is placed into promiscuous mode and hardware VLAN filtering is disabled. This defeats the ability to use VLAN tagging to isolate user networks. When the device is in promiscuous mode and VT mode simultaneously ensure that VLAN hardware filtering remains enabled. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: display a warning message when SmartSpeed worksKoki Sanagi2013-04-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | Current igb driver doesn't tell nothing when Link Speed is downgraded due to SmartSpeed. As a result, users suspect that there is something wrong with NIC. If the cause of it is SmartSpeed, there is no means to replace NIC. This patch make igb notify users that SmartSpeed worked. Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Use pci_vfs_assigned instead of igb_vfs_are_assignedAlexander Duyck2013-04-251-35/+1Star
| | | | | | | | | | | | | | | | | | This change makes it so that the igb driver uses the generic helper pci_vfs_assigned instead of the igb specific function igb_vfs_are_assigned. 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>
| * pci: Add SRIOV helper function to determine if VFs are assigned to guestAlexander Duyck2013-04-252-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is meant to add a helper function that will determine if a PF has any VFs that are currently assigned to a guest. We currently have been implementing this function per driver, and going forward I would like to avoid that by making this function generic and using this helper. v2: Removed extern from declaration of pci_vfs_assigned in pci.h and return 0 if SR-IOV is disabled with is inline with other PCI SRIOV functions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Add SMBI semaphore to I210/I211Matthew Vick2013-04-253-26/+43
| | | | | | | | | | | | | | | | | | | | It was previously thought that, since I210/I211 are single port devices, they did not need the SMBI semaphore. This is not the case. Add support for the SMBI semaphore. Signed-off-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: SERDES loopback sigdetect bit on i210 devicesAkeem G. Abodunrin2013-04-251-7/+2Star
| | | | | | | | | | | | | | | | | | | | This patch implements SERDES loopback configuration for i210 devices by unsetting sigdetect bit, so as to fix Ethtool loopback test failure. Old sigdetect code is also simplified to take care of all devices newer than 82580 Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: add WOL support for new subdevice IDEmil Tantilov2013-04-252-0/+2
| | | | | | | | | | | | | | | | This patch adds a define and WOL support for a new subdevice ID. 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>
| * ixgbe: add SFP+ LX module supportDon Skidmore2013-04-254-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds LX support to 82599 devices. This is an alternate patch to the one suggested by Stefan Behte <s.behte@babiel.com> In addition this patch includes some cleanups such as: - removed parenthesis around "x == y ||" lines inside an if statement for consistency. - grouped the sx/lx sfp types along with srlr in ixgbe_get_settings() since they all have the same supported, advertised and port values. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reported-by: Stefan Behte <s.behte@babiel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: rename wol_supported to more fitting wol_enabledJacob Keller2013-04-253-4/+4
| | | | | | | | | | | | | | | | | | | | | | The variable wol_supported really is just checking whether it is enabled, rather than whether it is supported. If it is enabled it will be supported, but this does not necessarily hold true the other way around. This patch renames the variable to avoid confusion. 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>
| * ixgbe: add driver support for x520 OCP adapter.Don Skidmore2013-04-252-0/+9
| | | | | | | | | | | | | | | | | | This patch adds support for the new OCP x520 adapter. This support includes WoL. 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>
| * ixgbe: fix possible divide by zero in ixgbe_update_itrDon Skidmore2013-04-251-0/+3
| | | | | | | | | | | | | | | | | | | | Protect the code by bailing out of ixgbe_update_itr() when this occurs. The next call to ixgbe_update_itr will continue to dynamically update ITR. Signed-of-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>
* | Merge branch 'master' of ↵David S. Miller2013-04-2511-55/+64
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== The following patchset contains fixes for recently applied Netfilter/IPVS updates to the net-next tree, most relevantly they are: * Fix sparse warnings introduced in the RCU conversion, from Julian Anastasov. * Fix wrong endianness in the size field of IPVS sync messages, from Simon Horman. * Fix missing if checking in nf_xfrm_me_harder, from Dan Carpenter. * Fix off by one access in the IPVS SCTP tracking code, again from Dan Carpenter. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | netfilter: nf_nat: missing condition in nf_xfrm_me_harder()Dan Carpenter2013-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This if statement was accidentally dropped in (aaa795a netfilter: nat: propagate errors from xfrm_me_harder()) so now it returns unconditionally. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * | ipvs: Use network byte order for sync message sizeSimon Horman2013-04-231-13/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct ip_vs_sync_mesg and ip_vs_sync_mesg_v0 are both sent across the wire and used internally to store IPVS synchronisation messages. Up until now the scheme used has been to convert the size field to network byte order before sending a message on the wire and convert it to host byte order when sending a message. This patch changes that scheme to always treat the field as being network byte order. This seems appropriate as the structure is sent across the wire. And by consistently treating the field has network byte order it is now possible to take advantage of sparse to flag any future miss-use. Acked-by: Julian Anastasov <ja@ssi.bg> Acked-by: Hans Schillstrom <hans@schillstrom.com> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: off by one in set_sctp_state()Dan Carpenter2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sctp_events[] come from sch->type in set_sctp_state(). They are between 0-255 so that means we need 256 elements in the array. I believe that because of how the code is aligned there is normally a hole after sctp_events[] so this patch doesn't actually change anything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: Use min3() in ip_vs_dbg_callid()Simon Horman2013-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two motivations for this: 1. It improves readability to my eyes 2. Using nested min() calls results in a shadowed _min1 variable, which is a bit untidy. Sparse complained about this. I have also replaced (size_t)64 with a variable of type size_t and value 64. This also improves readability to my eyes. Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: Avoid shadowing net variable in ip_vs_leave()Simon Horman2013-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Flagged by sparse. Compile and sparse tested only. Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: fix sparse warnings for some parametersJulian Anastasov2013-04-234-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some service fields are in network order: - netmask: used once in network order and also as prefix len for IPv6 - port Other parameters are in host order: - struct ip_vs_flags: flags and mask moved between user and kernel only - sync state: moved between user and kernel only - syncid: sent over network as single octet Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: fix sparse warnings in lblc and lblcrJulian Anastasov2013-04-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kbuild test robot reports for sparse warnings in commits c2a4ffb70eef39 ("ipvs: convert lblc scheduler to rcu") and c5549571f975ab ("ipvs: convert lblcr scheduler to rcu"). Fix it by removing extra __rcu annotation. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: fix the remaining sparse warnings in ip_vs_ctl.cJulian Anastasov2013-04-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | - RCU annotations for ip_vs_info_seq_start and _stop - __percpu for cpustats - properly dereference svc->pe in ip_vs_genl_fill_service Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: fix sparse warnings for ip_vs_conn listingJulian Anastasov2013-04-231-8/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kbuild test robot reports for sparse warnings in commit 088339a57d6042 ("ipvs: convert connection locking"): net/netfilter/ipvs/ip_vs_conn.c:962:13: warning: context imbalance in 'ip_vs_conn_array' - wrong count at exit include/linux/rcupdate.h:326:30: warning: context imbalance in 'ip_vs_conn_seq_next' - unexpected unlock include/linux/rcupdate.h:326:30: warning: context imbalance in 'ip_vs_conn_seq_stop' - unexpected unlock Fix it by running ip_vs_conn_array under RCU lock to avoid conditional locking and by adding proper RCU annotations. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: properly dereference dest_dst in ip_vs_forget_devJulian Anastasov2013-04-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use rcu_dereference_protected to resolve sparse warning, found by kbuild test robot: net/netfilter/ipvs/ip_vs_ctl.c:1464:35: warning: dereference of noderef expression Problem from commit 026ace060dfe29 ("ipvs: optimize dst usage for real server") Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
* | | Merge branch 'qlcnic'David S. Miller2013-04-256-61/+277
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jitendra Kalsaria says: ==================== This set of patches has following updates: * Enhanced channel configuration logs by adding logs for various cases. * Take EPORT out of reset before disabling pause frame generation in the adapter. * Add eSwitch statistics support in ethtool stats. * Enable interrupt coalescing for 83xx adapter. * Rename IRQ description. * Added PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_834X and PCI_DEVICE_ID_QLOGIC_824X for the patch "qlcnic: Add identifying string for 83xx adapter" as per Francois comment. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Update version to 5.2.42Shahed Shaikh2013-04-251-2/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Add identifying string for 83xx adapterHimanshu Madhani2013-04-251-19/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Added identifying strings for 8300 Series of adapters. o updated PCI_VENDOR_ID_QLOGIC and PCI_DEVICE_ID_824X for 8200 Series adapter. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Rename the IRQ description.Himanshu Madhani2013-04-252-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's what modified vectors will look like in the /proc/interrupts MSIx INTx ----------------------------------------- 83xx qlcnic[MB] qlcnic-ethX[Rx0] qlcnic-ethX[Rx1] .. qlcnic-ethX[RxN] qlcnic-ethx[Tx0] qlcnic[MB+Tx0+Rx0] 82xx qlcnic-ethX[Rx0] qlcnic-ethX[Rx1] .. qlcnic-ethX[Tx0+RxN] qlcnic-ethX[Tx0+Rx0] Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Enable Interrupt Coalescing for 83xx adapterHimanshu Madhani2013-04-254-22/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Interrupt coalescing through ethtool on 83xx adapter. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Add eSwitch statistics supportShahed Shaikh2013-04-253-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | o Read eSwitch statistics from adapter and display them as part of ethtool statistics. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Take EPORT out of reset sequence before disabling PAUSEManish Chopra2013-04-251-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Disabling PAUSE requires access to EPORT registers, which may cause a wedge, if EPORT is in reset. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qlcnic: Enhance channel configuration logsManish Chopra2013-04-253-8/+28
|/ / | | | | | | | | | | | | | | | | o Add logs for various failure conditions during channel configuration. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'bnx2x'David S. Miller2013-04-246-28/+59
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yuval Mintz says: ==================== This patch series contains several enhancements, as well as small fixes: - Patch [1/5] - Prevent a theoretical problem in our GRO implementation. - Patch [2/5] - Support Rx/Tx pause control configuration in autoneg. - Patch [3/5] - Enhance support for VF's MAC setting and removal. - Patch [4/5] - Fix a small memory leak between bnx2x and cnic. - Patch [5/5] - Allow bnx2x to recover after a second slot reset. Please consider applying these patches to `net-next'. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Allow recovery from second slot resetYuval Mintz2013-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of PCIe Advanced Error Reporting flow, if a fatal PCI error occurs, the AER driver will cause bnx2x's PCI-core to reset. The driver's PCI error handlers will in turn restore the PCI configuration space values by calling `pci_restore_state'. However, as bnx2x does not save the PCI configuration after restoration, An additional fatal PCI error will leave the function in an unstable state until reboot, as the registers in the PCI configuration space will contain reset values. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Fix memory leakYuval Mintz2013-04-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There exists an `allocation race' between the CNIC and bnx2x drivers, in which both drivers allocate the same t2 memory while disregarding a possible previous allocation. Additionally, due to the current order of memory releases, some of the ILT memory in the driver is not released correctly when unloading the driver. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Enhance MAC configuration for VFsDmitry Kravkov2013-04-244-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improved support for adding/removing vf mac addresses. This includes the case where HyperVisor forced the address (sampled from bulletin board), and the case where it did not in which the VF can configure its own mac address. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Allow RX/TX pause control in autonegYaniv Rosner2013-04-242-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when link is configured to auto-negotiate the flow control, disabling RX/TX pause via ethtool doesn't work. This fixes the behaviour, advertising asymmetric pause in case either one is exclusively enabled. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: prevent GRO false checksum claimsYuval Mintz2013-04-241-5/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a more robust error handling flow in case of incorrect behaviour by the FW when passing on GRO aggregations. Although this should never happen (i.e., this is merely a theoretical fix), if the bnx2x driver was to receive a GRO from FW with protocol other than IPv4/IPv6, the driver would falsely claim to have performed partial checksum and set various incorrect fields in the skb header. Current behaviour of the bnx2x driver (i.e., print an error) is insufficient. This patch remedies this by simply preventing the false claims. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'mlx4'David S. Miller2013-04-2418-20/+507
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or Gerlitz says: ==================== This series adds support for the SRIOV ndo_set_vf callbacks to the mlx4 driver. Series done against the net-next tree as of commit 0c501345c "batman-adv: fix global protection fault during soft_iface destruction". We have successfully tested the series on net-next, except for getting the VF link info issue I have reported earlier today on netdev, we see the problem for both ixgbe and mlx4 VFs. Just to make sure get VF config is working OK with patch #6 - we have run it over 3.8.8 too. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net/mlx4_en: Add a service taskAmir Vadai2013-04-243-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a service task to run tasks that needed to be executed periodically. Currently the only task is a watchdog to catch NIC clock overflow, to make timestamping accurate. Will move the statistics task into this framework in a later patch. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net/mlx4_en: Support software timestampingAmir Vadai2013-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Kernel software timestamping requires that the driver calls skb_tx_timestamp just before passing the skb to the HW MAC layer. This patch adds this call. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net/mlx4_en: Add HW timestamping (TS) supportAmir Vadai2013-04-2415-17/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch allows to enable/disable HW timestamping for incoming and/or outgoing packets. It adds and initializes all structs and callbacks needed by kernel TS API. To enable/disable HW timestamping appropriate ioctl should be used. Currently HWTSTAMP_FILTER_ALL/NONE and HWTSAMP_TX_ON/OFF only are supported. When enabling TS on receive flow - VLAN stripping will be disabled. Also were made all relevant changes in RX/TX flows to consider TS request and plant HW timestamps into relevant structures. mlx4_ib was fixed to compile with new mlx4_cq_alloc() signature. 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>
| * | net/mlx4_core: Read HCA frequency and map internal clockEugenia Emantayev2013-04-245-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | Read HCA frequency, read PCI clock bar and offset, map internal clock to PCI bar. 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>
| * | net/mlx4_core: Add timestamping device capabilityEugenia Emantayev2013-04-242-2/+8
|/ / | | | | | | | | | | | | | | | | Add new device capability for timestamping support and query FW to retrieve it. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>