Skip to contentSkip to conversation

pull request for net-next: batman-adv 2017-08-02

PATCH In review Simon Wunderlich 3 participants 8 messages Aug 2, 2017 – Aug 3, 2017 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover pull request for net-next: batman-adv 2017-08-02

Hi David,

here is a small feature/cleanup pull request of batman-adv to go into net-next.

Please pull or let me know of any problem!

Thank you,
Simon

The following changes since commit 5771a8c08880cdca3bfb4a3fc6d309d6bba20877:

Linux v4.13-rc1 (2017-07-15 15:22:10 -0700)

are available in the git repository at:

git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20170802

for you to fetch changes up to e45eba2467bd64fd196dc6f8b50ff5e59c0058da:

batman-adv: Convert batman-adv.txt to reStructuredText (2017-07-29 09:51:28 +0200)

----------------------------------------------------------------
This feature/cleanup patchset includes the following patches:

- bump version strings, by Simon Wunderlich

- Remove unnecessary length qualifier, by Joe Perches

- Remove too short %pM field width, by Sven Eckelmann

- Remove return value handling from skb_put_data, by Sven Eckelmann

- Spelling fixes, by Colin Ian King

- Convert batman-adv.txt to reStructuredText, by Sven Eckelmann

----------------------------------------------------------------
Colin Ian King (1):
batman-adv: fix various spelling mistakes

Joe Perches (1):
batman-adv: Remove unnecessary length qualifier in %14pM

Simon Wunderlich (1):
batman-adv: Start new development cycle

Sven Eckelmann (3):
batman-adv: Remove too short %pM printk field width
batman-adv: Remove variable deprecated by skb_put_data
batman-adv: Convert batman-adv.txt to reStructuredText

 Documentation/networking/00-INDEX       |   2 -
 Documentation/networking/batman-adv.rst | 220 ++++++++++++++++++++++++++++++++
 Documentation/networking/batman-adv.txt | 215 -------------------------------
 Documentation/networking/index.rst      |   1 +
 MAINTAINERS                             |   2 +-
 net/batman-adv/bat_iv_ogm.c             |   6 +-
 net/batman-adv/bat_v_ogm.c              |  16 +--
 net/batman-adv/distributed-arp-table.c  |   2 +-
 net/batman-adv/main.h                   |   2 +-
 net/batman-adv/send.c                   |   2 +-
 10 files changed, 235 insertions(+), 233 deletions(-)
 create mode 100644 Documentation/networking/batman-adv.rst
 delete mode 100644 Documentation/networking/batman-adv.txt

A message that is not in the archive (sent off-list or not yet received): 20170802142322.13376-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org

#2 lore raw

PATCH 1/6 batman-adv: Start new development cycle

---
 net/batman-adv/main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/main.h +1 -1
index 2be8f1f46529..05cc7637c064 100644
@@ -24,7 +24,7 @@
 #define BATADV_DRIVER_DEVICE "batman-adv"
 
 #ifndef BATADV_SOURCE_VERSION
-#define BATADV_SOURCE_VERSION "2017.2"
+#define BATADV_SOURCE_VERSION "2017.3"
 #endif
 
 /* B.A.T.M.A.N. parameters */
Signature · 1 line
2.11.0
maintainer
#3 lore raw

PATCH 2/6 batman-adv: Remove unnecessary length qualifier in %14pM

In reply to Simon Wunderlich

From: Joe Perches <[email protected]>

It's misleading and unnecessary.

---
 net/batman-adv/distributed-arp-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/distributed-arp-table.c +1 -1
index 6930d6b50f99..b6cfa78e9381 100644
@@ -834,7 +834,7 @@ int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset)
 			last_seen_msecs = last_seen_msecs % 60000;
 			last_seen_secs = last_seen_msecs / 1000;
 
-			seq_printf(seq, " * %15pI4 %14pM %4i %6i:%02i\n",
+			seq_printf(seq, " * %15pI4 %pM %4i %6i:%02i\n",
 				   &dat_entry->ip, dat_entry->mac_addr,
 				   batadv_print_vid(dat_entry->vid),
 				   last_seen_mins, last_seen_secs);
Signature · 1 line
2.11.0
maintainer
#4 lore raw

PATCH 3/6 batman-adv: Remove too short %pM printk field width

In reply to Simon Wunderlich

From: Sven Eckelmann <[email protected]>

The string representation for a mac address produced by %pM is 17 characters long. Left-aligning the output in a 15 character wide field width %-15pM is therefore misleading and unnecessary.

---
 net/batman-adv/bat_iv_ogm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/bat_iv_ogm.c +1 -1
index a3501173e200..c27001d38574 100644
@@ -1281,7 +1281,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
 	batadv_ogm_packet->tq = combined_tq;
 
 	batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
-		   "bidirectional: orig = %-15pM neigh = %-15pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, iface_penalty: %3i, total tq: %3i, if_incoming = %s, if_outgoing = %s\n",
+		   "bidirectional: orig = %pM neigh = %pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, iface_penalty: %3i, total tq: %3i, if_incoming = %s, if_outgoing = %s\n",
 		   orig_node->orig, orig_neigh_node->orig, total_count,
 		   neigh_rq_count, tq_own, tq_asym_penalty, tq_iface_penalty,
 		   batadv_ogm_packet->tq, if_incoming->net_dev->name,
Signature · 1 line
2.11.0
maintainer
#5 lore raw

PATCH 4/6 batman-adv: Remove variable deprecated by skb_put_data

In reply to Simon Wunderlich

From: Sven Eckelmann <[email protected]>

skb_put_data makes it unnecessary to store the skb_put return value to copy some data to the packet. The returned pointer of skb_put_data should therefore not stored by functions which previously only used it to copy some data.

---
 net/batman-adv/bat_iv_ogm.c | 4 +---
 net/batman-adv/bat_v_ogm.c  | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)
net/batman-adv/bat_iv_ogm.c +1 -3
index c27001d38574..83ba5483455a 100644
@@ -729,11 +729,9 @@ static void batadv_iv_ogm_aggregate(struct batadv_forw_packet *forw_packet_aggr,
 				    const unsigned char *packet_buff,
 				    int packet_len, bool direct_link)
 {
-	unsigned char *skb_buff;
 	unsigned long new_direct_link_flag;
 
-	skb_buff = skb_put_data(forw_packet_aggr->skb, packet_buff,
-				packet_len);
+	skb_put_data(forw_packet_aggr->skb, packet_buff, packet_len);
 	forw_packet_aggr->packet_len += packet_len;
 	forw_packet_aggr->num_packets++;
 
net/batman-adv/bat_v_ogm.c +2 -2
index 1e3dc374bfde..894c96371e41 100644
@@ -137,7 +137,7 @@ static void batadv_v_ogm_send(struct work_struct *work)
 	struct batadv_priv *bat_priv;
 	struct batadv_ogm2_packet *ogm_packet;
 	struct sk_buff *skb, *skb_tmp;
-	unsigned char *ogm_buff, *pkt_buff;
+	unsigned char *ogm_buff;
 	int ogm_buff_len;
 	u16 tvlv_len = 0;
 	int ret;
@@ -166,7 +166,7 @@ static void batadv_v_ogm_send(struct work_struct *work)
 		goto reschedule;
 
 	skb_reserve(skb, ETH_HLEN);
-	pkt_buff = skb_put_data(skb, ogm_buff, ogm_buff_len);
+	skb_put_data(skb, ogm_buff, ogm_buff_len);
 
 	ogm_packet = (struct batadv_ogm2_packet *)skb->data;
 	ogm_packet->seqno = htonl(atomic_read(&bat_priv->bat_v.ogm_seqno));
Signature · 1 line
2.11.0
maintainer
#6 lore raw

PATCH 5/6 batman-adv: fix various spelling mistakes

In reply to Simon Wunderlich

From: Colin Ian King <[email protected]>

Trivial fix to spelling mistakes in batadv_dbg debug messages and also in a comment and ensure comment line is not wider than 80 characters

"ourselve" -> "ourselves"
"surpressed" -> "suppressed"
"troughput" -> "throughput"

---
 net/batman-adv/bat_v_ogm.c | 12 ++++++------
 net/batman-adv/send.c      |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
net/batman-adv/bat_v_ogm.c +6 -6
index 894c96371e41..8be61734fc43 100644
@@ -200,7 +200,7 @@ static void batadv_v_ogm_send(struct work_struct *work)
 				type = "unknown";
 			}
 
-			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "OGM2 from ourselve on %s surpressed: %s\n",
+			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "OGM2 from ourselves on %s suppressed: %s\n",
 				   hard_iface->net_dev->name, type);
 
 			batadv_hardif_put(hard_iface);
@@ -683,18 +683,18 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset,
 	ogm_throughput = ntohl(ogm_packet->throughput);
 
 	batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
-		   "Received OGM2 packet via NB: %pM, IF: %s [%pM] (from OG: %pM, seqno %u, troughput %u, TTL %u, V %u, tvlv_len %u)\n",
+		   "Received OGM2 packet via NB: %pM, IF: %s [%pM] (from OG: %pM, seqno %u, throughput %u, TTL %u, V %u, tvlv_len %u)\n",
 		   ethhdr->h_source, if_incoming->net_dev->name,
 		   if_incoming->net_dev->dev_addr, ogm_packet->orig,
 		   ntohl(ogm_packet->seqno), ogm_throughput, ogm_packet->ttl,
 		   ogm_packet->version, ntohs(ogm_packet->tvlv_len));
 
-	/* If the troughput metric is 0, immediately drop the packet. No need to
-	 * create orig_node / neigh_node for an unusable route.
+	/* If the throughput metric is 0, immediately drop the packet. No need
+	 * to create orig_node / neigh_node for an unusable route.
 	 */
 	if (ogm_throughput == 0) {
 		batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
-			   "Drop packet: originator packet with troughput metric of 0\n");
+			   "Drop packet: originator packet with throughput metric of 0\n");
 		return;
 	}
 
@@ -762,7 +762,7 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset,
 				type = "unknown";
 			}
 
-			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "OGM2 packet from %pM on %s surpressed: %s\n",
+			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "OGM2 packet from %pM on %s suppressed: %s\n",
 				   ogm_packet->orig, hard_iface->net_dev->name,
 				   type);
 
net/batman-adv/send.c +1 -1
index d239a9d72ac3..054a65e6eb68 100644
@@ -911,7 +911,7 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
 				type = "unknown";
 			}
 
-			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "BCAST packet from orig %pM on %s surpressed: %s\n",
+			batadv_dbg(BATADV_DBG_BATMAN, bat_priv, "BCAST packet from orig %pM on %s suppressed: %s\n",
 				   bcast_packet->orig,
 				   hard_iface->net_dev->name, type);
 
Signature · 1 line
2.11.0
maintainer
#7 lore raw

PATCH 6/6 batman-adv: Convert batman-adv.txt to reStructuredText

In reply to Simon Wunderlich

From: Sven Eckelmann <[email protected]>

Converting the freeform text to parsable reStructuredText, allows the integration in the sphinx based documentation system of the kernel. It will therefore be accessible as hypertext under
https://www.kernel.org/doc/html/latest/

---
 Documentation/networking/00-INDEX       |   2 -
 Documentation/networking/batman-adv.rst | 220 ++++++++++++++++++++++++++++++++
 Documentation/networking/batman-adv.txt | 215 -------------------------------
 Documentation/networking/index.rst      |   1 +
 MAINTAINERS                             |   2 +-
 5 files changed, 222 insertions(+), 218 deletions(-)
 create mode 100644 Documentation/networking/batman-adv.rst
 delete mode 100644 Documentation/networking/batman-adv.txt
Documentation/networking/00-INDEX +0 -2
index c6beb5f1637f..7a79b3587dd3 100644
@@ -30,8 +30,6 @@ atm.txt
 	- info on where to get ATM programs and support for Linux.
 ax25.txt
 	- info on using AX.25 and NET/ROM code for Linux
-batman-adv.txt
-	- B.A.T.M.A.N routing protocol on top of layer 2 Ethernet Frames.
 baycom.txt
 	- info on the driver for Baycom style amateur radio modems
 bonding.txt
Documentation/networking/batman-adv.rst new file +220 -0

220 lines not on this page · raw message

Documentation/networking/batman-adv.txt deleted +0 -215

215 lines not on this page · raw message

Documentation/networking/index.rst +1 -0
index b5bd87e01f52..66e620866245 100644
@@ -6,6 +6,7 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
+   batman-adv
    kapi
    z8530book
 
MAINTAINERS +1 -1
index 205d3977ac46..c28a1325724c 100644
@@ -2481,7 +2481,7 @@ Q:	https://patchwork.open-mesh.org/project/batman/list/
 S:	Maintained
 F:	Documentation/ABI/testing/sysfs-class-net-batman-adv
 F:	Documentation/ABI/testing/sysfs-class-net-mesh
-F:	Documentation/networking/batman-adv.txt
+F:	Documentation/networking/batman-adv.rst
 F:	include/uapi/linux/batman_adv.h
 F:	net/batman-adv/
 
Signature · 1 line
2.11.0