1. 19 1月, 2013 11 次提交
    • Y
      ipv6: Remove unused neigh argument for icmp6_dst_alloc() and its callers. · 12fd84f4
      YOSHIFUJI Hideaki / 吉藤英明 提交于
      Because of rt->n removal, we do not need neigh argument any more.
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12fd84f4
    • D
      enic: change sprintf() to snprintf() · 4505f40a
      Dan Carpenter 提交于
      These are copying data into 16 char arrays.  They all specify that the
      first string can't be more than 11 characters but once you add on the
      "-rx-" and the NUL character there isn't space for the %d.
      
      The first string is probably never going to be 11 characters, but if it
      is then let's truncate the string instead of corrupting memory.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4505f40a
    • F
      smsc: smc911x: Fix sparse warnings · 6b80778d
      Fabio Estevam 提交于
      ioremap returns 'void __iomem *' type.
      
      Fix the following build warnings:
      
      drivers/net/ethernet/smsc/smc911x.c:2079:14: warning: incorrect type in assignment (different address spaces)
      drivers/net/ethernet/smsc/smc911x.c:2079:14:    expected unsigned int *addr
      drivers/net/ethernet/smsc/smc911x.c:2079:14:    got void [noderef] <asn:2>*
      drivers/net/ethernet/smsc/smc911x.c:2086:18: warning: incorrect type in assignment (different address spaces)
      drivers/net/ethernet/smsc/smc911x.c:2086:18:    expected void [noderef] <asn:2>*base
      drivers/net/ethernet/smsc/smc911x.c:2086:18:    got unsigned int *addr
      drivers/net/ethernet/smsc/smc911x.c:2091:25: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/ethernet/smsc/smc911x.c:2091:25:    expected void volatile [noderef] <asn:2>*addr
      drivers/net/ethernet/smsc/smc911x.c:2091:25:    got unsigned int *addr
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b80778d
    • S
      net: usb: initialize tmp in dm9601.c to avoid warning · 15c8bb12
      Simon Que 提交于
      In two places, tmp is initialized implicitly by being passed as a
      pointer during a function call.  However, this is not obvious to the
      compiler, which logs a warning.
      Signed-off-by: NSimon Que <sque@chromium.org>
      Acked-by: NPeter Korsgaard <jacmet@sunsite.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15c8bb12
    • M
      net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors · fae50823
      Mugunthan V N 提交于
      When there is heavy transmission traffic in the CPDMA, then Rx descriptors
      memory is also utilized as tx desc memory looses all rx descriptors and the
      driver stops working then.
      
      This patch adds boundary for tx and rx descriptors in bd ram dividing the
      descriptor memory to ensure that during heavy transmission tx doesn't use
      rx descriptors.
      
      This patch is already applied to davinci_emac driver, since CPSW and
      davici_dmac shares the same CPDMA, moving the boundry seperation from
      Davinci EMAC driver to CPDMA driver which was done in the following
      commit
      
      commit 86d8c07f
      Author: Sascha Hauer <s.hauer@pengutronix.de>
      Date:   Tue Jan 3 05:27:47 2012 +0000
      
          net/davinci: do not use all descriptors for tx packets
      
          The driver uses a shared pool for both rx and tx descriptors.
          During open it queues fixed number of 128 descriptors for receive
          packets. For each received packet it tries to queue another
          descriptor. If this fails the descriptor is lost for rx.
          The driver has no limitation on tx descriptors to use, so it
          can happen during a nmap / ping -f attack that the driver
          allocates all descriptors for tx and looses all rx descriptors.
          The driver stops working then.
          To fix this limit the number of tx descriptors used to half of
          the descriptors available, the rx path uses the other half.
      
          Tested on a custom board using nmap / ping -f to the board from
          two different hosts.
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fae50823
    • A
      6lowpan: Handle uncompressed IPv6 packets over 6LoWPAN · ee21c7e0
      Alan Ott 提交于
      Handle the reception of uncompressed packets (dispatch type = IPv6).
      Signed-off-by: NAlan Ott <alan@signal11.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee21c7e0
    • A
      6lowpan: Refactor packet delivery into a function · 0c446212
      Alan Ott 提交于
      Refactor the handing of the skb's to the individual lowpan devices into a
      function.
      Signed-off-by: NAlan Ott <alan@signal11.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c446212
    • F
      net: fec: enable pause frame to improve rx prefomance for 1G network · baa70a5c
      Frank Li 提交于
      The limition of imx6 internal bus cause fec can't achieve 1G perfomance.
      There will be many packages lost because FIFO over run.
      
      This patch enable pause frame flow control.
      
      Before this patch
      iperf -s -i 1
      TCP window size: 85.3 KByte (default)
      ------------------------------------------------------------
      [  4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49773
      [ ID] Interval       Transfer     Bandwidth
      [  4]  0.0- 1.0 sec  6.35 MBytes  53.3 Mbits/sec
      [  4]  1.0- 2.0 sec  3.39 MBytes  28.5 Mbits/sec
      [  4]  2.0- 3.0 sec  2.63 MBytes  22.1 Mbits/sec
      [  4]  3.0- 4.0 sec  1.10 MBytes  9.23 Mbits/sec
      
      ifconfig
         RX packets:46195 errors:1859 dropped:1 overruns:1859 frame:1859
      
      After this patch
      iperf -s -i 1
      
      [  4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49757
      [ ID] Interval       Transfer     Bandwidth
      [  4]  0.0- 1.0 sec  49.8 MBytes   418 Mbits/sec
      [  4]  1.0- 2.0 sec  50.1 MBytes   420 Mbits/sec
      [  4]  2.0- 3.0 sec  47.5 MBytes   399 Mbits/sec
      [  4]  3.0- 4.0 sec  45.9 MBytes   385 Mbits/sec
      [  4]  4.0- 5.0 sec  44.8 MBytes   376 Mbits/sec
      
      ifconfig
         RX packets:2348454 errors:0 dropped:16 overruns:0 frame:0
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NFugang Duan <B38611@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      baa70a5c
    • L
      net: asix: handle packets crossing URB boundaries · 8b5b6f54
      Lucas Stach 提交于
      ASIX AX88772B started to pack data even more tightly. Packets and the ASIX packet
      header may now cross URB boundaries. To handle this we have to introduce
      some state between individual calls to asix_rx_fixup().
      Signed-off-by: NLucas Stach <dev@lynxeye.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b5b6f54
    • L
      net: asix: init ASIX AX88772B MAC from EEPROM · 5620df65
      Lucas Stach 提交于
      The device comes up with a MAC address of all zeros. We need to read the
      initial device MAC from EEPROM so it can be set properly later.
      Signed-off-by: NLucas Stach <dev@lynxeye.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5620df65
    • D
      Merge branch 'intel' · a16af2ff
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      This series contains updates to e1000e and igb.  Most notably is the
      added timestamp support in e1000e and additional software timestamp
      support in igb.  As well as, the added thermal data support and SR-IOV
      configuration support in igb.
      
      v2- dropped the following patches from the previous 14 patch series
      because changes were requested from the community:
        e1000e: add support for IEEE-1588 PTP
        igb: Report L4 Rx hash via skb->l4_rxhash
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a16af2ff
  2. 18 1月, 2013 27 次提交
  3. 17 1月, 2013 2 次提交
    • V
      sk-filter: Add ability to lock a socket filter program · d59577b6
      Vincent Bernat 提交于
      While a privileged program can open a raw socket, attach some
      restrictive filter and drop its privileges (or send the socket to an
      unprivileged program through some Unix socket), the filter can still
      be removed or modified by the unprivileged program. This commit adds a
      socket option to lock the filter (SO_LOCK_FILTER) preventing any
      modification of a socket filter program.
      
      This is similar to OpenBSD BIOCLOCK ioctl on bpf sockets, except even
      root is not allowed change/drop the filter.
      
      The state of the lock can be read with getsockopt(). No error is
      triggered if the state is not changed. -EPERM is returned when a user
      tries to remove the lock or to change/remove the filter while the lock
      is active. The check is done directly in sk_attach_filter() and
      sk_detach_filter() and does not affect only setsockopt() syscall.
      Signed-off-by: NVincent Bernat <bernat@luffy.cx>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d59577b6
    • C
      netpoll: fix a missing dev refcounting · 5bd30d39
      Cong Wang 提交于
      __dev_get_by_name() doesn't refcount the network device,
      so we have to do this by ourselves. Noticed by Eric.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bd30d39