<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/net/batman-adv/send.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/net/batman-adv/send.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/net/batman-adv/send.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-02T08:00:13Z</updated>
<entry>
<title>batman-adv: Migrate to linux/container_of.h</title>
<updated>2022-03-02T08:00:13Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2022-01-21T16:14:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=eb7da4f17dfcee649767f89e17842f664a459549'/>
<id>urn:sha1:eb7da4f17dfcee649767f89e17842f664a459549</id>
<content type='text'>
The commit d2a8ebbf8192 ("kernel.h: split out container_of() and
typeof_member() macros")  introduced a new header for the container_of
related macros from (previously) linux/kernel.h.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: bcast: remove remaining skb-copy calls</title>
<updated>2021-08-18T16:39:00Z</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@c0d3.blue</email>
</author>
<published>2021-05-16T22:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=808cfdfad57999c85f9ab13499a38d136d032232'/>
<id>urn:sha1:808cfdfad57999c85f9ab13499a38d136d032232</id>
<content type='text'>
We currently have two code paths for broadcast packets:

A) self-generated, via batadv_interface_tx()-&gt;
   batadv_send_bcast_packet().
B) received/forwarded, via batadv_recv_bcast_packet()-&gt;
   batadv_forw_bcast_packet().

For A), self-generated broadcast packets:

The only modifications to the skb data is the ethernet header which is
added/pushed to the skb in
batadv_send_broadcast_skb()-&gt;batadv_send_skb_packet(). However before
doing so, batadv_skb_head_push() is called which calls skb_cow_head() to
unshare the space for the to be pushed ethernet header. So for this
case, it is safe to use skb clones.

For B), received/forwarded packets:

The same applies as in A) for the to be forwarded packets. Only the
ethernet header is added. However after (queueing for) forwarding the
packet in batadv_recv_bcast_packet()-&gt;batadv_forw_bcast_packet(), a
packet is additionally decapsulated and is sent up the stack through
batadv_recv_bcast_packet()-&gt;batadv_interface_rx().

Protocols higher up the stack are already required to check if the
packet is shared and create a copy for further modifications. When the
next (protocol) layer works correctly, it cannot happen that it tries to
operate on the data behind the skb clone which is still queued up for
forwarding.

Co-authored-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Linus Lüssing &lt;linus.luessing@c0d3.blue&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop NULL check before dropping references</title>
<updated>2021-08-08T18:21:40Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2021-08-08T17:11:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=79a0bffb835a094e523c448295d27ccbe6ac6a9b'/>
<id>urn:sha1:79a0bffb835a094e523c448295d27ccbe6ac6a9b</id>
<content type='text'>
The check if a batman-adv related object is NULL or not is now directly in
the batadv_*_put functions. It is not needed anymore to perform this check
outside these function:

The changes were generated using a coccinelle semantic patch:

  @@
  expression E;
  @@
  - if (likely(E != NULL))
  (
  batadv_backbone_gw_put
  |
  batadv_claim_put
  |
  batadv_dat_entry_put
  |
  batadv_gw_node_put
  |
  batadv_hardif_neigh_put
  |
  batadv_hardif_put
  |
  batadv_nc_node_put
  |
  batadv_nc_path_put
  |
  batadv_neigh_ifinfo_put
  |
  batadv_neigh_node_put
  |
  batadv_orig_ifinfo_put
  |
  batadv_orig_node_put
  |
  batadv_orig_node_vlan_put
  |
  batadv_softif_vlan_put
  |
  batadv_tp_vars_put
  |
  batadv_tt_global_entry_put
  |
  batadv_tt_local_entry_put
  |
  batadv_tt_orig_list_entry_put
  |
  batadv_tt_req_node_put
  |
  batadv_tvlv_container_put
  |
  batadv_tvlv_handler_put
  )(E);

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: bcast: avoid skb-copy for (re)queued broadcasts</title>
<updated>2021-05-17T10:00:44Z</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@c0d3.blue</email>
</author>
<published>2021-05-16T22:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4cbf055002c53c364d1b3275792e4487af76dd2d'/>
<id>urn:sha1:4cbf055002c53c364d1b3275792e4487af76dd2d</id>
<content type='text'>
Broadcast packets send via batadv_send_outstanding_bcast_packet() were
originally copied in batadv_forw_bcast_packet_to_list() before being
queued. And after that only the ethernet header will be pushed through
batadv_send_broadcast_skb()-&gt;batadv_send_skb_packet() which works safely
on skb clones as it uses batadv_skb_head_push()-&gt;skb_cow_head().

Signed-off-by: Linus Lüssing &lt;linus.luessing@c0d3.blue&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: bcast: queue per interface, if needed</title>
<updated>2021-05-17T10:00:44Z</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@c0d3.blue</email>
</author>
<published>2021-05-16T22:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3f69339068f93e206e581e6ab9927502f8722ac7'/>
<id>urn:sha1:3f69339068f93e206e581e6ab9927502f8722ac7</id>
<content type='text'>
Currently we schedule a broadcast packet like:

3x: [ [(re-)queue] --&gt; for(hard-if): maybe-transmit ]

The intention of queueing a broadcast packet multiple times is to
increase robustness for wireless interfaces. However on interfaces
which we only broadcast on once the queueing induces an unnecessary
penalty. This patch restructures the queueing to be performed on a per
interface basis:

for(hard-if):
- transmit
- if wireless: [queue] --&gt; transmit --&gt; [requeue] --&gt; transmit

Next to the performance benefits on non-wireless interfaces this
should also make it easier to apply alternative strategies for
transmissions on wireless interfaces in the future (for instance sending
via unicast transmissions on wireless interfaces, without queueing in
batman-adv, if appropriate).

Signed-off-by: Linus Lüssing &lt;linus.luessing@c0d3.blue&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop publication years from copyright info</title>
<updated>2021-02-06T08:22:10Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2020-12-31T23:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfa55c6d47b1e75ccc4b950616e881f3fd07712e'/>
<id>urn:sha1:cfa55c6d47b1e75ccc4b950616e881f3fd07712e</id>
<content type='text'>
The batman-adv source code was using the year of publication (to net-next)
as "last" year for the copyright statement. The whole source code mentioned
in the MAINTAINERS "BATMAN ADVANCED" section was handled as a single entity
regarding the publishing year.

This avoided having outdated (in sense of year information - not copyright
holder) publishing information inside several files. But since the simple
"update copyright year" commit (without other changes) in the file was not
well received in the upstream kernel, the option to not have a copyright
year (for initial and last publication) in the files are chosen instead.
More detailed information about the years can still be retrieved from the
SCM system.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Acked-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop repeated words in comments</title>
<updated>2020-08-18T17:39:54Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2020-07-31T18:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=21ba5ab2aa8adecef4addf8f481c33f204da93d2'/>
<id>urn:sha1:21ba5ab2aa8adecef4addf8f481c33f204da93d2</id>
<content type='text'>
checkpatch found various instances of "Possible repeated word" in various
comments.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Fix typos and grammar in documentation</title>
<updated>2020-06-26T08:36:30Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2020-06-01T18:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bccb48c89fe3c09f1cbb7c8612e31f5daa1d4541'/>
<id>urn:sha1:bccb48c89fe3c09f1cbb7c8612e31f5daa1d4541</id>
<content type='text'>
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Update copyright years for 2020</title>
<updated>2019-12-31T23:00:33Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2019-12-31T23:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=68e039f966cb577c91649a02591646ac3919f8c9'/>
<id>urn:sha1:68e039f966cb577c91649a02591646ac3919f8c9</id>
<content type='text'>
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop license boilerplate</title>
<updated>2019-03-25T08:31:35Z</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2019-03-03T14:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0d5f20c42b24adffa1505ec3d4930d11dfaea82f'/>
<id>urn:sha1:0d5f20c42b24adffa1505ec3d4930d11dfaea82f</id>
<content type='text'>
All files got a SPDX-License-Identifier with commit 7db7d9f369a4
("batman-adv: Add SPDX license identifier above copyright header"). All the
required information about the license conditions can be found in
LICENSES/.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
</content>
</entry>
</feed>
