1. 03 Mar, 2014 25 commits
    • Vlad Yasevich's avatar
      macvlan: Add support for 'always_on' offload features · 8b4703e9
      Vlad Yasevich authored
      Macvlan currently inherits all of its features from the lower
      device.  When lower device disables offload support, this causes
      macvlan to disable offload support as well.  This causes
      performance regression when using macvlan/macvtap in bridge
      mode.
      
      It can be easily demonstrated by creating 2 namespaces using
      macvlan in bridge mode and running netperf between them:
      
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    20.00    1204.61
      
      To restore the performance, we add software offload features
      to the list of "always_on" features for macvlan.  This way
      when a namespace or a guest using macvtap initially sends a
      packet, this packet will not be segmented at macvlan level.
      It will only be segmented when macvlan sends the packet
      to the lower device.
      
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    20.00    5507.35
      
      Fixes: 6acf54f1 (macvtap: Add support of packet capture on macvtap device.)
      Fixes: 797f87f8 (macvlan: fix netdev feature propagation from lower device)
      CC: Florian Westphal <fw@strlen.de>
      CC: Christian Borntraeger <borntraeger@de.ibm.com>
      CC: Jason Wang <jasowang@redhat.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b4703e9
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · 48235515
      David S. Miller authored
      John W. Linville says:
      
      ====================
      Please pull this batch of fixes intended for the 3.14 stream...
      
      For the mac80211 bits, Johannes says:
      
      "This time I have a fix to get out of an 'infinite error state' in case
      regulatory domain updates failed and two fixes for VHT associations: one
      to not disconnect immediately when the AP uses more bandwidth than the
      new regdomain would allow after a change due to association country
      information getting used, and one for an issue in the code where
      mac80211 doesn't correctly ignore a reserved field and then uses an HT
      instead of VHT association."
      
      For the iwlwifi bits, Emmanuel says:
      
      "Johannes fixes a long standing bug in the AMPDU status reporting.
      Max fixes the listen time which was way too long and causes trouble
      to several APs."
      
      Along with those, Bing Zhao marks the mwifiex_usb driver as _not_
      supporting USB autosuspend after a number of problems with that have
      been reported.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48235515
    • Daniel Borkmann's avatar
      net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is AUTH capable · ec0223ec
      Daniel Borkmann authored
      RFC4895 introduced AUTH chunks for SCTP; during the SCTP
      handshake RANDOM; CHUNKS; HMAC-ALGO are negotiated (CHUNKS
      being optional though):
      
        ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->
        <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------
        -------------------- COOKIE-ECHO -------------------->
        <-------------------- COOKIE-ACK ---------------------
      
      A special case is when an endpoint requires COOKIE-ECHO
      chunks to be authenticated:
      
        ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->
        <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------
        ------------------ AUTH; COOKIE-ECHO ---------------->
        <-------------------- COOKIE-ACK ---------------------
      
      RFC4895, section 6.3. Receiving Authenticated Chunks says:
      
        The receiver MUST use the HMAC algorithm indicated in
        the HMAC Identifier field. If this algorithm was not
        specified by the receiver in the HMAC-ALGO parameter in
        the INIT or INIT-ACK chunk during association setup, the
        AUTH chunk and all the chunks after it MUST be discarded
        and an ERROR chunk SHOULD be sent with the error cause
        defined in Section 4.1. [...] If no endpoint pair shared
        key has been configured for that Shared Key Identifier,
        all authenticated chunks MUST be silently discarded. [...]
      
        When an endpoint requires COOKIE-ECHO chunks to be
        authenticated, some special procedures have to be followed
        because the reception of a COOKIE-ECHO chunk might result
        in the creation of an SCTP association. If a packet arrives
        containing an AUTH chunk as a first chunk, a COOKIE-ECHO
        chunk as the second chunk, and possibly more chunks after
        them, and the receiver does not have an STCB for that
        packet, then authentication is based on the contents of
        the COOKIE-ECHO chunk. In this situation, the receiver MUST
        authenticate the chunks in the packet by using the RANDOM
        parameters, CHUNKS parameters and HMAC_ALGO parameters
        obtained from the COOKIE-ECHO chunk, and possibly a local
        shared secret as inputs to the authentication procedure
        specified in Section 6.3. If authentication fails, then
        the packet is discarded. If the authentication is successful,
        the COOKIE-ECHO and all the chunks after the COOKIE-ECHO
        MUST be processed. If the receiver has an STCB, it MUST
        process the AUTH chunk as described above using the STCB
        from the existing association to authenticate the
        COOKIE-ECHO chunk and all the chunks after it. [...]
      
      Commit bbd0d598 introduced the possibility to receive
      and verification of AUTH chunk, including the edge case for
      authenticated COOKIE-ECHO. On reception of COOKIE-ECHO,
      the function sctp_sf_do_5_1D_ce() handles processing,
      unpacks and creates a new association if it passed sanity
      checks and also tests for authentication chunks being
      present. After a new association has been processed, it
      invokes sctp_process_init() on the new association and
      walks through the parameter list it received from the INIT
      chunk. It checks SCTP_PARAM_RANDOM, SCTP_PARAM_HMAC_ALGO
      and SCTP_PARAM_CHUNKS, and copies them into asoc->peer
      meta data (peer_random, peer_hmacs, peer_chunks) in case
      sysctl -w net.sctp.auth_enable=1 is set. If in INIT's
      SCTP_PARAM_SUPPORTED_EXT parameter SCTP_CID_AUTH is set,
      peer_random != NULL and peer_hmacs != NULL the peer is to be
      assumed asoc->peer.auth_capable=1, in any other case
      asoc->peer.auth_capable=0.
      
      Now, if in sctp_sf_do_5_1D_ce() chunk->auth_chunk is
      available, we set up a fake auth chunk and pass that on to
      sctp_sf_authenticate(), which at latest in
      sctp_auth_calculate_hmac() reliably dereferences a NULL pointer
      at position 0..0008 when setting up the crypto key in
      crypto_hash_setkey() by using asoc->asoc_shared_key that is
      NULL as condition key_id == asoc->active_key_id is true if
      the AUTH chunk was injected correctly from remote. This
      happens no matter what net.sctp.auth_enable sysctl says.
      
      The fix is to check for net->sctp.auth_enable and for
      asoc->peer.auth_capable before doing any operations like
      sctp_sf_authenticate() as no key is activated in
      sctp_auth_asoc_init_active_key() for each case.
      
      Now as RFC4895 section 6.3 states that if the used HMAC-ALGO
      passed from the INIT chunk was not used in the AUTH chunk, we
      SHOULD send an error; however in this case it would be better
      to just silently discard such a maliciously prepared handshake
      as we didn't even receive a parameter at all. Also, as our
      endpoint has no shared key configured, section 6.3 says that
      MUST silently discard, which we are doing from now onwards.
      
      Before calling sctp_sf_pdiscard(), we need not only to free
      the association, but also the chunk->auth_chunk skb, as
      commit bbd0d598 created a skb clone in that case.
      
      I have tested this locally by using netfilter's nfqueue and
      re-injecting packets into the local stack after maliciously
      modifying the INIT chunk (removing RANDOM; HMAC-ALGO param)
      and the SCTP packet containing the COOKIE_ECHO (injecting
      AUTH chunk before COOKIE_ECHO). Fixed with this patch applied.
      
      Fixes: bbd0d598 ("[SCTP]: Implement the receive and verification of AUTH chunk")
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Vlad Yasevich <yasevich@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec0223ec
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-3.14-20140303' of git://gitorious.org/linux-can/linux-can · 82f19183
      David S. Miller authored
      linux-can-fixes-for-3.14-20140303
      
      Marc Kleine-Budde says:
      
      ====================
      this is a pull request of 8 patches. Oliver Hartkopp contributes a patch which
      removes the CAN FD compatibility for CAN 2.0 sockets, as it turns out that this
      compatibility has some conceptual cornercases. The remaining 7 patches are by
      me, they address a problem in the flexcan driver. When shutting down the
      interface ("ifconfig can0 down") under heavy network load the whole system will
      hang. This series reworks the actual sequence in close() and the transition
      from and to the low power modes of the CAN controller.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82f19183
    • Xin Long's avatar
      ip_tunnel:multicast process cause panic due to skb->_skb_refdst NULL pointer · 10ddceb2
      Xin Long authored
      when ip_tunnel process multicast packets, it may check if the packet is looped
      back packet though 'rt_is_output_route(skb_rtable(skb))' in ip_tunnel_rcv(),
      but before that , skb->_skb_refdst has been dropped in iptunnel_pull_header(),
      so which leads to a panic.
      
      fix the bug: https://bugzilla.kernel.org/show_bug.cgi?id=70681Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10ddceb2
    • Schuyler Patton's avatar
      net: cpsw: fix cpdma rx descriptor leak on down interface · 3995d265
      Schuyler Patton authored
      This patch fixes a CPDMA RX Descriptor leak that occurs after taking
      the interface down when the CPSW is in Dual MAC mode. Previously
      the CPSW_ALE port was left open up which causes packets to be received
      and processed by the RX interrupt handler and were passed to the
      non active network interface where they were ignored.
      
      The fix is for the slave_stop function of the selected interface
      to disable the respective CPSW_ALE Port from forwarding packets. This
      blocks traffic from being received on the inactive interface.
      Signed-off-by: default avatarSchuyler Patton <spatton@ti.com>
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3995d265
    • Vasundhara Volam's avatar
      be2net: isolate TX workarounds not applicable to Skyhawk-R · ec495fac
      Vasundhara Volam authored
      Some of TX workarounds in be_xmit_workarounds() routine
      are not applicable (and result in HW errors) to Skyhawk-R chip.
      Isolate BE3-R/Lancer specific workarounds to a separate routine.
      Signed-off-by: default avatarVasundhara Volam <vasundhara.volam@emulex.com>
      Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec495fac
    • Vasundhara Volam's avatar
      be2net: Fix skb double free in be_xmit_wrokarounds() failure path · c9128951
      Vasundhara Volam authored
      skb_padto(), skb_share_check() and __vlan_put_tag() routines free
      skb when they return an error. This patch fixes be_xmit_workarounds()
      to not free skb again in such cases.
      Signed-off-by: default avatarVasundhara Volam <vasundhara.volam@emulex.com>
      Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9128951
    • Somnath kotur's avatar
      be2net: clear promiscuous bits in adapter->flags while disabling promiscuous mode · 7ad09458
      Somnath kotur authored
      We should clear promiscuous bits in adapter->flags while disabling promiscuous
      mode. Else we will not put interface back into VLAN promisc mode if the vlans
      already added exceeds the maximum limit.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ad09458
    • Somnath Kotur's avatar
      be2net: Fix to reset transparent vlan tagging · c502224e
      Somnath Kotur authored
      For disabling transparent tagging issue SET_HSW_CONFIG with pvid_valid=1
      and pvid=0xFFFF and not with the default pvid as this case would fail in Lancer.
      Hence removing the get_hsw_config call from be_vf_setup() as it's
      only use of getting default pvid is no longer needed.
      
      Also do proper housekeeping only if the FW command succeeds.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c502224e
    • Dan Carpenter's avatar
      qlcnic: dcb: a couple off by one bugs · e842b068
      Dan Carpenter authored
      The ->tc_cfg[] array has QLC_DCB_MAX_TC (8) elements so the check is
      off by one.  These functions are always called with valid values though
      so it doesn't affect how the code works.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e842b068
    • Yuchung Cheng's avatar
      tcp: fix bogus RTT on special retransmission · c84a5711
      Yuchung Cheng authored
      RTT may be bogus with tall loss probe (TLP) when a packet
      is retransmitted and latter (s)acked without TCPCB_SACKED_RETRANS flag.
      
      For example, TLP calls __tcp_retransmit_skb() instead of
      tcp_retransmit_skb(). The skb timestamps are updated but the sacked
      flag is not marked with TCPCB_SACKED_RETRANS. As a result we'll
      get bogus RTT in tcp_clean_rtx_queue() or in tcp_sacktag_one() on
      spurious retransmission.
      
      The fix is to apply the sticky flag TCP_EVER_RETRANS to enforce Karn's
      check on RTT sampling. However this will disable F-RTO if timeout occurs
      after TLP, by resetting undo_marker in tcp_enter_loss(). We relax this
      check to only if any pending retransmists are still in-flight.
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Acked-by: default avatarNandita Dukkipati <nanditad@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c84a5711
    • Dan Carpenter's avatar
      hsr: off by one sanity check in hsr_register_frame_in() · de39d7a4
      Dan Carpenter authored
      This is a sanity check and we never pass invalid values so this patch
      doesn't change anything.  However the node->time_in[] array has
      HSR_MAX_SLAVE (2) elements and not HSR_MAX_DEV (3).
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de39d7a4
    • John W. Linville's avatar
      Merge branch 'master' of... · 0c6a4812
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      0c6a4812
    • Oliver Hartkopp's avatar
      can: remove CAN FD compatibility for CAN 2.0 sockets · 821047c4
      Oliver Hartkopp authored
      In commit e2d265d3 (canfd: add support for CAN FD in CAN_RAW sockets)
      CAN FD frames with a payload length up to 8 byte are passed to legacy
      sockets where the CAN FD support was not enabled by the application.
      
      After some discussions with developers at a fair this well meant feature
      leads to confusion as no clean switch for CAN / CAN FD is provided to the
      application programmer. Additionally a compatibility like this for legacy
      CAN_RAW sockets requires some compatibility handling for the sending, e.g.
      make CAN2.0 frames a CAN FD frame with BRS at transmission time (?!?).
      
      This will become a mess when people start to develop applications with
      real CAN FD hardware. This patch reverts the bad compatibility code
      together with the documentation describing the removed feature.
      Acked-by: default avatarStephane Grosjean <s.grosjean@peak-system.com>
      Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      821047c4
    • Marc Kleine-Budde's avatar
      can: flexcan: factor out soft reset into seperate funtion · 4b5b8227
      Marc Kleine-Budde authored
      This patch moves the soft reset into a seperate function.
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      4b5b8227
    • Marc Kleine-Budde's avatar
      can: flexcan: flexcan_remove(): add missing netif_napi_del() · d96e43e8
      Marc Kleine-Budde authored
      This patch adds the missing netif_napi_del() to the flexcan_remove() function.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      d96e43e8
    • Marc Kleine-Budde's avatar
      can: flexcan: fix transition from and to freeze mode in chip_{,un}freeze · b1aa1c7a
      Marc Kleine-Budde authored
      This patch factors out freeze and unfreeze of the CAN core into seperate
      functions. Experiments have shown that the transition from and to freeze mode
      may take several microseconds, especially the time entering the freeze mode
      depends on the current bitrate.
      
      This patch adds a while loop which polls the Freeze Mode ACK bit (FRZ_ACK) that
      indicates a successfull mode change. If the function runs into a timeout a
      error value is returned.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      b1aa1c7a
    • Marc Kleine-Budde's avatar
      can: flexcan: factor out transceiver {en,dis}able into seperate functions · f003698e
      Marc Kleine-Budde authored
      This patch moves the transceiver enable and disable into seperate functions,
      where the NULL pointer check is hidden.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      f003698e
    • Marc Kleine-Budde's avatar
      can: flexcan: fix transition from and to low power mode in chip_{en,dis}able · 9b00b300
      Marc Kleine-Budde authored
      In flexcan_chip_enable() and flexcan_chip_disable() fixed delays are used.
      Experiments have shown that the transition from and to low power mode may take
      several microseconds.
      
      This patch adds a while loop which polls the Low Power Mode ACK bit (LPM_ACK)
      that indicates a successfull mode change. If the function runs into a timeout a
      error value is returned.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      9b00b300
    • Marc Kleine-Budde's avatar
      can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails · 7e9e148a
      Marc Kleine-Budde authored
      If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed,
      this patch adds the missing cleanup.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      7e9e148a
    • Marc Kleine-Budde's avatar
      can: flexcan: fix shutdown: first disable chip, then all interrupts · 5be93bdd
      Marc Kleine-Budde authored
      When shutting down the CAN interface (ifconfig canX down) during high CAN bus
      loads, the CAN core might hang and freeze the whole CPU.
      
      This patch fixes the shutdown sequence by first disabling the CAN core then
      disabling all interrupts.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      5be93bdd
    • Gerry Demaret's avatar
      USB AX88179/178A: Support D-Link DUB-1312 · 635d61a3
      Gerry Demaret authored
      Add the USB device ID for the D-Link DUB-1312 USB 3.0 to Gigabit Ethernet
      Adapter to the AX88179/178A driver.
      Signed-off-by: default avatarGerry Demaret <gerry@tigron.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      635d61a3
    • Hauke Mehrtens's avatar
      b44: always set duplex mode why phy changes · 1d3f41ea
      Hauke Mehrtens authored
      Without this patch b44_check_phy() was called when the phy called the
      adjust callback. This method only change the mac duplex mode when the
      carrier was off. When the phy changed the duplex mode after the carrier
      was on the mac was not changed. This happened when an external phy was
      used.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d3f41ea
    • Hauke Mehrtens's avatar
      b44: add calls to phy_{start,stop} · 25d54fe5
      Hauke Mehrtens authored
      When support for external phys was added to b44, the calls to start and
      stop the phy were missing in the mac driver. This adds the calls to
      phy_start() and phy_stop().
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25d54fe5
  2. 28 Feb, 2014 5 commits
  3. 27 Feb, 2014 10 commits