public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [RFCv2 5/6] batman-adv: consider outgoing interface in OGM sending
Date: Tue, 1 Oct 2013 11:00:09 +0200	[thread overview]
Message-ID: <20131001090009.GD1448@neomailbox.net> (raw)
In-Reply-To: <1378312060-30922-6-git-send-email-siwu@hrz.tu-chemnitz.de>

[-- Attachment #1: Type: text/plain, Size: 2073 bytes --]

On Wed, Sep 04, 2013 at 06:27:39PM +0200, Simon Wunderlich wrote:
> @@ -574,6 +562,13 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
>  		if (!primary_if)
>  			goto out;
>  
> +		/* packet is not leaving on the same interface.
> +		 * TODO: some other parts here could be reworked as the
> +		 * outgoing interface is specified now.
> +		 */

What does this TODO exactly mean? What could be reworked?

> +		if (forw_packet->if_outgoing != if_outgoing)
> +			goto out;
> +
>  		/* packets without direct link flag and high TTL
>  		 * are flooded through the net
>  		 */
> @@ -620,6 +615,7 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
>  					int packet_len, unsigned long send_time,
>  					bool direct_link,
>  					struct batadv_hard_iface *if_incoming,
> +					struct batadv_hard_iface *if_outgoing,
>  					int own_packet)

ehm, kerneldoc?

[...]

> @@ -1449,6 +1489,10 @@ batadv_iv_ogm_process_per_outif(const struct ethhdr *ethhdr,
>  					  if_outgoing, tt_buff, dup_status);
>  	rcu_read_unlock();
>  
> +	/* don't forward packet if no outgoing interface was specified */
> +	if (!if_outgoing)
> +		goto out_neigh;

can this really happen? or does it mean we have a BUG?

> +
>  	/* is single hop (direct) neighbor */
>  	if (is_single_hop_neigh) {
>  		if ((batadv_ogm_packet->header.ttl <= 2) &&
[...]

> @@ -539,9 +542,12 @@ void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
>  
>  	/* we have to have at least one packet in the queue
>  	 * to determine the queues wake up time unless we are
> -	 * shutting down
> +	 * shutting down.
> +	 *
> +	 * only re-schedule if this is the "original" copy.
>  	 */
> -	if (forw_packet->own)
> +	if (forw_packet->own &&
> +	    forw_packet->if_incoming == forw_packet->if_outgoing)
>  		batadv_schedule_bat_ogm(forw_packet->if_incoming);

What do you mean with "original" copy? Can an "own" packet have if_incoming !=
if_outgoing?


Cheers,

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-10-01  9:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 16:27 [B.A.T.M.A.N.] [RFCv2 0/6] add network wide multi interface optimization Simon Wunderlich
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 1/6] batman-adv: remove bonding and interface alternating Simon Wunderlich
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 2/6] batman-adv: split tq information in neigh_node struct Simon Wunderlich
2013-09-13 13:23   ` Antonio Quartulli
2013-10-03 20:39     ` Simon Wunderlich
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 3/6] batman-adv: split out router from orig_node Simon Wunderlich
2013-09-22 20:47   ` Antonio Quartulli
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 4/6] batman-adv: add WiFi penalty Simon Wunderlich
2013-09-25 20:18   ` Antonio Quartulli
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 5/6] batman-adv: consider outgoing interface in OGM sending Simon Wunderlich
2013-10-01  9:00   ` Antonio Quartulli [this message]
2013-10-03 22:11     ` Simon Wunderlich
2013-09-04 16:27 ` [B.A.T.M.A.N.] [RFCv2 6/6] batman-adv: add bonding again Simon Wunderlich
2013-10-01  9:24   ` Antonio Quartulli
2013-10-03 22:53     ` Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131001090009.GD1448@neomailbox.net \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox