summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* packet: parse tpacket header before skb allocWillem de Bruijn2016-02-091-46/+65
| | | | | | | | | | | | | | GSO packet headers must be stored in the linear skb segment. Move tpacket header parsing before sock_alloc_send_skb. The GSO follow-on patch will later increase the skb linear argument to sock_alloc_send_skb if needed for large packets. The header parsing code does not require an allocated skb, so is safe to move. Later pass to tpacket_fill_skb the computed data start and length. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: vnet_hdr support for tpacket_rcvWillem de Bruijn2016-02-091-4/+15
| | | | | | | | | | | | | | | | | | Support socket option PACKET_VNET_HDR together with PACKET_RX_RING. When enabled, a struct virtio_net_hdr will precede the data in the packet ring slots. Verified with test program at github.com/wdebruij/kerneltools/blob/master/tests/psock_rxring_vnet.c pkt: 1454269209.798420 len=5066 vnet: gso_type=tcpv4 gso_size=1448 hlen=66 ecn=off csum: start=34 off=16 eth: proto=0x800 ip: src=<masked> dst=<masked> proto=6 len=5052 Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: move vnet_hdr code to helper functionsWillem de Bruijn2016-02-091-113/+148
| | | | | | | | | | | | | packet_snd and packet_rcv support virtio net headers for GSO. Move this logic into helper functions to be able to reuse it in tpacket_snd and tpacket_rcv. This is a straighforward code move with one exception. Instead of creating and passing a separate gso_type variable, reuse vnet_hdr.gso_type after conversion from virtio to kernel gso type. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: 3ad: apply ad_actor settings changes immediatelyNikolay Aleksandrov2016-02-093-3/+42
| | | | | | | | | | | | | | | | Currently the bonding allows to set ad_actor_system and prio while the bond device is down, but these are actually applied only if there aren't any slaves yet (applied to bond device when first slave shows up, and to slaves at 3ad bind time). After this patch changes are applied immediately and the new values can be used/seen after the bond's upped so it's not necessary anymore to release all and enslave again to see the changes. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <gospo@cumulusnetworks.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bridge-mdb-entry-offload-flag'David S. Miller2016-02-094-38/+56
|\ | | | | | | | | | | | | | | | | | | | | | | Jiri Pirko says: ==================== bridge: mdb: flag offloaded mdb entries This patchset extends uapi to let the user know if an mdb entry is offloaded. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bridge: mdb: Passing the port-group pointer to br_mdb moduleElad Raz2016-02-093-29/+34
| | | | | | | | | | | | | | | | | | | | Passing the port-group to br_mdb in order to allow direct access to the structure. br_mdb will later use the structure to reflect HW reflection status via "state" variable. Signed-off-by: Elad Raz <eladr@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bridge: mdb: Separate br_mdb_entry->state from net_bridge_port_group->stateElad Raz2016-02-093-15/+26
| | | | | | | | | | | | | | | | | | Change net_bridge_port_group 'state' member to 'flags' and define new set of flags internal to the kernel. Signed-off-by: Elad Raz <eladr@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bridge: mdb: add support for offloaded mdb entriesElad Raz2016-02-091-0/+2
|/ | | | | | | | | Add new bitmask member 'flags' to br_mdb_entry structure. Adding MDB_FLAGS_OFFLOAD bit which indicates MDB entries is offloaded to hardware. Signed-off-by: Elad Raz <eladr@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: trivial: style fixesZhang Shengju2016-02-081-6/+4Star
| | | | | | | remove some redudant brackets, use sizeof(*) instead of sizeof(struct x). Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: Fix syncookies sysctl default.David S. Miller2016-02-081-1/+1
| | | | | | | | Unintentionally the default was changed to zero, fix that. Fixes: 12ed8244ed ("ipv4: Namespaceify tcp syncookies sysctl knob") Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ns-tcp-sysctls'David S. Miller2016-02-0713-126/+130
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nikolay Borisov says: ==================== Namespaceify more of the tcp sysctl knobs This patch series continues making more of the tcp-related sysctl knobs be per net-namespace. Most of these apply per socket and have global defaults so should be safe and I don't expect any breakages. Having those per net-namespace is useful when multiple containers are hosted and it is required to tune the tcp settings for each independently of the host node. I've split the patches to be per-sysctl but after the review if the outcome is positive I'm happy to either send it in one big blob or just. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp_notsent_lowat sysctl knobNikolay Borisov2016-02-075-12/+11Star
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp_fin_timeout sysctl knobNikolay Borisov2016-02-075-13/+13
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp_orphan_retries sysctl knobNikolay Borisov2016-02-075-10/+10
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp_retries2 sysctl knobNikolay Borisov2016-02-076-12/+13
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp_retries1 sysctl knobNikolay Borisov2016-02-075-13/+14
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp reordering sysctl knobNikolay Borisov2016-02-077-18/+21
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp syncookies sysctl knobNikolay Borisov2016-02-078-22/+21Star
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp synack retries sysctl knobNikolay Borisov2016-02-076-15/+12Star
| | | | | | | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: Namespaceify tcp syn retries sysctl knobNikolay Borisov2016-02-076-13/+17
|/ | | | | Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-mergeDavid S. Miller2016-02-0746-355/+584
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Antonio Quartulli says: ==================== This batch of patches includes a number of corrections and improvements for our kernel-doc. These changes also make sure that our doc is now properly processed by the kernel-doc parsing tool. Other than that you have a patch updating all the copyright lines to 2016 and another patch switching the URLs in our readme, Kconfig and MAINTAINERS file from "http" to "https". Both by Sven Eckelmann. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * batman-adv: Switch to HTTPS version of linksSven Eckelmann2016-02-033-3/+3
| | | | | | | | | | | | | | | | | | | | open-mesh.org and its subdomains can only be accessed via HTTPS. HTTP-only requests are currently redirected automatically to HTTPS but references in the source code should be only https. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: update copyright years for 2016Sven Eckelmann2016-02-0243-43/+43
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix kernel-doc for batadv_claim_free_refSven Eckelmann2016-02-021-1/+2
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: add kerneldoc for batadv_iv_ogm_aggr_packetSimon Wunderlich2016-02-021-1/+8
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: add kernel doc for AP isolation attributes in bat_privAntonio Quartulli2016-02-021-0/+3
| | | | | | | | Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: fix kerneldoc for TT functionsAntonio Quartulli2016-02-021-9/+24
| | | | | | | | Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: fix kerneldoc for DAT functionsAntonio Quartulli2016-02-021-0/+4
| | | | | | | | Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Update/repair bridge loop avoidance kerneldocSimon Wunderlich2016-02-021-48/+130
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix kerneldoc of network-coding functionsSven Eckelmann2016-02-021-0/+13
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix kerneldoc of main functionsSven Eckelmann2016-02-0211-12/+48
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix kerneldoc parsing of return descriptionSven Eckelmann2016-02-0222-229/+305
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: kernel doc readability updatesMarek Lindner2016-02-021-12/+13
| | | | | | | | | | Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Drop invalid kerneldoc for variable batadv_vlan_attrsSven Eckelmann2016-02-021-3/+1Star
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix names in kerneldoc of functionsSven Eckelmann2016-02-025-7/+7
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Remove kerneldoc for missing parametersSven Eckelmann2016-02-024-7/+0Star
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
| * batman-adv: Fix kerneldoc parsing of structs/enumsSven Eckelmann2016-02-023-6/+6
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
* | Merge branch 'virtio_net_ethtool_settings'David S. Miller2016-02-072-0/+94
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nikolay Aleksandrov says: ==================== virtio_net: add ethtool get/set settings support Patch 1 adds ethtool speed/duplex validation functions which check if the value is defined. Patch 2 adds support for ethtool (get|set)_settings and uses the validation functions to check the user-supplied values. v2: split in 2 patches to allow everyone to make use of the validation functions and allow virtio_net devices to be half duplex v3: added a check to return error if the user tries to change anything else besides duplex/speed as per Michael's comment v4: Set port type to PORT_OTHER v5: clear diff1.port (ignore port) when checking for changes since we set it now and ethtool uses it in the set request Sorry about the pointless iterations, should've all covered now. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | virtio_net: add ethtool support for set and get of settingsNikolay Aleksandrov2016-02-071-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the user to set and retrieve speed and duplex of the virtio_net device via ethtool. Having this functionality is very helpful for simulating different environments and also enables the virtio_net device to participate in operations where proper speed and duplex are required (e.g. currently bonding lacp mode requires full duplex). Custom speed and duplex are not allowed, the user-supplied settings are validated before applying. Example: $ ethtool eth1 Settings for eth1: ... Speed: Unknown! Duplex: Unknown! (255) $ ethtool -s eth1 speed 1000 duplex full $ ethtool eth1 Settings for eth1: ... Speed: 1000Mb/s Duplex: Full Based on a patch by Roopa Prabhu. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ethtool: add speed/duplex validation functionsNikolay Aleksandrov2016-02-071-0/+34
|/ / | | | | | | | | | | | | | | Add functions which check if the speed/duplex are defined. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'sunvnet-tracepoints'David S. Miller2016-02-072-2/+161
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sowmini Varadhan says: ==================== sunvnet: perf tracepoint hooks Added some perf tracepoints to help track and debug sunvnet descriptor state at run-time. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sunvnet: perf tracepoint invocations to trace LDC state machineSowmini Varadhan2016-02-071-2/+22
| | | | | | | | | | | | | | | | | | | | | Use sunvnet perf trace macros to monitor LDC message exchange state. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sunvnet: Add support for perf LDC event tracingSowmini Varadhan2016-02-071-0/+139
|/ / | | | | | | | | | | | | | | Add perf event macros for support of tracing and instrumentation of LDC state machine Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'tcp_cong_ctrl_refactoring'David S. Miller2016-02-072-52/+98
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yuchung Cheng says: ==================== tcp: congestion control refactoring This patch set refactors the sequence of congestion control, loss recovery, and transmission logic in TCP ack processing. The design goal is to decouple and sequence them in the following order: 0. ACK accounting: free or tag sent packets [unchanged] 1. loss recovery: identify lost/ecn packets and update congestion state 2. congestion control: up/down cwnd and pacing rate based on (1) 3. transmission: send new or retransmit old based on (1) and (2) This refactoring makes the cwnd changes more clear because it's done in one place. The packet accounting is also more robust especially for connections that do not support SACK. Patch 1-4 and 6 are refactoring and patch 5 improves TCP performance under reordering. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: tcp_cong_control helperYuchung Cheng2016-02-071-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor and consolidate cwnd and rate updates into a new function tcp_cong_control(). Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: make congestion control more robust against reorderingYuchung Cheng2016-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change enables congestion control to update cwnd based on not only packet cumulatively acked but also packets delivered out-of-order. This makes congestion control robust against packet reordering because it may raise cwnd as long as packets are being delivered once reordering has been detected (i.e., it only cares the amount of packets delivered, not the ordering among them). Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: refactor pkts acked accountingYuchung Cheng2016-02-071-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A small refactoring that gets number of packets cumulatively acked from tcp_clean_rtx_queue() directly. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: new delivery accountingYuchung Cheng2016-02-072-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the accounting of how many packets are newly acked or sacked when the sender receives an ACK. The current approach basically computes newly_acked_sacked = (prior_packets - prior_sacked) - (tp->packets_out - tp->sacked_out) where prior_packets and prior_sacked out are snapshot at the beginning of the ACK processing. The new approach tracks the delivery information via a new TCP state variable "delivered" which monotically increases as new packets are delivered in order or out-of-order. The reason for this change is that the current approach is brittle that produces negative or inaccurate estimate. 1) For non-SACK connections, an ACK that advances the SND.UNA could reset the DUPACK counters (tp->sacked_out) in tcp_process_loss() or tcp_fastretrans_alert(). This inflates the inflight suddenly and causes under-estimate or even negative estimate. Here is a real example: before after (processing ACK) packets_out 75 73 sacked_out 23 0 ca state Loss Open The old approach computes (75-23) - (73 - 0) = -21 delivered while the new approach computes 1 delivered since it considers the 2nd-24th packets are delivered OOO. 2) MSS change would re-count packets_out and sacked_out so the estimate is in-accurate and can even become negative. E.g., the inflight is doubled when MSS is halved. 3) Spurious retransmission signaled by DSACK is not accounted The new approach is simpler and more robust. For SACK connections, tp->delivered increments as packets are being acked or sacked in SACK and ACK processing. For non-sack connections, it's done in tcp_remove_reno_sacks() and tcp_add_reno_sack(). When an ACK advances the SND.UNA, tp->delivered is incremented by the number of packets ACKed (less the current number of DUPACKs received plus one packet hole). Upon receiving a DUPACK, tp->delivered is incremented assuming one out-of-order packet is delivered. Upon receiving a DSACK, tp->delivered is incremtened assuming one retransmission is delivered in tcp_sacktag_write_queue(). Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: move cwnd reduction after recovery state procesingYuchung Cheng2016-02-071-32/+28Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the cwnd is reduced and increased in various different places. The reduction happens in various places in the recovery state processing (tcp_fastretrans_alert) while the increase happens afterward. A better sequence is to identify lost packets and update the congestion control state (icsk_ca_state) first. Then base on the new state, up/down the cwnd in one central place. It's more clear to reason cwnd changes. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: retransmit after recovery processing and congestion controlYuchung Cheng2016-02-071-12/+46
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The retransmission and F-RTO transmission currently happen inside recovery state processing (tcp_fastretrans_alert) but before congestion control. This refactoring moves the logic after both s.t. we can determine how much to send (cwnd) before deciding what to send. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>