1. 05 3月, 2014 3 次提交
  2. 04 3月, 2014 4 次提交
  3. 03 3月, 2014 20 次提交
  4. 01 3月, 2014 13 次提交
    • D
      Merge branch '6lowpan' · 750f679c
      David S. Miller 提交于
      Alexander Aring says:
      
      ====================
      6lowpan: reimplementation of fragmentation handling
      
      this patch series reimplementation the fragmentation handling of 6lowpan
      accroding to rfc4944 [1].
      
      The first big note is, that the current fragmentation behaviour isn't rfc
      complaint. The main issue is a wrong datagram_size value which needs to be:
      datagram_size = ipv6_payload + ipv6 header + (maybe compressed transport header,
                      currently only udp is supported)
      
      but the current datagram_size value is calculated as:
      datagram_size = ipv6_payload
      
      Fragmentation work in a linux<->linux communication only.
      
      Why reimplementation?
      
      I reimplemted the reassembly side only. The current behaviour is to allocate a
      skb with the reassembled size and hold all fragments in a list, protected by a
      spinlock. After we received all fragments (detected by the sum of all fragments,
      it begins to place all fragments into the allocated skb).
      
      This reassembly implementation has some race condition. Additional I make it more
      rfc complaint. The current implementation match on the tag value inside the frag
      header only, but rfc4944 says we need to match on dst addr(mac), src addr(mac),
      tag value, datagram_size value. [2]
      
      The new reassembly handling use the inet_frag api (I mean the callback interface
      of ipv6 and ipv4 reassembly). I looked into ipv6 and wanted to see how ipv6 is
      dealing with reassembly, so I based my code on this implementation.
      
      On the sending side to generate the fragments I improved the current code to use
      the nearest 8 divided payload. (We can do that, because the mac layer has a
      dynamic size, so it depends on mac_header how big we can do the payload).
      
      Of course I fix also the reassembly/sending side to be rfc complaint now.
      
      Regards
      Alexander Aring
      
      [1] http://tools.ietf.org/html/rfc4944
      [2] http://tools.ietf.org/html/rfc4944#section-5.3
      
      changes since v2:
       - rework checkpatch code style issue patch.
         Merge two pr_debugs into one pr_debug.
      
      changes since v3:
       - rename 6lowpan.ko to 6lowpan_rtnl.c in commit msg of patch 5/8.
      
      changes since v4:
       - Add a new patch 2/8 to introduce lowpan_uncompress_size function. Also
         improving this function a little bit.
       - Add a new patch 4/8 to change tag value to __be16.
       - use skb_header_reset function on FRAG1 only, which should have the
         lowpan header. See lowpan_get_frag_info function. (slightly improving
         of fragmentation header parsing).
       - changes types of variables to u16 in lowpan_skb_fragmentation.
       - use lowpan_uncompress_size instead of storing necessary information
         in skb control block, this can be destroyed after dev_queue_xmit call.
         Thanks David for this hint.
       - remove Tested-by: Martin Townsend <martin.townsend@xsilon.com>, because
         too many funcionality change.
      
      changes since v5:
       - handle lowpan_addr_mode_size with lookup table.
      
      changes since v6:
       - remove unnecessary parameter in lowpan_frag_queue.
       - fix commit message in patch 8/8 which included a describtion of adding the
         lownpan_uncompress_size function. This was splitted in a seperate patch.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      750f679c
    • A
      6lowpan: handling 6lowpan fragmentation via inet_frag api · 7240cdec
      Alexander Aring 提交于
      This patch drops the current way of 6lowpan fragmentation on receiving
      side and replace it with a implementation which use the inet_frag api.
      The old fragmentation handling has some race conditions and isn't
      rfc4944 compatible. Also adding support to match fragments on
      destination address, source address, tag value and datagram_size
      which is missing in the current implementation.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7240cdec
    • A
      net: ns: add ieee802154_6lowpan namespace · 633fc86f
      Alexander Aring 提交于
      This patch adds necessary ieee802154 6lowpan namespace to provide the
      inet_frag information. This is a initial support for handling 6lowpan
      fragmentation with the inet_frag api.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      633fc86f
    • A
      6lowpan: fix some checkpatch issues · d57fec84
      Alexander Aring 提交于
      Detected with:
      
      ./scripts/checkpatch.pl --strict -f net/ieee802154/6lowpan_rtnl.c
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d57fec84
    • A
      6lowpan: move 6lowpan.c to 6lowpan_rtnl.c · 01348b34
      Alexander Aring 提交于
      We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
      should move 6lowpan.c to 6lowpan_rtnl.c. Then we can support multiple
      source files for 6lowpan module.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01348b34
    • A
      6lowpan: change tag type to __be16 · 02600d0d
      Alexander Aring 提交于
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02600d0d
    • A
      6lowpan: fix fragmentation on sending side · 96cb3eb7
      Alexander Aring 提交于
      This patch fix the fragmentation on sending side according to rfc4944.
      
      Also add improvement to use the full payload of a PDU which calculate
      the nearest divided to 8 payload length for the fragmentation datagram
      size attribute.
      
      The main issue is that the datagram size of fragmentation header use the
      ipv6 payload length, but rfc4944 says it's the ipv6 payload length inclusive
      network header size (and transport header size if compressed).
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96cb3eb7
    • A
      6lowpan: add uncompress header size function · 349aa7bc
      Alexander Aring 提交于
      This patch add a lookup function for uncompressed 6LoWPAN header
      size. This is needed to estimate the real size after uncompress the
      6LoWPAN header.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      349aa7bc
    • A
      6lowpan: add frag information struct · 89745c9c
      Alexander Aring 提交于
      This patch adds a 6lowpan fragmentation struct into cb of skb which
      is necessary to hold fragmentation information.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89745c9c
    • J
      net: w5100: Use devm_ioremap_resource() · 4e76ca7f
      Jingoo Han 提交于
      Use devm_ioremap_resource() in order to make the code simpler.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e76ca7f
    • J
      net: w5300: Use devm_ioremap_resource() · d1b44ce1
      Jingoo Han 提交于
      Use devm_ioremap_resource() in order to make the code simpler.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1b44ce1
    • D
      packet: allow to transmit +4 byte in TX_RING slot for VLAN case · 52f1454f
      Daniel Borkmann 提交于
      Commit 57f89bfa ("network: Allow af_packet to transmit +4 bytes
      for VLAN packets.") added the possibility for non-mmaped frames to
      send extra 4 byte for VLAN header so the MTU increases from 1500 to
      1504 byte, for example.
      
      Commit cbd89acb ("af_packet: fix for sending VLAN frames via
      packet_mmap") attempted to fix that for the mmap part but was
      reverted as it caused regressions while using eth_type_trans()
      on output path.
      
      Lets just act analogous to 57f89bfa and add a similar logic
      to TX_RING. We presume size_max as overcharged with +4 bytes and
      later on after skb has been built by tpacket_fill_skb() check
      for ETH_P_8021Q header on packets larger than normal MTU. Can
      be easily reproduced with a slightly modified trafgen in mmap(2)
      mode, test cases:
      
       { fill(0xff, 12) const16(0x8100) fill(0xff, <1504|1505>) }
       { fill(0xff, 12) const16(0x0806) fill(0xff, <1500|1501>) }
      
      Note that we need to do the test right after tpacket_fill_skb()
      as sockets can have PACKET_LOSS set where we would not fail but
      instead just continue to traverse the ring.
      Reported-by: NMathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: Ben Greear <greearb@candelatech.com>
      Cc: Phil Sutter <phil@nwl.cc>
      Tested-by: NMathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52f1454f
    • D
      Merge branch 'intel-next' · 07cb1c17
      David S. Miller 提交于
      Aaron Brown says:
      
      ====================
      This series contains updates to ixgbe and ixgbevf.
      
      Don provides an update to change a hard coded timeout interval to
      a system-wide timeout one, collects AUTOC register functions into
      one place and fixes some firmware bit handling.
      
      Emil resolves a tx handling error introduced in a recent commit and
      adds check for CHECKSUM_PARTIAL to avoid an skb_is_gso check
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07cb1c17