aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-18cxgb4vf: Use __dev_uc_sync/__dev_mc_sync to sync MAC addressHariprasad Shenai4-61/+171
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-18cxgb4: Use __dev_uc_sync/__dev_mc_sync to sync MAC addressHariprasad Shenai3-73/+184
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-18vxlan: tun_id is 64bit, not 32bitJiri Benc1-2/+3
The tun_id field in struct ip_tunnel_key is __be64, not __be32. We need to convert the vni to tun_id correctly. Fixes: 54bfd872bf16 ("vxlan: keep flags and vni in network byte order") Reported-by: Paolo Abeni <pabeni@redhat.com> Tested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-18net: phy: Add SGMII support for Marvell 88E1510/1512/1514/1518Stefan Roese1-0/+41
Add code to select SGMII-to-copper mode upon SGMII interface selection. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-18isdn: divamnt: use y2038-safe ktime_get_ts64() for trace data timestampsAlison Schofield2-28/+6
divamnt stores a start_time at module init and uses it to calculate elapsed time. The elapsed time, stored in secs and usecs, is part of the trace data the driver maintains for the DIVA Server ISDN cards. No change to the format of that time data is required. To avoid overflow on 32-bit systems use ktime_get_ts64() to return the elapsed monotonic time since system boot. This is a change from real to monotonic time. Since the driver only stores elapsed time, monotonic time is sufficient and more robust against real time clock changes. These new monotonic values can be more useful for debugging because they can be easily compared to other monotonic timestamps. Note elaspsed time values will now start at system boot time rather than module load time, so they will differ slightly from previously reported values. Remove declaration and init of previously unused time constants: start_sec, start_usec. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17i40e/i40evf: Bump i40e to 1.4.15 and i40evf to 1.4.11.Catherine Sullivan2-2/+2
Bump. Change-ID: Ie280dc67e37a1cf667c3469499a4fb90f4177b75 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: When in promisc mode apply promisc mode to Tx Traffic as wellAnjali Singhai Jain3-3/+12
In MFP mode particularly when we were setting the PF VSI in limited promiscuous, the HW switch was still mirroring the outgoing packets from other VSIs (VF/VMdq) onto the PF VSI. With this new bit set, the mirroring doesn't happen any more and so we are in limited promiscuous on the PF VSI in MFP which is similar to defport. An API check is not required, since this bit is reserved for FW API version < 1.5 Also update copyright year in file headers. Change-ID: I9840cb95f11dde733d943cb03ce84f68b9611bc8 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: clean event descriptor before useShannon Nelson2-10/+15
In one obscure corner case, it was possible to clear the NVM update wait flag when no update_done message was actually received. This patch cleans the event descriptor before use, and moves the opcode check to where it won't get done if there was no event to clean. Also update copyright year in file headers. Change-ID: I68bbc41965e93f4adf07cbe98b9dfd63d41509a4 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40evf: set adapter state on reset failureMitch Williams1-0/+1
If a reset fails to complete, the driver gets its affairs in order and awaits the cold solace of rmmod. Unfortunately, it was not properly setting the adapter state, which would cause a panic on rmmod, instead of the desired surcease. Set the adapter state to DOWN in this case, and avoid a panic. Change-ID: I6fdd9906da52e023f8dc744f7da44b5d95278ca9 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: better error reporting for nvmupdateShannon Nelson2-20/+24
Make sure we return EBUSY while finishing up a reset, and add a few bits for better debug messages. Change-ID: I23f6c28a8d96d7aa171abcc265737cec7826c292 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: expand commentMitch Williams1-1/+5
Explain why we cannot remove this code, even though it works differently than any of our other interrupt cause handling code. Change-ID: Ie66203bd037a466066036611c31d44f759ec5176 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: Do not disable queues in the Legacy/MSI Interrupt handlerAnjali Singhai Jain2-23/+6
The queues should never be enabled/disabled in the interrupt handler, ICR0 interrupt enable should be the only thing that needs to be dynamically changed in the handler. This patch fixes that. Without this patch X722 platforms were seeing weird ping timings when in Legacy mode since it takes a whole lot of time for the HW/FW to re-enable queues. Change-ID: If065afc45d81c5a19d4a94a00cd5b8f61cefc40c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e/i40evf: avoid atomicsMitch Williams2-16/+26
In the case where we have a page fully used by receive data, we need to release the page fully to the stack. Instead of calling get_page (which increments the page count) followed by free_page (which decrements the page count), just donate our reference to the stack. Although this donation is not tax deductible, it does allow us to avoid two very expensive atomic operations that reverse each other. Change-ID: If70739792d5748995fc175ec92ac2171ed4ad8fc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: Removal of code which relies on BASE VEB SEIDKiran Patil3-17/+4
Fixed mapping of SEID is removed from specification. Hence this patch removes code which was using hard coded base VEB SEID. Changed FCoE code to use "hw->pf_id" to obtain correct "idx" and verified. Removed defines for BASE VSI/VEB SEID and BASE_PF_SEID since it is not used anymore. Change-ID: Id507cf4b1fae1c0145e3f08ae9ea5846ea5840de Signed-off-by: Kiran Patil <kiran.patil@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: Fix PROMISC mode for Multi-function per port (MFP) devicesAnjali Singhai Jain1-1/+3
This patch falls back to enabling unicast, multicast and broadcast promiscuous mode when the driver must disable it's use of "default port" aka defport mode (which is normally used to provide a promiscuous mode), due to internal incompatibility with Multiple Function per Port (aka MFP). The situation that requires this patch is when Physical Function 0 is the device being used, and it can support SR-IOV when MFP is enabled, via the driver creating a VEB on an MFP enabled adapter. Change-ID: Ie90b00d0d58782a5dfcf2c3c9725a2eb90bd63d8 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: Add a SW workaround for lost interruptsAnjali Singhai Jain7-20/+40
This patch adds a workaround for cases where we might have interrupts that got lost but WB happened. If that happens without this patch we will see a tx_timeout. To work around it, this patch goes ahead and reschedules NAPI in that situation, if NAPI is not already scheduled. We also add a counter in ethtool to keep track of when we detect a case of tx_lost_interrupt. Note: napi_reschedule() can be safely called from process/service_task context and is done in other drivers as well without an issue. Change-ID: I00f98f1ce3774524d9421227652bef20fcbd0d20 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: trivial: cleanup use of pf->hwJesse Brandeburg1-4/+4
This patch makes use of a pointer called hw consistent in the i40e_remove function. Change-ID: Idacc7ff0a09a68289c57457a78618bf5497de077 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40evf: support packet split receiveMitch Williams4-31/+110
Support packet split receive on VFs. This is off by default but can be enabled using ethtool private flags. Because we need to trigger a reset from outside of i40evf_main.c, create a new function to do so, and export it. Also update copyright year in file headers. Change-ID: I721aa5d70113d3d6d94102e5f31526f6fc57cbbb Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: drop unused debugfs file "dump"Jesse Brandeburg1-250/+0
There was a completely unused file "dump" in debugfs that never panned out to be useful. Change-ID: I12bb9e37b5a83299725dda815a8746157baf6562 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: get rid of magic numberMitch Williams1-1/+1
We have a define for this, use it. No functional change. Change-ID: Ic0e3ea4f562e46de63b2a8de07f291ccc10205fd Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17vxlan: treat vni in metadata based tunnels consistentlyJiri Benc1-4/+4
For metadata based tunnels, VNI is ignored when doing vxlan device lookups (because such tunnel receives all VNIs). However, this was not honored by vxlan_xmit_one when doing encapsulation bypass. Move the check for metadata based tunnel to the common place where it belongs. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: clean up rx error pathJiri Benc1-21/+14
When there are unrecognized flags present in the vxlan header, it doesn't make much sense to return the packet for further UDP processing, especially considering that for other invalid flag combinations we drop the packet because of previous checks. This means we return positive value only at the beginning of the function where tun_dst is not yet allocated. This allows us to get rid of the bad_flags and error jump labels. When we're dropping packet, we need to free tun_dst now. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: clean up extension handling on rxJiri Benc1-30/+32
Bring the extension handling to a single place and move the actual handling logic out of vxlan_udp_encap_recv as much as possible. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: move GBP header parsing to a separate functionJiri Benc1-14/+19
To make vxlan_udp_encap_recv shorter and more comprehensible. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: simplify vxlan_remcsumJiri Benc1-14/+8
Part of the parameters is not needed. Simplify the caller of this function in preparation of making vxlan rx more comprehensible. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: keep flags and vni in network byte orderJiri Benc1-58/+57
Prevent repeated conversions from and to network order in the fast path. To achieve this, define all flag constants in big endian order and store VNI as __be32. To prevent confusion between the actual VNI value and the VNI field from the header (which contains additional reserved byte), strictly distinguish between "vni" and "vni_field". Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17vxlan: introduce vxlan_hdrJiri Benc1-10/+7
Currently, pointer to the vxlan header is kept in a local variable. It has to be reloaded whenever the pskb pull operations are performed which usually happens somewhere deep in called functions. Create a vxlan_hdr function and use it to reference the vxlan header instead. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller12-223/+445
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2016-02-17 This series contains updates to i40e/i40evf only (again). Jesse moves sync_vsi_filters() up in the service_task because it may need to request a reset, and we do not want to wait another round of service task time. Refactored the enable_icr0() in order to allow it to be decided by the caller whether the CLEARPBA (clear pending events) bit will be set while re-enabling the interrupt. Also provides the "Don't Give Up" patch, where the driver will keep polling trying to allocate receive buffers until it succeeds. This should keep all receive queues running even in the face of memory pressure. Cleans up the debugging helpers by putting everything in hex to be consistent. Neerav updates the DCB firmware version related checkes specific to X710 and XL710 only since the checks are not required for X722 devices. Shannon adds the use of the new shared MAC filter bit for multicast and broadcast filters in order to make better use of the filters available from the device. Added a parameter to allow the driver to set the enable/disable of statistics gathering in the hardware switch. Also the L2 cloud filtering parameter is removed since it was never used. Anjali refactors the force_wb and WB_ON_ITR functionality since Force-WriteBack functionality in X710/XL710 devices has been moved out of the clean routine and into the service task, so we need to make sure WriteBack-On-ITR is separated out since it is still called from clean. Catherine changes the VF driver string to reflect all the products that are supported. Mitch refactors the packet split receive code to properly use half-pages for receives. Also changes the use of bitwise operators to logical operators on clean_complete variable, while making a witty reference to Mr. Spock. Cleans up (i.e. removes) the hsplit field in the ring structure and use the existing macro to detect packet split enablement, which allows debugfs dumps of the VSI to properly show which recevie routine is in use. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: return -EOPNOTSUPP for undefined world opsJiri Pirko1-16/+17
Suggested-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: move OF-DPA stuff into separate fileJiri Pirko3-2877/+2946
Carve out OF-DPA would specific code from the common file to the world file. This change required struct rocker and struct rocker_port split into world specific struct ofdpa and struct ofdpa_port. Along with this the world specific functions and defines were renamed from prefix "rocker_" to "ofdpa_". Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: call rocker_cmd_exec function with "nowait" boolean instead of flagsJiri Pirko1-15/+23
No need to push down rocker flags just to check if this is nowait or not. Let the caller handle that. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: remove trans parameter to rocker_cmd_exec functionJiri Pirko1-30/+35
The only purpose of passing this parameter is to check for prepare phase. The only reason for a failure in that state is if TLVs don't fit into descriptor. That is highly unlikely and if that happens, it is a driver bug. So remove this parameter from rocker_cmd_exec, and check for prepare phase in caller. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: pre-allocate wait structures during cmd ring initJiri Pirko1-21/+66
This avoids need to alloc/free wait structure for every command call. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: pass "learning" value as a parameter to rocker_port_set_learningJiri Pirko1-5/+9
Be consistent with the rest of the setting functions, and pass "learning" as a bool function parameter. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: introduce worlds infrastructureJiri Pirko4-3/+545
This is another step on the way to per-world clean cut. Introduce world ops hooks which each world can implement in world-specific way. Also introduce world infrastructure along with OF-DPA world stub. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: move rocker and rocker_port structs into headerJiri Pirko2-73/+75
And take some other related thing along. They are going to be pushed into of-dpa part anyway. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: implement get settings mode commandJiri Pirko1-0/+32
Introduce a helper to ask HW for the port mode (world). Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: push tlv processing into separate filesJiri Pirko5-221/+284
Carve out TLV processing helpers into separate files. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: rename rocker.c to rocker_main.cJiri Pirko2-7/+9
Since "rocker.c" is going to be split into multiple files, start with renaming original "rocker.c" file to "rocker_main.c". Multiple code parts are going to be cut from "rocker_main.c" later on. Fix couple of checkpatch issues on the way. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: rename rocker.h to rocker_hw.hJiri Pirko2-5/+5
Since "rocker.h" file is going to be used for different purpose, rename the hardware-specific header to "rocker_hw.h". Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17rocker: remove unused rocker_port param from alloc funcs and shorten their namesJiri Pirko1-45/+42
No need to pass rocker_port around to alloc/free rocker functions, since they now use switchdev_trans for memory management storage. With the param removal, shorten the name of the functions since they now has nothing to do with rocker port. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17drivers: net: xgene: Add support for multiple queuesIyappan Subramanian6-194/+320
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Khuong Dinh <kdinh@apm.com> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> Tested-by: Toan Le <toanle@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17drivers: net: xgene: Add support for RSSIyappan Subramanian2-5/+422
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Khuong Dinh <kdinh@apm.com> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> Tested-by: Toan Le <toanle@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17drivers: net: xgene: Add support for Classifier engineIyappan Subramanian6-9/+649
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Khuong Dinh <kdinh@apm.com> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> Tested-by: Toan Le <toanle@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17ixgbe: fix dates on header of ixgbe_model.hJohn Fastabend1-1/+1
Fixes: 9d35cf062e05 ("net: ixgbe: add minimal parser details for ixgbe") Reported-by: Mark Rustad <mark.d.rustad@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17ixgbe: use u32 instead of __u32 in model headerJohn Fastabend1-9/+9
I incorrectly used __u32 types where we should be using u32 types when I added the ixgbe_model.h file. Fixes: 9d35cf062e05 ("net: ixgbe: add minimal parser details for ixgbe") Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17i40e/i40evf: Bump versionJesse Brandeburg2-2/+2
Bump version to i40e-1.4.13 and i40evf-1.4.9 Change-ID: I9db37f9d4899141c3e5455dfb456d45465b8c035 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e: properly show packet split status in debugfsMitch Williams3-5/+3
Get rid of the unused hsplit field in the ring struct and use the existing macro to detect packet split enablement. This allows debugfs dumps of the VSI to properly show which Rx routine is in use. Change-ID: Ic4e9589e6a788ab196ed0850703f704e30c03781 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e/i40evf: use logical operators, not bitwiseMitch Williams2-4/+6
Mr. Spock would certainly raise an eyebrow to see us using bitwise operators, when we should clearly be relying on logic. Fascinating. Change-ID: Ie338010c016f93e9faa2002c07c90b15134b7477 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17i40e/i40evf: use pages correctly in RxMitch Williams5-86/+159
Refactor the packet split Rx code to properly use half-pages for receives. The previous code was doing way more mapping and unmapping than it needed to, and wasn't properly using half-pages. Increment the page use count each time we give a half-page to an skb, knowing that the stack will probably process and release the page before we need it again. Only free and reallocate pages if the count shows that both half-pages are in use. Add counters to track reallocations and page reuse. Change-ID: I534b299196036b64be82b4861a0a4036310a8f22 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>