1. 25 8月, 2015 2 次提交
  2. 15 8月, 2015 1 次提交
  3. 07 6月, 2015 2 次提交
    • S
      batman-adv: Add required includes to all files · 1e2c2a4f
      Sven Eckelmann 提交于
      The header files could not be build indepdent from each other. This is
      happened because headers didn't include the files for things they've used.
      This was problematic because the success of a build depended on the
      knowledge about the right order of local includes.
      
      Also source files were not including everything they've used explicitly.
      Instead they required that transitive includes are always stable. This is
      problematic because some transitive includes are not obvious, depend on
      config settings and may not be stable in the future.
      
      The order for include blocks are:
      
       * primary headers (main.h and the *.h file of a *.c file)
       * global linux headers
       * required local headers
       * extra forward declarations for pointers in function/struct declarations
      
      The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
      This header file is shared with userspace applications like batctl and must
      therefore build together with userspace applications. The header
      linux/bitops.h is not part of the uapi headers and linux/if_ether.h
      conflicts with the musl implementation of netinet/if_ether.h. The
      maintainers rejected the use of __KERNEL__ preprocessor checks and thus
      these two headers are only in main.h. All files using packet.h first have
      to include main.h to work correctly.
      Reported-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      1e2c2a4f
    • S
      batman-adv: Use common Jenkins Hash implementation · 36fd61cb
      Sven Eckelmann 提交于
      An unoptimized version of the Jenkins one-at-a-time hash function is used
      and partially copied all over the code wherever an hashtable is used.
      Instead the optimized version shared between the whole kernel should be
      used to reduce code duplication and use better optimized code.
      
      Only the DAT code must use the old implementation because it is used as
      distributed hash function which has to be common for all nodes.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      36fd61cb
  4. 29 5月, 2015 3 次提交
  5. 08 1月, 2015 1 次提交
  6. 06 1月, 2015 1 次提交
  7. 12 6月, 2014 1 次提交
    • O
      net: add __pskb_copy_fclone and pskb_copy_for_clone · bad93e9d
      Octavian Purdila 提交于
      There are several instances where a pskb_copy or __pskb_copy is
      immediately followed by an skb_clone.
      
      Add a couple of new functions to allow the copy skb to be allocated
      from the fclone cache and thus speed up subsequent skb_clone calls.
      
      Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Marek Lindner <mareklindner@neomailbox.ch>
      Cc: Simon Wunderlich <sw@simonwunderlich.de>
      Cc: Antonio Quartulli <antonio@meshcoding.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Arvid Brodin <arvid.brodin@alten.se>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
      Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jon Maloy <jon.maloy@ericsson.com>
      Cc: Allan Stephens <allan.stephens@windriver.com>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Reviewed-by: NChristoph Paasch <christoph.paasch@uclouvain.be>
      Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bad93e9d
  8. 18 5月, 2014 1 次提交
  9. 22 3月, 2014 2 次提交
  10. 12 1月, 2014 3 次提交
  11. 09 1月, 2014 1 次提交
  12. 28 12月, 2013 1 次提交
  13. 23 10月, 2013 1 次提交
  14. 10 10月, 2013 1 次提交
  15. 02 10月, 2013 1 次提交
  16. 29 5月, 2013 3 次提交
  17. 09 5月, 2013 1 次提交
  18. 27 3月, 2013 2 次提交
  19. 14 3月, 2013 6 次提交
    • M
      batman-adv: network coding - receive coded packets and decode them · 2df5278b
      Martin Hundebøll 提交于
      When receiving a network coded packet, the decoding buffer is searched
      for a packet to use for decoding. The source, destination, and crc32 from
      the coded packet is used to identify the wanted packet. The decoded
      packet is passed to the usual unicast receiver function, as had it never
      been network coded.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      2df5278b
    • M
      batman-adv: network coding - save overheard and tx packets for decoding · 612d2b4f
      Martin Hundebøll 提交于
      To be able to decode a network coded packet, a node must already know
      one of the two coded packets. This is done by buffering skbs before
      transmission and buffering packets sniffed with promiscuous mode from
      other hosts.
      
      Packets are kept in a buffer similar to the one with forward-skbs: A
      hash table, where each entry, which corresponds to a src-dst pair, has a
      linked list packets.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      612d2b4f
    • M
      batman-adv: network coding - code and transmit packets if possible · 3c12de9a
      Martin Hundebøll 提交于
      Before adding forward-skbs to the coding buffer, the buffer is searched
      for a potential coding opportunity. If one is found, the two packets are
      network coded and transmitted right away. If not, the forward-skb is
      added to the buffer.
      
      Network coded packets are transmitted with information about the two
      receivers and the two coded packets. The first receiver is given by the
      MAC header, while the second is given in the payload/bat-header. The
      second receiver uses promiscuous mode to receive the packet and check
      the second destination.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      3c12de9a
    • M
      batman-adv: network coding - buffer unicast packets before forward · 95332477
      Martin Hundebøll 提交于
      Two be able to network code two packets, one packet must be buffered
      until the next is available. This is done in a "coding buffer", which is
      essentially a hash table with lists of packets. Each entry in the hash
      table corresponds to a specific src-dst pair, which has a linked list of
      packets that are buffered.
      
      This patch adds skbs to the buffer just before forwarding them. The
      buffer is traversed every 10 ms, where timed skbs are removed from the
      buffer and transmitted. To allow experiments with the network coding
      scheme, the timeout is tunable through a file in debugfs.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      95332477
    • M
      batman-adv: network coding - detect coding nodes and remove these after timeout · d56b1705
      Martin Hundebøll 提交于
      To use network coding efficiently, a relay must know when neighbor nodes
      are likely to have enough information to be able to decode a network
      coded packet. This is detected by using OGMs from batman-adv to discover
      when one neighbor is in range of another neighbor. The relay check the
      TLL to detect when an OGM is forwarded from one neighbor by another
      neighbor, and thereby knows that the two neighbors are in range and thus
      overhear packets sent by each other.
      
      This information is saved in the orig_node struct to be used when
      searching for coding opportunities. Two lists are added to the
      orig_node struct: One for neighbors that can hear the orig_node
      (outgoing nc_nodes) and one for neighbors that the orig_node can hear
      (incoming nc_nodes).
      
      Information about nc_nodes is kept for 10 seconds and is available
      through debugfs in batman_adv/nc_nodes to use when debugging network
      coding.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      d56b1705
    • M
      batman-adv: network coding - add the initial infrastructure code · d353d8d4
      Martin Hundebøll 提交于
      Network coding exploits the 802.11 shared medium to allow multiple
      packets to be sent in a single transmission. In brief, a relay can XOR
      two packets, and send the coded packet to two destinations. The
      receivers can decode one of the original packets by XOR'ing the coded
      packet with the other original packet. This will lead to increased
      throughput in topologies where two packets cross one relay.
      
      In a simple topology with three nodes, it takes four transmissions
      without network coding to get one packet from Node A to Node B and one
      from Node B to Node A:
      
       1.  Node A  ---- p1 --->  Node R                Node B
       2.  Node A                Node R  <--- p2 ----  Node B
       3.  Node A  <--- p2 ----  Node R                Node B
       4.  Node A                Node R  ---- p1 --->  Node B
      
      With network coding, the relay only needs one transmission, which saves
      us one slot of valuable airtime:
      
       1.  Node A  ---- p1 --->  Node R                Node B
       2.  Node A                Node R  <--- p2 ----  Node B
       3.  Node A  <- p1 x p2 -  Node R  - p1 x p2 ->  Node B
      
      The same principle holds for a topology including five nodes. Here the
      packets from Node A and Node B are overheard by Node C and Node D,
      respectively. This allows Node R to send a network coded packet to save
      one transmission:
      
         Node A                  Node B
      
          |     \              /    |
          |      p1          p2     |
          |       \          /      |
          p1       > Node R <       p2
          |                         |
          |         /      \        |
          |    p1 x p2    p1 x p2   |
          v       /          \      v
                 /            \
         Node C <              > Node D
      
      More information is available on the open-mesh.org wiki[1].
      
      This patch adds the initial code to support network coding in
      batman-adv. It sets up a worker thread to do house keeping and adds a
      sysfs file to enable/disable network coding. The feature is disabled by
      default, as it requires a wifi-driver with working promiscuous mode, and
      also because it adds a small delay at each hop.
      
      [1] http://www.open-mesh.org/projects/batman-adv/wiki/CatwomanSigned-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      d353d8d4