- 03 Dec, 2015 31 commits
-
-
Neerav Parikh authored
The separate functions to gather Flow control Rx XOFF stats was to determine if the Tx for a queue was paused due to Link Flow Control(LFC) or Priority Flow Control(PFC). But, with recent change in the i40e driver the logic for checking th Tx hang has been removed and these functions don't do anything meaningful. Hence, there is no need to keep these separate functions to gather Rx XOFF stats for LFC or PFC. This patch removes these functions and moves the stat collection for XOFF Rx to the i40e_update_pf_stats() that collects all the PF stats. Change-ID: Iec1452dac3a6766f0d968e754cb407530d7c60cd Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Jesse Brandeburg authored
Instead of having our own custom symbol, we can just rely on whether or not the kernel has the feature enabled. In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle built-in or module in the current BKM way. Change-ID: I5890fbb518ff8ed6bb07c3362fb0a8a829f9b241 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>
-
Jesse Brandeburg authored
Ethtool priv flags implementation to enable or disable packet split, which is a hardware feature that inspects headers and will put headers in a separate DMA buffer from the payload data. The driver was automatically choosing to enable packet split in some cases and this gives the user the ability to turn it off/on explicitly. to query state: ethtool --show-priv-flags ethx to enable: ethtool --set-priv-flags ethx packet-split on to disable: ethtool --set-priv-flags ethx packet-split off Why would anyone want this? Because some environments benefit from header/data split in the receive buffer, and the driver defaults to one or the other depending on environment/kernel parameters. Why didn't you implement a generic ethtool control for this feature? Because Intel hardware is the only hardware that supports header/data split. Change-ID: I803121e1eecc9ccb2884031fd85dd1110b3af66d 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>
-
Mitch Williams authored
Don't use uint32_t type the kernel. Use u32 instead. No functional change. Change-ID: I77bbf3b6464edaef747c7104b43534032a4dba63 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>
-
Mitch Williams authored
i40e_sync_vsi_filters() is the surly teenager of this driver. It says it's going to report errors, but it doesn't actually do that most of the time. And when it does, it leaves a mess. Change this function to have a common exit point so it will properly release the busy lock on the VSI. Propagate errors to the callers. Finally, adjust a few callers to check for and deal with errors from this function. Change-ID: Ic6af4956491e72402ebb3c538a3c31a0ad7f8667 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>
-
Mitch Williams authored
These allocations don't need to be at atomic level. GFP_KERNEL is fine and they'll reduce stress on the allocator when the system is starved for memory. Change-ID: I3561d0399a681de0ad25291b6c848b224c1fde12 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>
-
Kiran Patil authored
This patch fixes the memory leak which would be seen otherwise when user programs flow-director filter using ethtool (sideband filter programming). When ethtool is used to program flow directory filter, 'raw_buf' gets allocated and it is supposed to be freed as part of queue cleanup. But check of 'tx_buffer->skb' was preventing it from being freed. Change-ID: Ief4f0a1a32a653180498bf6e987c1b4342ab8923 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>
-
Kiran Patil authored
This patch contains following changes: - detection and recovery logic (issue SW interrupt) has been moved to service_task from timeout function. - added some more debug info from tx_timeout. Logic to detect and recover TX queue hung is now two step process: - service_task detects TX queue hung and sets a bit(hung_detected) if it was not set. - if bit was set (means this is back-back hung condition detected), issue SW interrupt and clear the bit. - napi_poll clears the bit unconditionally since it cleans TX/RX queues. Change-ID: Ieed03a48927c845a988b3ff375090bf37caeb903 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>
-
Mitch Williams authored
We already print the driver info string in probe, so don't print it again in init. No need to repeat. No need to repeat. Change-ID: Ief597997f580a8c54d5950e3a84c29f2075be66b 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>
-
Mitch Williams authored
Use the helper function to set the real number of RX queues, and also set the real number of TX queues. Change-ID: I67982799de3f248fb4158ccdc9b1a74385f42ddd 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>
-
Mitch Williams authored
Future devices will allow for more queue pairs, so allocate a netdev that can handle them. While we're at it, get rid of the separate MAX_TX/MAX_RX defines. Since we always get matched queue pairs, having these makes no sense. Change-ID: I0e3556cd9a962506e509eb7c0afa36b329e8cb51 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>
-
Jarod Wilson authored
Don't open-code it. CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com> CC: Shradha Shah <sshah@solarflare.com> CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson <jarod@redhat.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Eric Dumazet authored
If tcp_send_ack() can not allocate skb, we properly handle this and setup a timer to try later. Use __GFP_NOWARN to avoid polluting syslog in the case host is under memory pressure, so that pertinent messages are not lost under a flood of useless information. sk_gfp_atomic() can use its gfp_mask argument (all callers currently were using GFP_ATOMIC before this patch) We rename sk_gfp_atomic() to sk_gfp_mask() to clearly express this function now takes into account its second argument (gfp_mask) Note that when tcp_transmit_skb() is called with clone_it set to false, we do not attempt memory allocations, so can pass a 0 gfp_mask, which most compilers can emit faster than a non zero or constant value. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Merge branch 'hv_netvsc-less-headroom' K. Y. Srinivasan says: ==================== hv_netvsc: Eliminate the additional head room In an attempt to avoid having to allocate memory on the send path, the netvsc driver was requesting additional head room so that both rndis header and the netvsc packet (the state that had to persist) could be placed in the skb. Since the amount of head room requested was exceeding the default head room as set in LL_MAX_HEADER, we were forcing a reallocation of skb. With this patch-set, I have reduced the size of the netvsc packet to less than 20 bytes and with this reduction we don't need to ask for any additional headroom. We place the rndis header in the skb head room and we place the netvsc packet in control buffer area in the skb. V2: - Addressed review comments: - Eliminated more fields from netvsc packet structure. V3: - Fixed a typo in patch: hv_netvsc: Don't ask for additional head room in the skb. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate vlan_tci from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate status from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate xmit_more from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate completion_func from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate is_data_pkt from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate send_completion_tid from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate page_buf from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Vitaly Kuznetsov authored
Packet scheduler guarantees there won't be multiple senders for the same queue and as we use q_idx for multi_send_data the spinlock is redundant. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Vitaly Kuznetsov authored
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
The rndis header is 116 bytes big and can be placed in the default head room that will be available in the skb. Since the netvsc packet is less than 48 bytes, we can use the skb control buffer for the netvsc packet. With these changes we don't need to ask for additional head room. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate send_completion_ctx from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate send_completion from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminatte the data field from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate rndis_msg pointer from hv_netvsc_packet structure. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Eliminate the channel field in hv_netvsc_packet structure. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
Rearrange the elements of struct hv_negtvsc_packet for optimal layout - eliminate unnecessary padding. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
KY Srinivasan authored
As part of reducing the size of the hv_netvsc_packet, resize some of the variables based on their usage. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
- 02 Dec, 2015 9 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller authored
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-12-01 This series contains updates to i40e and i40evf only. Helin adds new fields to i40e_vsi to store user configured RSS config data and the code to use it. Also renamed RSS items to clarify functionality and scope to users. Fixed a confusing kernel message of enabling RSS size by reporting it together with the hardware maximum RSS size. Anjali fixes the issue of forcing writeback too often causing us to not benefit from NAPI. Jesse adds a prefetch for data early in the transmit path to help immensely for pktgen and forwarding workloads. Fixed the i40e driver that was possibly sleeping inside critical section of code. Carolyn fixes an issue where adminq init failures always provided a message that NVM was newer than expected, when this is not always the case for init_adminq failures. Fixed by adding a check for that specific error condition and a different helpful message otherwise. Mitch fixes error message by telling the user which VF is being naughty, rather than making them guess. Updated the queue_vector array from a statically-sized member of the adapter structure, to a dynamically-allocated and -sized array. This reduces the size of the adapter structure and allows us to support any number of queue vectors in the future without changing the code. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Jesse Brandeburg authored
With the final edition of the patches to remove sleeps from the driver's entry points, the grab_rtnl argument is no longer needed, so partially revert the commit that added it. Change-ID: Ib9778476242586cc9e58b670f5f48d415cb59003 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>
-
Jesse Brandeburg authored
The driver was being called by VLAN, bonding, teaming operations that expected to be able to hold locks like rcu_read_lock(). This causes the driver to be held to the requirement to not sleep, and was found by the kernel debug options for checking sleep inside critical section, and the locking validator. Change-ID: Ibc68c835f5ffa8ffe0638ffe910a66fc5649a7f7 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>
-
Catherine Sullivan authored
Bump. Change-ID: I00ebbb2e5e5572f947502b8f6db4d94f666d6b14 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>
-
Mitch Williams authored
Instead of awkwardly keeping a fixed array of pointers in the adapter struct and then allocating ring structs individually, just keep a single pointer and allocate a single blob for the arrays. This simplifies code, shrinks the adapter structure, and future-proofs the driver by not limiting the number of rings we can handle. Change-ID: I31334ff911a6474954232cfe4bc98ccca3c769ff 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>
-
Mitch Williams authored
Change the queue_vector array from a statically-sized member of the adapter structure to a dynamically-allocated and -sized array. This reduces the size of the adapter structure, and allows us to support any number of queue vectors in the future without changing the code. Change-ID: I08dc622cb2f2ad01e832e51c1ad9b86524730693 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>
-
Mitch Williams authored
If, upon a midnight dreary, the PF returns ERR_PARAM when the VF is requesting resources, that's fatal. Either the firmware or NVM is badly, badly misconfigured, or this VF has been disabled due to a previous VF driver sending a bunch of bogus messages. Either way, there is no recovery from this. Don't ponder weak and weary, just quit. Change-ID: I09d9f16cc4ee7fec3b57646a289d33838c1c5bf5 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>
-
Mitch Williams authored
If we get an invalid message from a VF, we should tell the user which VF is being naughty, rather than making them guess. Change-ID: I9252cef7baea3d8584043ed6ff12619a94e2f99c 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>
-
Helin Zhang authored
This patch fixes the confusing kernel message of enabled RSS size, by reporting it together with the hardware maximum RSS size. Change-ID: I64864dbfbc13beccc180a7871680def1f3d5a339 Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-