1. 27 3月, 2013 15 次提交
    • J
      net: ethernet: atheros: add CONFIG_PM_SLEEP to suspend/resume functions · 8bca4242
      Jingoo Han 提交于
      Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
      build warning when CONFIG_PM_SLEEP is not selected. This is because
      sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
      the CONFIG_PM_SLEEP is enabled.
      
      drivers/net/ethernet/atheros/atlx/atl1.c:2861:12: warning: 'atl1_resume' defined but not used [-Wunused-function]
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8bca4242
    • J
      net: ethernet: wiznet: add CONFIG_PM_SLEEP to suspend/resume functions · 4294beba
      Jingoo Han 提交于
      Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
      build warning when CONFIG_PM_SLEEP is not selected. This is because
      sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
      the CONFIG_PM_SLEEP is enabled.
      
      drivers/net/ethernet/wiznet/w5100.c:758:12: warning: 'w5100_suspend' defined but not used [-Wunused-function]
      drivers/net/ethernet/wiznet/w5100.c:773:12: warning: 'w5100_resume' defined but not used [-Wunused-function]
      drivers/net/ethernet/wiznet/w5300.c:670:12: warning: 'w5300_suspend' defined but not used [-Wunused-function]
      drivers/net/ethernet/wiznet/w5300.c:685:12: warning: 'w5300_resume' defined but not used [-Wunused-function]
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4294beba
    • J
      netback: set transport header before passing it to kernel · f9ca8f74
      Jason Wang 提交于
      Currently, for the packets receives from netback, before doing header check,
      kernel just reset the transport header in netif_receive_skb() which pretends non
      l4 header. This is suboptimal for precise packet length estimation (introduced
      in 1def9238: net_sched: more precise pkt_len computation) which needs correct l4
      header for gso packets.
      
      The patch just reuse the header probed by netback for partial checksum packets
      and tries to use skb_flow_dissect() for other cases, if both fail, just pretend
      no l4 header.
      
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9ca8f74
    • J
      tuntap: set transport header before passing it to kernel · 38502af7
      Jason Wang 提交于
      Currently, for the packets receives from tuntap, before doing header check,
      kernel just reset the transport header in netif_receive_skb() which pretends no
      l4 header. This is suboptimal for precise packet length estimation (introduced
      in 1def9238) which needs correct l4 header for gso packets.
      
      So this patch set the transport header to csum_start for partial checksum
      packets, otherwise it first try skb_flow_dissect(), if it fails, just reset the
      transport header.
      
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38502af7
    • J
      macvtap: set transport header before passing skb to lower device · 9b4d669b
      Jason Wang 提交于
      Set the transport header for 1) some drivers (e.g ixgbe) needs l4 header 2)
      precise packet length estimation (introduced in 1def9238) needs l4 header to
      compute header length.
      
      For the packets with partial checksum, the patch just set the transport header
      to csum_start. Otherwise tries to use skb_flow_dissect() to get l4 offset, if it
      fails, just pretend no l4 header.
      
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b4d669b
    • Y
    • Y
      firewire net, ipv4 arp: Extend hardware address and remove driver-level packet inspection. · 6752c8db
      YOSHIFUJI Hideaki / 吉藤英明 提交于
      Inspection of upper layer protocol is considered harmful, especially
      if it is about ARP or other stateful upper layer protocol; driver
      cannot (and should not) have full state of them.
      
      IPv4 over Firewire module used to inspect ARP (both in sending path
      and in receiving path), and record peer's GUID, max packet size, max
      speed and fifo address.  This patch removes such inspection by extending
      our "hardware address" definition to include other information as well:
      max packet size, max speed and fifo.  By doing this, The neighbour
      module in networking subsystem can cache them.
      
      Note: As we have started ignoring sspd and max_rec in ARP/NDP, those
            information will not be used in the driver when sending.
      
      When a packet is being sent, the IP layer fills our pseudo header with
      the extended "hardware address", including GUID and fifo.  The driver
      can look-up node-id (the real but rather volatile low-level address)
      by GUID, and then the module can send the packet to the wire using
      parameters provided in the extendedn hardware address.
      
      This approach is realistic because IP over IEEE1394 (RFC2734) and IPv6
      over IEEE1394 (RFC3146) share same "hardware address" format
      in their address resolution protocols.
      
      Here, extended "hardware address" is defined as follows:
      
      union fwnet_hwaddr {
      	u8 u[16];
      	struct {
      		__be64 uniq_id;		/* EUI-64			*/
      		u8 max_rec;		/* max packet size		*/
      		u8 sspd;		/* max speed			*/
      		__be16 fifo_hi;		/* hi 16bits of FIFO addr	*/
      		__be32 fifo_lo;		/* lo 32bits of FIFO addr	*/
      	} __packed uc;
      };
      
      Note that Hardware address is declared as union, so that we can map full
      IP address into this, when implementing MCAP (Multicast Cannel Allocation
      Protocol) for IPv6, but IP and ARP subsystem do not need to know this
      format in detail.
      
      One difference between original ARP (RFC826) and 1394 ARP (RFC2734)
      is that 1394 ARP Request/Reply do not contain the target hardware address
      field (aka ar$tha).  This difference is handled in the ARP subsystem.
      
      CC: Stephan Gatzka <stephan.gatzka@gmail.com>
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6752c8db
    • Y
      firewire net: Ignore spd and max_payload advertised by ARP. · 61a7839a
      YOSHIFUJI Hideaki / 吉藤英明 提交于
      Stefan Richter <stefanr@s5r6.in-berlin.de> says:
      | As far as I can tell, it would be best to ignore max_rec and sspd from ARP
      | and NDP but keep using the respective information from firewire-core
      | instead (handed over by fwnet_probe()).
      |
      | Why?  As I noted earlier, RFC 2734:1999 and RFC 3146:2001 were apparently
      | written with a too simplistic notion of IEEE 1394 bus topology, resulting
      | in max_rec and sspd in ARP-1394 and NDP-1394 to be useless, IMO.
      |
      | Consider a bus like this:
      |
      |     A ---- B ==== C
      |
      | A, B, C are all IP-over-1394 capable nodes.  ---- is an S400 cable hop,
      | and ==== is an S800 cable hop.
      |
      | In case of unicasts or multicasts in which node A is involved as
      | transmitter or receiver, as well as in case of broadcasts, the speeds
      | S100, S200, S400 work and speed S400 is optimal.
      |
      | In case of anything else, IOW in case of unicasts or multicasts in which
      | only nodes B and C are involved, the speeds S100, S200, S400, S800 work
      | and speed S800 is optimal.
      |
      | Clearly, node A should indicate sspd = S400 in its ARP or NDP packets.
      | But which sspd should nodes B and C set there?  Maybe they set S400, which
      | would work but would waste half of the available bandwidth in the second
      | case.  Or maybe they set S800, which is OK in the second case but would
      | prohibit any communication with node A if blindly taken for correct.
      |
      | On the other hand, firewire-core *always* gives us the correct and optimum
      | peer-to-peer speed and asynchronous packet payload, no matter how simple
      | or complex the bus topology is and no matter in which temporal order nodes
      | join the bus and are discovered.
      
      CC: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a7839a
    • Y
      firewire net: Allocate address handler before registering net_device. · 382c4b40
      YOSHIFUJI Hideaki / 吉藤英明 提交于
      Allocate FIFO address before registering net_device.
      This is preparation to change the pseudo hardware address format
      for firewire devices to include the offset of the FIFO for receipt
      of unicast datagrams, instead of mangling ARP/NDP messages in the
      driver layer.
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      382c4b40
    • Y
      firewire net: Send L2 multicast via GASP. · 021b97e4
      YOSHIFUJI Hideaki / 吉藤英明 提交于
      Send L2 multicast packet via GASP (Global asynchronous stream packet) by
      seeing the multicast bit in the L2 hardware address, not by seeing upper-
      layer protocol address.
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      021b97e4
    • Y
    • S
      net/davinci_emac: use devres APIs · b8092861
      Sekhar Nori 提交于
      Use devres APIs where possible to simplify error handling
      in driver probe.
      
      While at it, also rename the goto targets in error path to
      introduce some consistency in how they are named.
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8092861
    • P
      VXLAN: Use IP Tunnels tunnel ENC encap API · 206aaafc
      Pravin B Shelar 提交于
      Use common ecn_encap functions from ip_tunnel module.
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Acked-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      206aaafc
    • P
      VXLAN: Fix vxlan stats handling. · e8171045
      Pravin B Shelar 提交于
      Fixes bug in VXLAN code where is iptunnel_xmit() called with NULL
      dev->tstats.
      This bug was introduced in commit 6aed0c8b (tunnel: use
      iptunnel_xmit() again).
      
      Following patch fixes bug by setting dev->tstats. It uses ip_tunnel
      module code to share stats function.
      
      CC: Cong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Acked-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8171045
    • P
      GRE: Refactor GRE tunneling code. · c5441932
      Pravin B Shelar 提交于
      Following patch refactors GRE code into ip tunneling code and GRE
      specific code. Common tunneling code is moved to ip_tunnel module.
      ip_tunnel module is written as generic library which can be used
      by different tunneling implementations.
      
      ip_tunnel module contains following components:
       - packet xmit and rcv generic code. xmit flow looks like
         (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out.
       - hash table of all devices.
       - lookup for tunnel devices.
       - control plane operations like device create, destroy, ioctl, netlink
         operations code.
       - registration for tunneling modules, like gre, ipip etc.
       - define single pcpu_tstats dev->tstats.
       - struct tnl_ptk_info added to pass parsed tunnel packet parameters.
      
      ipip.h header is renamed to ip_tunnel.h
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5441932
  2. 26 3月, 2013 4 次提交
  3. 25 3月, 2013 2 次提交
  4. 23 3月, 2013 6 次提交
  5. 22 3月, 2013 13 次提交