summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ebpf: remove kernel test stubsDaniel Borkmann2015-03-013-83/+3
| | | | | | | | | | | | | Now that we have BPF_PROG_TYPE_SOCKET_FILTER up and running, we can remove the test stubs which were added to get the verifier suite up. We can just let the test cases probe under socket filter type instead. In the fill/spill test case, we cannot (yet) access fields from the context (skb), but we may adapt that test case in future. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 's390-next'David S. Miller2015-02-287-3742/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Ursula Braun says: ==================== s390: network patches for net-next here are some s390 related patches for net-next ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * MAINTAINERS: update S390 NETWORK DRIVERS maintainerUrsula Braun2015-02-281-1/+0
| | | | | | | | | | | | | | | | remove Frank Blaschka as S390 NETWORK DRIVERS maintainer Acked-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qeth: Fix command sizesStefan Raspl2015-02-281-2/+3
| | | | | | | | | | | | | | | | | | | | This patch adjusts two instances where we were using the (too big) struct qeth_ipacmd_setadpparms size instead of the commands' actual size. This didn't do any harm, but wasted a few bytes. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390: remove claw driverUrsula Braun2015-02-285-3739/+1
|/ | | | | | | | claw devices are outdated and no longer supported. This patch removes the claw driver. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: cleanup static functionsEric Dumazet2015-02-283-5/+4
| | | | | | | | | tcp_fastopen_create_child() is static and should not be exported. tcp4_gso_segment() and tcp6_gso_segment() should be static. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hyperv: Implement netvsc_get_channels() ethool opAndrew Schwartzmeyer2015-02-283-1/+20
| | | | | | | | | | | | | | This adds support for reporting the actual and maximum combined channels count of the hv_netvsc driver via 'ethtool --show-channels'. This required adding 'max_chn' to 'struct netvsc_device', and assigning it 'rsscap.num_recv_que' in 'rndis_filter_device_add'. Now we can access the combined maximum channel count via 'struct netvsc_device' in the ethtool callback. Signed-off-by: Andrew Schwartzmeyer <andrew@schwartzmeyer.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'tcp-tso'David S. Miller2015-02-282-13/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Dumazet says: ==================== tcp: tso improvements This patch serie reworks tcp_tso_should_defer() a bit to get less bursts, and better ECN behavior. We also removed tso_deferred field in tcp socket. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: tso: allow CA_CWR state in tcp_tso_should_defer()Eric Dumazet2015-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another TCP issue is triggered by ECN. Under pressure, receiver gets ECN marks, and send back ACK packets with ECE TCP flag. Senders enter CA_CWR state. In this state, tcp_tso_should_defer() is short cut : if (icsk->icsk_ca_state != TCP_CA_Open) goto send_now; This means that about all ACK packets we receive are triggering a partial send, and because cwnd is kept small, we can only send a small amount of data for each incoming ACK, which in return generate more ACK packets. Allowing CA_Open and CA_CWR states to enable TSO defer in tcp_tso_should_defer() brings performance back : TSO autodefer has more chance to defer under pressure. This patch increases TSO and LRO/GRO efficiency back to normal levels, and does not impact overall ECN behavior. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: tso: restore IW10 after TSO autosizingEric Dumazet2015-02-281-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With sysctl_tcp_min_tso_segs being 4, it is very possible that tcp_tso_should_defer() decides not sending last 2 MSS of initial window of 10 packets. This also applies if autosizing decides to send X MSS per GSO packet, and cwnd is not a multiple of X. This patch implements an heuristic based on age of first skb in write queue : If it was sent very recently (less than half srtt), we can predict that no ACK packet will come in less than half rtt, so deferring might cause an under utilization of our window. This is visible on initial send (IW10) on web servers, but more generally on some RPC, as the last part of the message might need an extra RTT to get delivered. Tested: Ran following packetdrill test // A simple server-side test that sends exactly an initial window (IW10) // worth of packets. `sysctl -e -q net.ipv4.tcp_min_tso_segs=4` 0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 +.1 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 6> +.1 < . 1:1(0) ack 1 win 257 +0 accept(3, ..., ...) = 4 +0 write(4, ..., 14600) = 14600 +0 > . 1:5841(5840) ack 1 win 457 +0 > . 5841:11681(5840) ack 1 win 457 // Following packet should be sent right now. +0 > P. 11681:14601(2920) ack 1 win 457 +.1 < . 1:1(0) ack 14601 win 257 +0 close(4) = 0 +0 > F. 14601:14601(0) ack 1 +.1 < F. 1:1(0) ack 14602 win 257 +0 > . 14602:14602(0) ack 2 Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: tso: remove tp->tso_deferredEric Dumazet2015-02-282-10/+5
|/ | | | | | | | | | | | | | | | | | | | | | | TSO relies on ability to defer sending a small amount of packets. Heuristic is to wait for future ACKS in hope to send more packets at once. Current algorithm uses a per socket tso_deferred field as a pseudo timer. This pseudo timer relies on future ACK, but there is no guarantee we receive them in time. Fix would be to use a real timer, but cost of such timer is probably too expensive for typical cases. This patch changes the logic to test the time of last transmit, because we should not add bursts of more than 1ms for any given flow. We've used this patch for about two years at Google, before FQ/pacing as it would reduce a fair amount of bursts. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME driversBen Hutchings2015-02-285-3/+20
| | | | | | | | | | | | | | | | | Currently the usbnet core does not update the tx_packets statistic for drivers with FLAG_MULTI_PACKET and there is no hook in the TX completion path where they could do this. cdc_ncm and dependent drivers are bumping tx_packets stat on the transmit path while asix and sr9800 aren't updating it at all. Add a packet count in struct skb_data so these drivers can fill it in, initialise it to 1 for other drivers, and add the packet count to the tx_packets statistic on completion. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Tested-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'tipc-next'David S. Miller2015-02-277-31/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Erik Hugne says: ==================== tipc: bug fix and some improvements Most important is a fix for a nullptr exception that would occur when name table subscriptions fail. The remaining patches are performance improvements and cosmetic changes. v2: remove unnecessary whitespace in patch #2 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * tipc: make media address offset a common defineErik Hugne2015-02-272-4/+3
| | | | | | | | | | | | | | | | | | | | With the exception of infiniband media which does not use media offsets, the media address is always located at offset 4 in the media info field as defined by the protocol, so we move the definition to the generic bearer.h Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tipc: rename media/msg related definitionsErik Hugne2015-02-274-6/+6
| | | | | | | | | | | | | | | | | | | | The TIPC_MEDIA_ADDR_SIZE and TIPC_MEDIA_ADDR_OFFSET names are misleading, as they actually define the size and offset of the whole media info field and not the address part. This patch does not have any functional changes. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tipc: purge links when bearer is disabledErik Hugne2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | If a bearer is disabled by manual intervention, all links over that bearer should be purged, indicated with the 'shutting_down' flag. Otherwise tipc will get confused if a new bearer is enabled using a different media type. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tipc: fix nullpointer bug when subscribing to eventsErik Hugne2015-02-271-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a subscription request is sent to a topology server connection, and any error occurs (malformed request, oom or limit reached) while processing this request, TIPC should terminate the subscriber connection. While doing so, it tries to access fields in an already freed (or never allocated) subscription element leading to a nullpointer exception. We fix this by removing the subscr_terminate function and terminate the connection immediately upon any subscription failure. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tipc: only create header copy for name distr messagesErik Hugne2015-02-271-1/+1
|/ | | | | | | | | | | | The TIPC name distributor pushes topology updates to the cluster neighbors. Currently this is done in a unicast manner, and the skb holding the update is cloned for each cluster member. This is unnecessary, as we only modify the destnode field in the header so we change it to do pskb_copy instead. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* team: allow TSO being set on masterJiri Pirko2015-02-271-0/+3
| | | | | | | | | | | | | | This patch allows TSO being set/unset on the master, so that GSO segmentation is done after team layer. Similar patch is present for bonding: b0ce3508b25e ("bonding: allow TSO being set on bonding master") and bridge: f902e8812ef6 ("bridge: Add ability to enable TSO") Suggested-by: Jiri Prochazka <jprochaz@redhat.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'fib_trie_remove_leaf_info'David S. Miller2015-02-274-322/+176
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Duyck says: ==================== fib_trie: Remove leaf_info structure This patch set removes the leaf_info structure from the IPv4 fib_trie. The general idea is that the leaf_info structure itself only held about 6 actual bits of data, beyond that it was mostly just waste. As such we can drop the structure, move the 1 byte representing the prefix/suffix length into the fib_alias and just link it all into one list. My testing shows that this saves somewhere between 4 to 10ns depending on the type of test performed. I'm suspecting that this represents 1 to 2 L1 cache misses saved per look-up. One side effect of this change is that semantic_match_miss will now only increment once per leaf instead of once per leaf_info miss. However the stat is already skewed now that we perform a preliminary check on the leaf as a part of the look-up. I also have gone through and addressed a number of ordering issues in the first patch since I had misread the behavior of list_add_tail. I have since run some additional testing and verified the resulting lists are in the same order when combining multiple prefix length and tos values in a single leaf. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Remove leaf_infoAlexander Duyck2015-02-271-307/+156
| | | | | | | | | | | | | | | | | | | | | | At this point the leaf_info hash is redundant. By adding the suffix length to the fib_alias hash list we no longer have need of leaf_info as we can determine the prefix length from fa_slen. So we can compress things by dropping the leaf_info structure from fib_trie and instead directly connect the leaves to the fib_alias hash list. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Add slen to fib aliasAlexander Duyck2015-02-272-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | Make use of an empty spot in the alias to store the suffix length so that we don't need to pull that information from the leaf_info structure. This patch also makes a slight change to the user statistics. Instead of incrementing semantic_match_miss once per leaf_info miss we now just increment it once per leaf if a match was not found. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Replace plen with slen in leaf_infoAlexander Duyck2015-02-271-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the prefix length variable in the leaf_info structure with a suffix length value, or host identifier length in bits. By doing this it makes it easier to sort out since the tnodes and leaf are carrying this value as well since it is compatible with the ->pos field in tnodes. I also cleaned up one spot that had some list manipulation that could be simplified. I basically updated it so that we just use hlist_add_head_rcu instead of calling hlist_add_before_rcu on the first node in the list. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Convert fib_alias to hlist from listAlexander Duyck2015-02-274-40/+48
|/ | | | | | | | | There isn't any advantage to having it as a list and by making it an hlist we make the fib_alias more compatible with the list_info in terms of the type of list used. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ip_level_multicast_join_leave'David S. Miller2015-02-278-16/+137
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Madhu Challa says: ==================== Multicast group join/leave at ip level This series enables configuring multicast group join/leave at ip level by extending the "ip address" command. It adds a new control socket mc_autojoin_sock and ifa_flag IFA_F_MCAUTOJOIN to invoke the corresponding igmp group join/leave api. Since the igmp group join/leave api takes the rtnl_lock the code had to be refactored by adding a shim layer prefixed by __ that can be invoked by code that already has the rtnl_lock. This way we avoid proliferation of work queues. The first patch in this series does the refactoring for igmp v6. Its based on igmp v4 changes that were added by Eric Dumazet. The second patch in this series does the group join/leave based on the setting of the IFA_F_MCAUTOJOIN flag. v5: - addressed comments from Daniel Borkmann. - removed blank line in patch 1/2 - removed unused variable, const arg in patch 2/2 v4: - addressed comments from Yoshifuji Hideaki. - Remove WARN_ON not needed because we return a value from v2. - addressed comments from Daniel Borkmann. - rename sock to mc_autojoin_sk - ip_mc_config() pass ifa so it needs one less argument. - igmp_net_{init|destroy}() use inet_ctl_sock_{create|destroy} - inet_rtm_newaddr() change scope of ret. - igmp_net_init() no need to initialize sock to NULL. v3: - addressed comments from David Miller. - fixed indentation and local variable order. v2: - addressed comments from Eric Dumazet. - removed workqueue and call __ip_mc_{join|leave}_group or __ipv6_sock_mc_{join|drop} ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * multicast: Extend ip address command to enable multicast group join/leave onMadhu Challa2015-02-277-7/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Joining multicast group on ethernet level via "ip maddr" command would not work if we have an Ethernet switch that does igmp snooping since the switch would not replicate multicast packets on ports that did not have IGMP reports for the multicast addresses. Linux vxlan interfaces created via "ip link add vxlan" have the group option that enables then to do the required join. By extending ip address command with option "autojoin" we can get similar functionality for openvswitch vxlan interfaces as well as other tunneling mechanisms that need to receive multicast traffic. The kernel code is structured similar to how the vxlan driver does a group join / leave. example: ip address add 224.1.1.10/24 dev eth5 autojoin ip address del 224.1.1.10/24 dev eth5 Signed-off-by: Madhu Challa <challa@noironetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * igmp v6: add __ipv6_sock_mc_join and __ipv6_sock_mc_dropMadhu Challa2015-02-272-9/+39
|/ | | | | | | | | | | | | | | | Based on the igmp v4 changes from Eric Dumazet. 959d10f6bbf6("igmp: add __ip_mc_{join|leave}_group()") These changes are needed to perform igmp v6 join/leave while RTNL is held. Make ipv6_sock_mc_join and ipv6_sock_mc_drop wrappers around __ipv6_sock_mc_join and __ipv6_sock_mc_drop to avoid proliferation of work queues. Signed-off-by: Madhu Challa <challa@noironetworks.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* udp: In udp_flow_src_port use random hash value if skb_get_hash failsTom Herbert2015-02-272-6/+25
| | | | | | | | | | In the unlikely event that skb_get_hash is unable to deduce a hash in udp_flow_src_port we use a consistent random value instead. This is specified in GRE/UDP draft section 3.2.1: https://tools.ietf.org/html/draft-ietf-tsvwg-gre-in-udp-encap-04 Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bridge: fix link notification skb size calculation to include vlan rangesRoopa Prabhu2015-02-261-7/+85
| | | | | | | | | | | | | | | | | | | | | | | my previous patch skipped vlan range optimizations during skb size calculations for simplicity. This incremental patch considers vlan ranges during skb size calculations. This leads to a bit of code duplication in the fill and size calculation functions. But, I could not find a prettier way to do this. will take any suggestions. Previously, I had reused the existing br_get_link_af_size size calculation function to calculate skb size for notifications. Reusing it this time around creates some change in behaviour issues for the usual .get_link_af_size callback. This patch adds a new br_get_link_af_size_filtered() function to base the size calculation on the incoming filter flag and include vlan ranges. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'rocker-next'David S. Miller2015-02-262-114/+170
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scott Feldman says: ==================== rocker cleanups Pushing out some rocker cleanups I've had in my queue for a while. Nothing major, just some sync-up with changes that already went into device code (hard-coding desc err return values and lport renaming). Also fixup port fowarding transitions prompted by some DSA discussions about how to restore port state when port leaves bridge. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rocker: put port in FORWADING state after leaving bridgeScott Feldman2015-02-261-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the port forwarding state transitions for the cases when the port joins or leaves a bridge, or is brought admin UP or DOWN. When port is bridged, we can rely on bridge driver putting port in correct state using STP callback into port driver, regardless if bridge is enabled for STP or not. When port is not bridged, we can reuse some of the STP code to enabled or disable forwarding depending on UP or DOWN. Tested by trying all the transitions from bridge/not bridge, and UP/DOWN, and verifying port is in the correct forwarding state after each transition. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rocker: rename lport to pportScott Feldman2015-02-262-104/+103
| | | | | | | | | | | | | | | | | | | | | | This is just a rename of physical ports from "lport" to "pport". Not a functional change. OF-DPA uses logical ports (lport) for tunnels, but the driver (and device) were using "lport" for physical ports. Renaming physical ports references to "pport", freeing up "lport" for use later with tunnels. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rocker: fix non-portable err return codesScott Feldman2015-02-262-1/+37
|/ | | | | | | | | | | | The rocker device returns error codes if something goes wrong with descriptor processing. Originally the device used standard errno codes for different errors, but since those errno codes aren't portable across ARCHs, the device now returns hard-coded error codes that stay constant across diff ARCHs. Fix driver to use those same hard-coded values. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2015-02-2516-189/+1130
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-02-24 This series contains updates to i40e and i40evf only, which bumps their versions to i40e 1.2.9 and i40evf 1.2.3. Paul fixes i40e_debug_aq() for big endian machines by adding the appropriate LExx_TO_CPU wrappers. Catherine adds a requested speed variable to the link_status to store the last speeds we requested from the firmware and use the advertised speed settings in get_settings in ethtool now that we have it. Due to the new code addition, she also refactors get_settings to improve readability and to accommodate some of the longer lines of code by adding two functions i40e_get_settings_link_up() and i40e_get_settings_link_down(). Carolyn adds a struct to the VSI struct to keep track of RXNFC settings done via ethtool. Adds more information to the interrupt vector names, specifically to the VF misc vector name so that we can distinguish between all the interrupts. Ashish enables the i40evf driver to enable debug prints via ethtool. Mitch updates i40e to enable packet split only when IOMMU is in use, since it shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. Also adds the receive routine in use to the features log message to be able to print the receive packet split status. Greg adds the ability to get, set and commit permanently the NPAR partition BW configuration through configfs. Enables an application to query the i40e driver's private flags to get the status of NPAR enablement via ethtool. Neerav adds support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in the case of a PF VSI and not available for any other VSI type. Kevin fixes i40e by ensuring the BUF and FLAG_RD flags are set for indirect admin queue command. Vasu updates the driver to setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40e/i40evf: Update driver versionsSravanthi Tangeda2015-02-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | Bump i40e to 1.2.9 and i40evf 1.2.3 Also update the copyright year. Change-ID: I345d777e94abd0acffe6a28793f675d251a86299 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: Add more info to interrupt vector namesCarolyn Wyborny2015-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch adds the netdev name to the VF misc vector name. Without this patch, all the interrupts show the same info, so it difficult to distinguish them. Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Use ethtool private flags to display NPAR statusGreg Rose2015-02-242-0/+44
| | | | | | | | | | | | | | | | | | | | | | Allow an application to query the i40e driver's private flags to get the status of NPAR enablement. This will be used by applications to determine if there are NPAR specific features available. Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Set FLAG_RD when sending buffer FW must readKevin Scott2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | Set FLAG_RD for send_driver_version AQ command. Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: print Rx packet split statusMitch Williams2015-02-241-2/+4
| | | | | | | | | | | | | | | | | | Add the RX routine in use to the features log message. Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: setup FCoE device typeVasu Dev2015-02-241-0/+6
| | | | | | | | | | | | | | | | | | | | Setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Set BUF flag for Set Version AQ commandKevin Scott2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | BUF flag must be set for indirect AQ command. Change-ID: I6819718a47baf69d1a91ebaed89f735ed6e86025 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add support for getlink, setlink ndo opsNeerav Parikh2015-02-246-22/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in case of a PF VSI and not available for any other VSI type. By default the i40e driver inserts a bridge as part of the bring-up when a FDIR type VSI and/or a FCoE VSI is created. This bridge is created in VEB mode by default i.e. after creating the bridge using "Add VEB" AQ command the loopback for the PF's default VSI is enabled. The patch adds capability where all the VSIs created as downlink to the bridge inherits the loopback property and enables loopback only if the uplink bridge is operating in VEB mode. Hence, there is no need to explicitly enable loopback as part of allocating resources for SR-IOV VFs and call to do that has been removed. In case a user-request is made either via "bridge" utility or using the bridge netlink interface that requires to change the hardware bridge mode then that would require a PF reset and rebuild of the switch hierarchy. Also update the copyright year. Change-ID: I4d78fc1c83158efda29ba7be92239b74f75d6d25 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Implement configfs for NPAR BW configurationGreg Rose2015-02-244-8/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add configfs controls to get, set and commit NPAR BW configurations. We export three controls: min_bw - Can take a value from 0 to 100 inclusive max_bw - Can take a value from 1 to 100 inclusive commit - A write-only control that accepts only a value of 1 and will cause the BW settings to be permanently committed to NVM so that they are persistent across power cycles and system resets The BW values are relative and are expressed as percentages. For more information on the interpretation of the BW settings see the Dell specifications for NPAR. Also update the copyright year. Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add NPAR BW get and set functionsGreg Rose2015-02-245-1/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to be able to get, set and commit permanently the NPAR partition BW configuration through configfs. These are necessary precursor functions for that feature. Also update the copyright year. Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: enable packet split only when IOMMU presentMitch Williams2015-02-242-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When an IOMMU is in use, the packet split receive path shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. However, this is not an advantage for systems with no IOMMU. At init time, check to see if an IOMMU is enabled and enable packet split receives. Change-ID: I4f70d2e9c31bbea3dc8fd0c5734959a6e6602210 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: allow enabling of debug prints via ethtoolAshish Shah2015-02-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Copy setting from ethtool to the HW specific struct to actually enable prints. Change print from i40e to i40evf to differentiate drivers in bare metal scenarios. Also update the copyright year. Change-ID: I06fee26247299a08f2e1c70fc811a9ea0931c4dd Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add method to keep track of current rxnfc settingsCarolyn Wyborny2015-02-242-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a struct to the VSI struct to keep track of rxnfc settings done via ethtool. Without this patch, the device can only list the options available, not the current settings and this is not clear to the user. Without current settings, the available settings never changing looks like a bug. Also update the copyright year. Change-ID: I087bbfdb33b330496a671630a7586773e3b3e589 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settingsCatherine Sullivan2015-02-244-124/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a requested speed variable to the link_status struct to store the last speeds we requested from the firmware (the speeds the FW will be advertising with if autoneg is enabled). Use the advertised speed settings in get_settings in ethtool now that we have it. Also set the requested speed settings in set_settings in ethtool as they are requested and initialize them in probe based on what the firmware remembers as the last requested speeds. To accommodate some longer lines in this new code, and improve readability I have added two functions i40e_get_settings_link_up and i40e_get_settings_link_down which get_settings now calls first. It then does all of the settings that happen regardless of link state. Some PHY types that supported the same settings were also combined. Also update the copyright year. Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Fix output of i40e_debug_aq() for big endian machinesPaul M Stillwell Jr2015-02-242-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function i40e_debug_aq() prints information helpful in debugging admin queue commands, but it doesn't do so correctly on big endian machines. This patch adds the appropriate LExx_TO_CPU wrappers for big endian architectures. Also update the copyright year. Change-ID: I4b2dc229ed5bf6dfe35632a58cddf53c21aff4b0 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | net: dsa: Introduce dsa_is_port_initializedGuenter Roeck2015-02-253-6/+8
| | | | | | | | | | | | | | | | | | | | To avoid race conditions when using the ds->ports[] array, we need to check if the accessed port has been initialized. Introduce and use helper function dsa_is_port_initialized for that purpose and use it where needed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>