mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich - Remove network coding support, by Sven Eckelmann (2 patches) - remove includes for extern declarations, by Sven Eckelmann -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAmjJVgoWHHN3QHNpbW9u d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoR80EADM0GyUjPpOYyKXpWshviDAQUll kiu7OIPnPooJhCQKnyuVjG2n7zuPZ1VWni7Y/5NkGA/FZRzVDaMUDD6eLtajYVcP er71QXFqlnfgkOpNdE+V6GGhHgDMRPJzYqUyZBCx0yrFkyhfcxVcC2HfbmlSHfkA Rn/WbTy9pWaKEYVA9JWoF+gBjxUgsIpJYTzugFS7NlCMG832st09bTr4gyEtEAMb 7tQ55wNM9J2woeeox6r5K9stXb+yOpdljUdtESxawbq4DsC0sWwrebKcG0JfEujK MAYwZM4Q+8ekuAnP2lGonSUeUQeqe4ArgzjJfm30dSJZ+lYbl6GjBYjMTXX4OvwZ mHdqDu7YhbIy3B/QnDrB5hs47pataEmpNBz/sCko5P3EVrYmnTuqiYkaqSlisBSt gkeqZ3JMNHqTpAc1MEWhGBJNKQBVSdgh72fRYD2BkPEfE+ZJCRzfUPrH3GxyPZOY juyUUeP7/k9sxxRkg/vlHRQI8ob1iVRn6kl9sHvw6sU8TELKQ4UqC04YH+nvcrNh 3/Raqd0KkjqpTzHlMG0TZxH/rlR+k4t+xKmCSEYYeFL+sRCN5CPt+jOhjGJk/ogh ZRhD/e2vmohTLqZm3d6pSfHcwU4ZF/HzRep3aAJPmJ6h/a30w1ZSNlga2+Erwvke XKrBgEoUPaMSGbYMkw== =cm52 -----END PGP SIGNATURE----- Merge tag 'batadv-next-pullrequest-20250916' of https://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Remove network coding support, by Sven Eckelmann (2 patches) - remove includes for extern declarations, by Sven Eckelmann * tag 'batadv-next-pullrequest-20250916' of https://git.open-mesh.org/linux-merge: batman-adv: remove includes for extern declarations batman-adv: keep skb crc32 helper local in BLA batman-adv: remove network coding support batman-adv: Start new development cycle ==================== Link: https://patch.msgid.link/20250916122441.89246-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
5e87fdc37f
|
|
@ -53,19 +53,6 @@ config BATMAN_ADV_DAT
|
|||
mesh networks. If you think that your network does not need
|
||||
this option you can safely remove it and save some space.
|
||||
|
||||
config BATMAN_ADV_NC
|
||||
bool "Network Coding"
|
||||
depends on BATMAN_ADV
|
||||
help
|
||||
This option enables network coding, a mechanism that aims to
|
||||
increase the overall network throughput by fusing multiple
|
||||
packets in one transmission.
|
||||
Note that interfaces controlled by batman-adv must be manually
|
||||
configured to have promiscuous mode enabled in order to make
|
||||
network coding work.
|
||||
If you think that your network does not need this feature you
|
||||
can safely disable it and save some space.
|
||||
|
||||
config BATMAN_ADV_MCAST
|
||||
bool "Multicast optimisation"
|
||||
depends on BATMAN_ADV && INET && !(BRIDGE=m && BATMAN_ADV=y)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ batman-adv-y += mesh-interface.o
|
|||
batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += multicast.o
|
||||
batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += multicast_forw.o
|
||||
batman-adv-y += netlink.o
|
||||
batman-adv-$(CONFIG_BATMAN_ADV_NC) += network-coding.o
|
||||
batman-adv-y += originator.o
|
||||
batman-adv-y += routing.o
|
||||
batman-adv-y += send.o
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
#include "hash.h"
|
||||
#include "log.h"
|
||||
#include "netlink.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
#include "routing.h"
|
||||
#include "send.h"
|
||||
|
|
@ -1406,10 +1405,6 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
|
|||
if (!orig_neigh_node)
|
||||
goto out;
|
||||
|
||||
/* Update nc_nodes of the originator */
|
||||
batadv_nc_update_nc_node(bat_priv, orig_node, orig_neigh_node,
|
||||
ogm_packet, is_single_hop_neigh);
|
||||
|
||||
orig_neigh_router = batadv_orig_router_get(orig_neigh_node,
|
||||
if_outgoing);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/container_of.h>
|
||||
#include <linux/crc16.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/etherdevice.h>
|
||||
|
|
@ -1584,6 +1585,39 @@ int batadv_bla_init(struct batadv_priv *bat_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_skb_crc32() - calculate CRC32 of the whole packet and skip bytes in
|
||||
* the header
|
||||
* @skb: skb pointing to fragmented socket buffers
|
||||
* @payload_ptr: Pointer to position inside the head buffer of the skb
|
||||
* marking the start of the data to be CRC'ed
|
||||
*
|
||||
* payload_ptr must always point to an address in the skb head buffer and not to
|
||||
* a fragment.
|
||||
*
|
||||
* Return: big endian crc32c of the checksummed data
|
||||
*/
|
||||
static __be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr)
|
||||
{
|
||||
unsigned int to = skb->len;
|
||||
unsigned int consumed = 0;
|
||||
struct skb_seq_state st;
|
||||
unsigned int from;
|
||||
unsigned int len;
|
||||
const u8 *data;
|
||||
u32 crc = 0;
|
||||
|
||||
from = (unsigned int)(payload_ptr - skb->data);
|
||||
|
||||
skb_prepare_seq_read(skb, from, to, &st);
|
||||
while ((len = skb_seq_read(consumed, &data, &st)) != 0) {
|
||||
crc = crc32c(crc, data, len);
|
||||
consumed += len;
|
||||
}
|
||||
|
||||
return htonl(crc);
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_bla_check_duplist() - Check if a frame is in the broadcast dup.
|
||||
* @bat_priv: the bat priv with all the mesh interface information
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/minmax.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ enum batadv_dbg_level {
|
|||
/** @BATADV_DBG_DAT: ARP snooping and DAT related messages */
|
||||
BATADV_DBG_DAT = BIT(4),
|
||||
|
||||
/** @BATADV_DBG_NC: network coding related messages */
|
||||
BATADV_DBG_NC = BIT(5),
|
||||
|
||||
/** @BATADV_DBG_MCAST: multicast related messages */
|
||||
BATADV_DBG_MCAST = BIT(6),
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <linux/build_bug.h>
|
||||
#include <linux/byteorder/generic.h>
|
||||
#include <linux/container_of.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/gfp.h>
|
||||
|
|
@ -53,7 +52,6 @@
|
|||
#include "mesh-interface.h"
|
||||
#include "multicast.h"
|
||||
#include "netlink.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
#include "routing.h"
|
||||
#include "send.h"
|
||||
|
|
@ -103,7 +101,6 @@ static int __init batadv_init(void)
|
|||
|
||||
batadv_v_init();
|
||||
batadv_iv_init();
|
||||
batadv_nc_init();
|
||||
batadv_tp_meter_init();
|
||||
|
||||
batadv_event_workqueue = create_singlethread_workqueue("bat_events");
|
||||
|
|
@ -218,12 +215,6 @@ int batadv_mesh_init(struct net_device *mesh_iface)
|
|||
goto err_dat;
|
||||
}
|
||||
|
||||
ret = batadv_nc_mesh_init(bat_priv);
|
||||
if (ret < 0) {
|
||||
atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING);
|
||||
goto err_nc;
|
||||
}
|
||||
|
||||
batadv_gw_init(bat_priv);
|
||||
batadv_mcast_init(bat_priv);
|
||||
|
||||
|
|
@ -232,8 +223,6 @@ int batadv_mesh_init(struct net_device *mesh_iface)
|
|||
|
||||
return 0;
|
||||
|
||||
err_nc:
|
||||
batadv_dat_free(bat_priv);
|
||||
err_dat:
|
||||
batadv_bla_free(bat_priv);
|
||||
err_bla:
|
||||
|
|
@ -264,7 +253,6 @@ void batadv_mesh_free(struct net_device *mesh_iface)
|
|||
batadv_gw_node_free(bat_priv);
|
||||
|
||||
batadv_v_mesh_free(bat_priv);
|
||||
batadv_nc_mesh_free(bat_priv);
|
||||
batadv_dat_free(bat_priv);
|
||||
batadv_bla_free(bat_priv);
|
||||
|
||||
|
|
@ -336,11 +324,6 @@ int batadv_max_header_len(void)
|
|||
header_len = max_t(int, header_len,
|
||||
sizeof(struct batadv_bcast_packet));
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
header_len = max_t(int, header_len,
|
||||
sizeof(struct batadv_coded_packet));
|
||||
#endif
|
||||
|
||||
return header_len + ETH_HLEN;
|
||||
}
|
||||
|
||||
|
|
@ -577,39 +560,6 @@ void batadv_recv_handler_unregister(u8 packet_type)
|
|||
batadv_rx_handler[packet_type] = batadv_recv_unhandled_packet;
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_skb_crc32() - calculate CRC32 of the whole packet and skip bytes in
|
||||
* the header
|
||||
* @skb: skb pointing to fragmented socket buffers
|
||||
* @payload_ptr: Pointer to position inside the head buffer of the skb
|
||||
* marking the start of the data to be CRC'ed
|
||||
*
|
||||
* payload_ptr must always point to an address in the skb head buffer and not to
|
||||
* a fragment.
|
||||
*
|
||||
* Return: big endian crc32c of the checksummed data
|
||||
*/
|
||||
__be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr)
|
||||
{
|
||||
u32 crc = 0;
|
||||
unsigned int from;
|
||||
unsigned int to = skb->len;
|
||||
struct skb_seq_state st;
|
||||
const u8 *data;
|
||||
unsigned int len;
|
||||
unsigned int consumed = 0;
|
||||
|
||||
from = (unsigned int)(payload_ptr - skb->data);
|
||||
|
||||
skb_prepare_seq_read(skb, from, to, &st);
|
||||
while ((len = skb_seq_read(consumed, &data, &st)) != 0) {
|
||||
crc = crc32c(crc, data, len);
|
||||
consumed += len;
|
||||
}
|
||||
|
||||
return htonl(crc);
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_get_vid() - extract the VLAN identifier from skb if any
|
||||
* @skb: the buffer containing the packet
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#define BATADV_DRIVER_DEVICE "batman-adv"
|
||||
|
||||
#ifndef BATADV_SOURCE_VERSION
|
||||
#define BATADV_SOURCE_VERSION "2025.3"
|
||||
#define BATADV_SOURCE_VERSION "2025.4"
|
||||
#endif
|
||||
|
||||
/* B.A.T.M.A.N. parameters */
|
||||
|
|
@ -121,8 +121,6 @@
|
|||
#define BATADV_RESET_PROTECTION_MS 30000
|
||||
#define BATADV_EXPECTED_SEQNO_RANGE 65536
|
||||
|
||||
#define BATADV_NC_NODE_TIMEOUT 10000 /* Milliseconds */
|
||||
|
||||
/**
|
||||
* BATADV_TP_MAX_NUM - maximum number of simultaneously active tp sessions
|
||||
*/
|
||||
|
|
@ -250,7 +248,6 @@ batadv_recv_handler_register(u8 packet_type,
|
|||
int (*recv_handler)(struct sk_buff *,
|
||||
struct batadv_hard_iface *));
|
||||
void batadv_recv_handler_unregister(u8 packet_type);
|
||||
__be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr);
|
||||
|
||||
/**
|
||||
* batadv_compare_eth() - Compare two not u16 aligned Ethernet addresses
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/netlink.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <uapi/linux/batadv_packet.h>
|
||||
#include <uapi/linux/batman_adv.h>
|
||||
|
||||
|
|
@ -46,7 +47,6 @@
|
|||
#include "gateway_client.h"
|
||||
#include "hard-interface.h"
|
||||
#include "multicast.h"
|
||||
#include "network-coding.h"
|
||||
#include "send.h"
|
||||
#include "translation-table.h"
|
||||
|
||||
|
|
@ -802,8 +802,6 @@ static int batadv_meshif_init_late(struct net_device *dev)
|
|||
|
||||
bat_priv->primary_if = NULL;
|
||||
|
||||
batadv_nc_init_bat_priv(bat_priv);
|
||||
|
||||
if (!bat_priv->algo_ops) {
|
||||
ret = batadv_algo_select(bat_priv, batadv_routing_algo);
|
||||
if (ret < 0)
|
||||
|
|
@ -947,17 +945,6 @@ static const struct {
|
|||
{ "dat_put_rx" },
|
||||
{ "dat_cached_reply_tx" },
|
||||
#endif
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
{ "nc_code" },
|
||||
{ "nc_code_bytes" },
|
||||
{ "nc_recode" },
|
||||
{ "nc_recode_bytes" },
|
||||
{ "nc_buffer" },
|
||||
{ "nc_decode" },
|
||||
{ "nc_decode_bytes" },
|
||||
{ "nc_decode_failed" },
|
||||
{ "nc_sniffed" },
|
||||
#endif
|
||||
};
|
||||
|
||||
static void batadv_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/rtnetlink.h>
|
||||
|
||||
int batadv_skb_head_push(struct sk_buff *skb, unsigned int len);
|
||||
void batadv_interface_rx(struct net_device *mesh_iface,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#include "log.h"
|
||||
#include "mesh-interface.h"
|
||||
#include "multicast.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
#include "tp_meter.h"
|
||||
#include "translation-table.h"
|
||||
|
|
@ -144,7 +143,6 @@ static const struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = {
|
|||
[BATADV_ATTR_LOG_LEVEL] = { .type = NLA_U32 },
|
||||
[BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED] = { .type = NLA_U8 },
|
||||
[BATADV_ATTR_MULTICAST_FANOUT] = { .type = NLA_U32 },
|
||||
[BATADV_ATTR_NETWORK_CODING_ENABLED] = { .type = NLA_U8 },
|
||||
[BATADV_ATTR_ORIG_INTERVAL] = { .type = NLA_U32 },
|
||||
[BATADV_ATTR_ELP_INTERVAL] = { .type = NLA_U32 },
|
||||
[BATADV_ATTR_THROUGHPUT_OVERRIDE] = { .type = NLA_U32 },
|
||||
|
|
@ -345,12 +343,6 @@ static int batadv_netlink_mesh_fill(struct sk_buff *msg,
|
|||
goto nla_put_failure;
|
||||
#endif /* CONFIG_BATMAN_ADV_MCAST */
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
if (nla_put_u8(msg, BATADV_ATTR_NETWORK_CODING_ENABLED,
|
||||
!!atomic_read(&bat_priv->network_coding)))
|
||||
goto nla_put_failure;
|
||||
#endif /* CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
if (nla_put_u32(msg, BATADV_ATTR_ORIG_INTERVAL,
|
||||
atomic_read(&bat_priv->orig_interval)))
|
||||
goto nla_put_failure;
|
||||
|
|
@ -588,15 +580,6 @@ static int batadv_netlink_set_mesh(struct sk_buff *skb, struct genl_info *info)
|
|||
}
|
||||
#endif /* CONFIG_BATMAN_ADV_MCAST */
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
if (info->attrs[BATADV_ATTR_NETWORK_CODING_ENABLED]) {
|
||||
attr = info->attrs[BATADV_ATTR_NETWORK_CODING_ENABLED];
|
||||
|
||||
atomic_set(&bat_priv->network_coding, !!nla_get_u8(attr));
|
||||
batadv_nc_status_update(bat_priv->mesh_iface);
|
||||
}
|
||||
#endif /* CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
if (info->attrs[BATADV_ATTR_ORIG_INTERVAL]) {
|
||||
u32 orig_interval;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/genetlink.h>
|
||||
|
||||
void batadv_netlink_register(void);
|
||||
void batadv_netlink_unregister(void);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,106 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) B.A.T.M.A.N. contributors:
|
||||
*
|
||||
* Martin Hundebøll, Jeppe Ledet-Pedersen
|
||||
*/
|
||||
|
||||
#ifndef _NET_BATMAN_ADV_NETWORK_CODING_H_
|
||||
#define _NET_BATMAN_ADV_NETWORK_CODING_H_
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/types.h>
|
||||
#include <uapi/linux/batadv_packet.h>
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
|
||||
void batadv_nc_status_update(struct net_device *net_dev);
|
||||
int batadv_nc_init(void);
|
||||
int batadv_nc_mesh_init(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_mesh_free(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_update_nc_node(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
struct batadv_orig_node *orig_neigh_node,
|
||||
struct batadv_ogm_packet *ogm_packet,
|
||||
int is_single_hop_neigh);
|
||||
void batadv_nc_purge_orig(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
bool (*to_purge)(struct batadv_priv *,
|
||||
struct batadv_nc_node *));
|
||||
void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_init_orig(struct batadv_orig_node *orig_node);
|
||||
bool batadv_nc_skb_forward(struct sk_buff *skb,
|
||||
struct batadv_neigh_node *neigh_node);
|
||||
void batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv,
|
||||
struct sk_buff *skb);
|
||||
void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
|
||||
struct sk_buff *skb);
|
||||
|
||||
#else /* ifdef CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
static inline void batadv_nc_status_update(struct net_device *net_dev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int batadv_nc_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
batadv_nc_update_nc_node(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
struct batadv_orig_node *orig_neigh_node,
|
||||
struct batadv_ogm_packet *ogm_packet,
|
||||
int is_single_hop_neigh)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
batadv_nc_purge_orig(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
bool (*to_purge)(struct batadv_priv *,
|
||||
struct batadv_nc_node *))
|
||||
{
|
||||
}
|
||||
|
||||
static inline void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void batadv_nc_init_orig(struct batadv_orig_node *orig_node)
|
||||
{
|
||||
}
|
||||
|
||||
static inline bool batadv_nc_skb_forward(struct sk_buff *skb,
|
||||
struct batadv_neigh_node *neigh_node)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void
|
||||
batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* ifdef CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
#endif /* _NET_BATMAN_ADV_NETWORK_CODING_H_ */
|
||||
|
|
@ -37,7 +37,6 @@
|
|||
#include "log.h"
|
||||
#include "multicast.h"
|
||||
#include "netlink.h"
|
||||
#include "network-coding.h"
|
||||
#include "routing.h"
|
||||
#include "translation-table.h"
|
||||
|
||||
|
|
@ -883,9 +882,6 @@ void batadv_orig_node_release(struct kref *ref)
|
|||
}
|
||||
spin_unlock_bh(&orig_node->vlan_list_lock);
|
||||
|
||||
/* Free nc_nodes */
|
||||
batadv_nc_purge_orig(orig_node->bat_priv, orig_node, NULL);
|
||||
|
||||
call_rcu(&orig_node->rcu, batadv_orig_node_free_rcu);
|
||||
}
|
||||
|
||||
|
|
@ -959,8 +955,6 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
|
|||
spin_lock_init(&orig_node->tt_lock);
|
||||
spin_lock_init(&orig_node->vlan_list_lock);
|
||||
|
||||
batadv_nc_init_orig(orig_node);
|
||||
|
||||
/* extra reference for return */
|
||||
kref_init(&orig_node->refcount);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "hard-interface.h"
|
||||
#include "log.h"
|
||||
#include "mesh-interface.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
#include "send.h"
|
||||
#include "tp_meter.h"
|
||||
|
|
@ -956,15 +955,9 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
|
|||
|
||||
/* function returns -EREMOTE for promiscuous packets */
|
||||
check = batadv_check_unicast_packet(bat_priv, skb, hdr_size);
|
||||
|
||||
/* Even though the packet is not for us, we might save it to use for
|
||||
* decoding a later received coded packet
|
||||
*/
|
||||
if (check == -EREMOTE)
|
||||
batadv_nc_skb_store_sniffed_unicast(bat_priv, skb);
|
||||
|
||||
if (check < 0)
|
||||
goto free_skb;
|
||||
|
||||
if (!batadv_check_unicast_ttvn(bat_priv, skb, hdr_size))
|
||||
goto free_skb;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "hard-interface.h"
|
||||
#include "log.h"
|
||||
#include "mesh-interface.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
#include "routing.h"
|
||||
#include "translation-table.h"
|
||||
|
|
@ -63,12 +62,9 @@ int batadv_send_skb_packet(struct sk_buff *skb,
|
|||
struct batadv_hard_iface *hard_iface,
|
||||
const u8 *dst_addr)
|
||||
{
|
||||
struct batadv_priv *bat_priv;
|
||||
struct ethhdr *ethhdr;
|
||||
int ret;
|
||||
|
||||
bat_priv = netdev_priv(hard_iface->mesh_iface);
|
||||
|
||||
if (hard_iface->if_status != BATADV_IF_ACTIVE)
|
||||
goto send_skb_err;
|
||||
|
||||
|
|
@ -97,9 +93,6 @@ int batadv_send_skb_packet(struct sk_buff *skb,
|
|||
|
||||
skb->dev = hard_iface->net_dev;
|
||||
|
||||
/* Save a clone of the skb to use when decoding coded packets */
|
||||
batadv_nc_skb_store_for_decoding(bat_priv, skb);
|
||||
|
||||
/* dev_queue_xmit() returns a negative result on error. However on
|
||||
* congestion and traffic shaping, it drops and returns NET_XMIT_DROP
|
||||
* (which is > 0). This will not be treated as an error.
|
||||
|
|
@ -202,14 +195,7 @@ int batadv_send_skb_to_orig(struct sk_buff *skb,
|
|||
goto put_neigh_node;
|
||||
}
|
||||
|
||||
/* try to network code the packet, if it is received on an interface
|
||||
* (i.e. being forwarded). If the packet originates from this node or if
|
||||
* network coding fails, then send the packet as usual.
|
||||
*/
|
||||
if (recv_if && batadv_nc_skb_forward(skb, neigh_node))
|
||||
ret = -EINPROGRESS;
|
||||
else
|
||||
ret = batadv_send_unicast_skb(skb, neigh_node);
|
||||
ret = batadv_send_unicast_skb(skb, neigh_node);
|
||||
|
||||
/* skb was consumed */
|
||||
skb = NULL;
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const u8 *addr,
|
|||
/**
|
||||
* batadv_tt_local_entry_release() - release tt_local_entry from lists and queue
|
||||
* for free after rcu grace period
|
||||
* @ref: kref pointer of the nc_node
|
||||
* @ref: kref pointer of the batadv_tt_local_entry
|
||||
*/
|
||||
static void batadv_tt_local_entry_release(struct kref *ref)
|
||||
{
|
||||
|
|
@ -244,7 +244,7 @@ batadv_tt_local_entry_put(struct batadv_tt_local_entry *tt_local_entry)
|
|||
/**
|
||||
* batadv_tt_global_entry_release() - release tt_global_entry from lists and
|
||||
* queue for free after rcu grace period
|
||||
* @ref: kref pointer of the nc_node
|
||||
* @ref: kref pointer of the batadv_tt_global_entry
|
||||
*/
|
||||
void batadv_tt_global_entry_release(struct kref *ref)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -505,20 +505,6 @@ struct batadv_orig_node {
|
|||
/** @rcu: struct used for freeing in an RCU-safe manner */
|
||||
struct rcu_head rcu;
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
/** @in_coding_list: list of nodes this orig can hear */
|
||||
struct list_head in_coding_list;
|
||||
|
||||
/** @out_coding_list: list of nodes that can hear this orig */
|
||||
struct list_head out_coding_list;
|
||||
|
||||
/** @in_coding_list_lock: protects in_coding_list */
|
||||
spinlock_t in_coding_list_lock;
|
||||
|
||||
/** @out_coding_list_lock: protects out_coding_list */
|
||||
spinlock_t out_coding_list_lock;
|
||||
#endif
|
||||
|
||||
/** @fragments: array with heads for fragment chains */
|
||||
struct batadv_frag_table_entry fragments[BATADV_FRAG_BUFFER_COUNT];
|
||||
|
||||
|
|
@ -545,9 +531,6 @@ enum batadv_orig_capabilities {
|
|||
*/
|
||||
BATADV_ORIG_CAPA_HAS_DAT,
|
||||
|
||||
/** @BATADV_ORIG_CAPA_HAS_NC: orig node has network coding enabled */
|
||||
BATADV_ORIG_CAPA_HAS_NC,
|
||||
|
||||
/** @BATADV_ORIG_CAPA_HAS_TT: orig node has tt capability */
|
||||
BATADV_ORIG_CAPA_HAS_TT,
|
||||
|
||||
|
|
@ -953,60 +936,6 @@ enum batadv_counters {
|
|||
BATADV_CNT_DAT_CACHED_REPLY_TX,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
/**
|
||||
* @BATADV_CNT_NC_CODE: transmitted nc-combined traffic packet counter
|
||||
*/
|
||||
BATADV_CNT_NC_CODE,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_CODE_BYTES: transmitted nc-combined traffic bytes
|
||||
* counter
|
||||
*/
|
||||
BATADV_CNT_NC_CODE_BYTES,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_RECODE: transmitted nc-recombined traffic packet
|
||||
* counter
|
||||
*/
|
||||
BATADV_CNT_NC_RECODE,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_RECODE_BYTES: transmitted nc-recombined traffic bytes
|
||||
* counter
|
||||
*/
|
||||
BATADV_CNT_NC_RECODE_BYTES,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_BUFFER: counter for packets buffered for later nc
|
||||
* decoding
|
||||
*/
|
||||
BATADV_CNT_NC_BUFFER,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_DECODE: received and nc-decoded traffic packet counter
|
||||
*/
|
||||
BATADV_CNT_NC_DECODE,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_DECODE_BYTES: received and nc-decoded traffic bytes
|
||||
* counter
|
||||
*/
|
||||
BATADV_CNT_NC_DECODE_BYTES,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_DECODE_FAILED: received and decode-failed traffic
|
||||
* packet counter
|
||||
*/
|
||||
BATADV_CNT_NC_DECODE_FAILED,
|
||||
|
||||
/**
|
||||
* @BATADV_CNT_NC_SNIFFED: counter for nc-decoded packets received in
|
||||
* promisc mode.
|
||||
*/
|
||||
BATADV_CNT_NC_SNIFFED,
|
||||
#endif
|
||||
|
||||
/** @BATADV_CNT_NUM: number of traffic counters */
|
||||
BATADV_CNT_NUM,
|
||||
};
|
||||
|
|
@ -1339,56 +1268,6 @@ struct batadv_priv_mcast {
|
|||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct batadv_priv_nc - per mesh interface network coding private data
|
||||
*/
|
||||
struct batadv_priv_nc {
|
||||
/** @work: work queue callback item for cleanup */
|
||||
struct delayed_work work;
|
||||
|
||||
/**
|
||||
* @min_tq: only consider neighbors for encoding if neigh_tq > min_tq
|
||||
*/
|
||||
u8 min_tq;
|
||||
|
||||
/**
|
||||
* @max_fwd_delay: maximum packet forward delay to allow coding of
|
||||
* packets
|
||||
*/
|
||||
u32 max_fwd_delay;
|
||||
|
||||
/**
|
||||
* @max_buffer_time: buffer time for sniffed packets used to decoding
|
||||
*/
|
||||
u32 max_buffer_time;
|
||||
|
||||
/**
|
||||
* @timestamp_fwd_flush: timestamp of last forward packet queue flush
|
||||
*/
|
||||
unsigned long timestamp_fwd_flush;
|
||||
|
||||
/**
|
||||
* @timestamp_sniffed_purge: timestamp of last sniffed packet queue
|
||||
* purge
|
||||
*/
|
||||
unsigned long timestamp_sniffed_purge;
|
||||
|
||||
/**
|
||||
* @coding_hash: Hash table used to buffer skbs while waiting for
|
||||
* another incoming skb to code it with. Skbs are added to the buffer
|
||||
* just before being forwarded in routing.c
|
||||
*/
|
||||
struct batadv_hashtable *coding_hash;
|
||||
|
||||
/**
|
||||
* @decoding_hash: Hash table used to buffer skbs that might be needed
|
||||
* to decode a received coded skb. The buffer is used for 1) skbs
|
||||
* arriving on the mesh-interface; 2) skbs overheard on the
|
||||
* hard-interface; and 3) skbs forwarded by batman-adv.
|
||||
*/
|
||||
struct batadv_hashtable *decoding_hash;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct batadv_tp_unacked - unacked packet meta-information
|
||||
*
|
||||
|
|
@ -1775,16 +1654,6 @@ struct batadv_priv {
|
|||
struct batadv_priv_mcast mcast;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
/**
|
||||
* @network_coding: bool indicating whether network coding is enabled
|
||||
*/
|
||||
atomic_t network_coding;
|
||||
|
||||
/** @nc: network coding data */
|
||||
struct batadv_priv_nc nc;
|
||||
#endif /* CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_BATMAN_V
|
||||
/** @bat_v: B.A.T.M.A.N. V per mesh-interface private data */
|
||||
struct batadv_priv_bat_v bat_v;
|
||||
|
|
@ -2016,96 +1885,11 @@ struct batadv_tt_roam_node {
|
|||
struct list_head list;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct batadv_nc_node - network coding node
|
||||
*/
|
||||
struct batadv_nc_node {
|
||||
/** @list: next and prev pointer for the list handling */
|
||||
struct list_head list;
|
||||
|
||||
/** @addr: the node's mac address */
|
||||
u8 addr[ETH_ALEN];
|
||||
|
||||
/** @refcount: number of contexts the object is used by */
|
||||
struct kref refcount;
|
||||
|
||||
/** @rcu: struct used for freeing in an RCU-safe manner */
|
||||
struct rcu_head rcu;
|
||||
|
||||
/** @orig_node: pointer to corresponding orig node struct */
|
||||
struct batadv_orig_node *orig_node;
|
||||
|
||||
/** @last_seen: timestamp of last ogm received from this node */
|
||||
unsigned long last_seen;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct batadv_nc_path - network coding path
|
||||
*/
|
||||
struct batadv_nc_path {
|
||||
/** @hash_entry: next and prev pointer for the list handling */
|
||||
struct hlist_node hash_entry;
|
||||
|
||||
/** @rcu: struct used for freeing in an RCU-safe manner */
|
||||
struct rcu_head rcu;
|
||||
|
||||
/** @refcount: number of contexts the object is used by */
|
||||
struct kref refcount;
|
||||
|
||||
/** @packet_list: list of buffered packets for this path */
|
||||
struct list_head packet_list;
|
||||
|
||||
/** @packet_list_lock: access lock for packet list */
|
||||
spinlock_t packet_list_lock;
|
||||
|
||||
/** @next_hop: next hop (destination) of path */
|
||||
u8 next_hop[ETH_ALEN];
|
||||
|
||||
/** @prev_hop: previous hop (source) of path */
|
||||
u8 prev_hop[ETH_ALEN];
|
||||
|
||||
/** @last_valid: timestamp for last validation of path */
|
||||
unsigned long last_valid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct batadv_nc_packet - network coding packet used when coding and
|
||||
* decoding packets
|
||||
*/
|
||||
struct batadv_nc_packet {
|
||||
/** @list: next and prev pointer for the list handling */
|
||||
struct list_head list;
|
||||
|
||||
/** @packet_id: crc32 checksum of skb data */
|
||||
__be32 packet_id;
|
||||
|
||||
/**
|
||||
* @timestamp: field containing the info when the packet was added to
|
||||
* path
|
||||
*/
|
||||
unsigned long timestamp;
|
||||
|
||||
/** @neigh_node: pointer to original next hop neighbor of skb */
|
||||
struct batadv_neigh_node *neigh_node;
|
||||
|
||||
/** @skb: skb which can be encoded or used for decoding */
|
||||
struct sk_buff *skb;
|
||||
|
||||
/** @nc_path: pointer to path this nc packet is attached to */
|
||||
struct batadv_nc_path *nc_path;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct batadv_skb_cb - control buffer structure used to store private data
|
||||
* relevant to batman-adv in the skb->cb buffer in skbs.
|
||||
*/
|
||||
struct batadv_skb_cb {
|
||||
/**
|
||||
* @decoded: Marks a skb as decoded, which is checked when searching for
|
||||
* coding opportunities in network-coding.c
|
||||
*/
|
||||
unsigned char decoded:1;
|
||||
|
||||
/** @num_bcasts: Counter for broadcast packet retransmissions */
|
||||
unsigned char num_bcasts;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user