1. 11 8月, 2015 2 次提交
    • M
      net: phy: select copper mode when Marvel 88e1111 in SGMII · 07151bc9
      Madalin Bucur 提交于
      For the Marvel 88e1111 PHY only two SGMII modes are available, both
      allowing only SGMII to copper mode (with or without clock). SGMII
      to fiber mode is not supported. Make sure the fiber/copper registers
      selector bits are cleared for selecting copper mode.
      Signed-off-by: NMadalin Bucur <madalin.bucur@freescale.com>
      Signed-off-by: NShaohui Xie <Shaohui.Xie@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07151bc9
    • K
      net: fec: fix the race between xmit and bdp reclaiming path · c4bc44c6
      Kevin Hao 提交于
      When we transmit a fragmented skb, we may run into a race like the
      following scenario (assume txq->cur_tx is next to txq->dirty_tx):
                 cpu 0                                          cpu 1
        fec_enet_txq_submit_skb
          reserve a bdp for the first fragment
          fec_enet_txq_submit_frag_skb
             update the bdp for the other fragment
             update txq->cur_tx
                                                         fec_enet_tx_queue
                                                           bdp = fec_enet_get_nextdesc(txq->dirty_tx, fep, queue_id);
                                                           This bdp is the bdp reserved for the first segment. Given
                                                           that this bdp BD_ENET_TX_READY bit is not set and txq->cur_tx
                                                           is already pointed to a bdp beyond this one. We think this is a
                                                           completed bdp and try to reclaim it.
          update the bdp for the first segment
          update txq->cur_tx
      
      So we shouldn't update the txq->cur_tx until all the update to the
      bdps used for fragments are performed. Also add the corresponding
      memory barrier to guarantee that the update to the bdps, dirty_tx and
      cur_tx performed in the proper order.
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4bc44c6
  2. 10 8月, 2015 26 次提交
  3. 08 8月, 2015 6 次提交
  4. 07 8月, 2015 6 次提交
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 1ebd08a7
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-08-05
      
      This series contains updates to i40e, i40evf and e1000e.
      
      Anjali adds support for x772 devices to i40e and i40evf.  With the added
      support, x772 supports offloading of the outer UDP transmit and receive
      checksum for tunneled packets.  Also supports evicting ATR filters in the
      hardware, so update the driver with this new feature set.
      
      Raanan provides several fixes for e1000e, first rectifies the Energy
      Efficient Ethernet in Sx code so that it only applies to parts that
      actually support EEE in Sx.  Fix whitespace and moved ICH8 related define
      to the proper context.  Fixed the ASPM locking which was reported by
      Bjorn Helgaas.  Fix a workaround implementation for systime which could
      experience a large non-linear increment of the systime value when
      checking for overflow.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ebd08a7
    • J
      net_dbg_ratelimited: turn into no-op when !DEBUG · d92cff89
      Jason A. Donenfeld 提交于
      The pr_debug family of functions turns into a no-op when -DDEBUG is not
      specified, opting instead to call "no_printk", which gets compiled to a
      no-op (but retains gcc's nice warnings about printf-style arguments).
      
      The problem with net_dbg_ratelimited is that it is defined to be a
      variant of net_ratelimited_function, which expands to essentially:
      
          if (net_ratelimit())
              pr_debug(fmt, ...);
      
      When DEBUG is not defined, then this becomes,
      
          if (net_ratelimit())
              ;
      
      This seems benign, except it isn't. Firstly, there's the obvious
      overhead of calling net_ratelimit needlessly, which does quite some book
      keeping for the rate limiting. Given that the pr_debug and
      net_dbg_ratelimited family of functions are sprinkled liberally through
      performance critical code, with developers assuming they'll be compiled
      out to a no-op most of the time, we certainly do not want this needless
      book keeping. Secondly, and most visibly, even though no debug message
      is printed when DEBUG is not defined, if there is a flood of
      invocations, dmesg winds up peppered with messages such as
      "net_ratelimit: 320 callbacks suppressed". This is because our
      aforementioned net_ratelimit() function actually prints this text in
      some circumstances. It's especially odd to see this when there isn't any
      other accompanying debug message.
      
      So, in sum, it doesn't make sense to have this function's current
      behavior, and instead it should match what every other debug family of
      functions in the kernel does with !DEBUG -- nothing.
      
      This patch replaces calls to net_dbg_ratelimited when !DEBUG with
      no_printk, keeping with the idiom of all the other debug print helpers.
      
      Also, though not strictly neccessary, it guards the call with an if (0)
      so that all evaluation of any arguments are sure to be compiled out.
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d92cff89
    • R
      af_mpls: add null dev check in find_outdev · 3dcb615e
      Roopa Prabhu 提交于
      This patch adds null dev check for the 'cfg->rc_via_table ==
      NEIGH_LINK_TABLE or dev_get_by_index() failed' case
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dcb615e
    • D
      Merge branch 'test-bpf-next' · 3c621818
      David S. Miller 提交于
      Nicolas Schichan says:
      
      ====================
      test_bpf improvements
      
      Please find below the patch series with my latest changes to test_bpf.
      
      The first patch checks for unexpected NULL generated skbs before
      running the filter.
      
      The second patch adds the possibility for tests to generate fragmented
      skbs.
      
      The third patch tests LD_ABS and LD_IND on fragmented skbs.
      
      The fourth patch adds the possibility to restrict the tests being run
      by specifying the name/id/range of the test(s) to run via module
      parameters.
      
      The fifth patch tests LD_ABS and LD_IND on non fragmented skbs with
      various sizes and alignments.
      
      The sixth and final patch checks that the interpreter or JIT correctly
      resets A and X to 0.
      
      This serie is against today's net-next tree.
      
      Changes in V2:
      
      * move declaration of 'ptr' in if() block in patch 2/6.
      
      * fix various typos in patch 4/6
      
      * rework default init of test_range array and cleanup exclude_test()
        return condition in patch 4/6.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c621818
    • N
      test_bpf: add tests checking that JIT/interpreter sets A and X to 0. · 86bf1721
      Nicolas Schichan 提交于
      It is mandatory for the JIT or interpreter to reset the A and X
      registers to 0 before running the filter. Check that it is the case on
      various ALU and JMP instructions.
      Signed-off-by: NNicolas Schichan <nschichan@freebox.fr>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86bf1721
    • N
      test_bpf: add more tests for LD_ABS and LD_IND. · 08fcb08f
      Nicolas Schichan 提交于
      This exerces the LD_ABS and LD_IND instructions for various sizes and
      alignments. This also checks that X when used as an offset to a
      BPF_IND instruction first in a filter is correctly set to 0.
      Signed-off-by: NNicolas Schichan <nschichan@freebox.fr>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08fcb08f