netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org
Subject: Re: pull request for net: batman-adv 2013-06-11
Date: Tue, 11 Jun 2013 10:07:35 +0200	[thread overview]
Message-ID: <20130611080735.GA1466@ritirata.org> (raw)
In-Reply-To: <1370932501-3937-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

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

Hello David,

On Tue, Jun 11, 2013 at 08:34:58AM +0200, Antonio Quartulli wrote:

[...]

> 
> 
> Please pull or let me know if there is any problem!

After having applied this patchset the merge of net into net-next will generate
a conflict. Here you have the needed information to properly solve it.

Regards,



conflict in net/batman-adv/bat_iv_ogm.c:

++<<<<<<< HEAD
 + * batadv_ring_buffer_set - update the ring buffer with the given value
 + * @lq_recv: pointer to the ring buffer
 + * @lq_index: index to store the value at
 + * @value: value to store in the ring buffer
 + */
 +static void batadv_ring_buffer_set(uint8_t lq_recv[], uint8_t *lq_index,
 +				   uint8_t value)
 +{
 +	lq_recv[*lq_index] = value;
 +	*lq_index = (*lq_index + 1) % BATADV_TQ_GLOBAL_WINDOW_SIZE;
 +}
 +
 +/**
 + * batadv_ring_buffer_set - compute the average of all non-zero values stored
 + * in the given ring buffer
 + * @lq_recv: pointer to the ring buffer
 + *
 + * Returns computed average value.
 + */
 +static uint8_t batadv_ring_buffer_avg(const uint8_t lq_recv[])
 +{
 +	const uint8_t *ptr;
 +	uint16_t count = 0, i = 0, sum = 0;
 +
 +	ptr = lq_recv;
 +
 +	while (i < BATADV_TQ_GLOBAL_WINDOW_SIZE) {
 +		if (*ptr != 0) {
 +			count++;
 +			sum += *ptr;
 +		}
 +
 +		i++;
 +		ptr++;
 +	}
 +
 +	if (count == 0)
 +		return 0;
 +
 +	return (uint8_t)(sum / count);
 +}
++=======
+  * batadv_dup_status - duplicate status
+  * @BATADV_NO_DUP: the packet is a duplicate
+  * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the
+  *  neighbor)
+  * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor
+  * @BATADV_PROTECTED: originator is currently protected (after reboot)
+  */
+ enum batadv_dup_status {
+ 	BATADV_NO_DUP = 0,
+ 	BATADV_ORIG_DUP,
+ 	BATADV_NEIGH_DUP,
+ 	BATADV_PROTECTED,
+ };
+ 
++>>>>>>> 7c24bbb... batman-adv: forward late OGMs from best next hop

is solved as follows (add /** at the top of the batadv_dup_status kerneldoc and
keep everything):

<<<<<<<<<<<<
 * batadv_ring_buffer_set - update the ring buffer with the given value
 * @lq_recv: pointer to the ring buffer
 * @lq_index: index to store the value at
 * @value: value to store in the ring buffer
 */
static void batadv_ring_buffer_set(uint8_t lq_recv[], uint8_t *lq_index,
				   uint8_t value)
{
	lq_recv[*lq_index] = value;
	*lq_index = (*lq_index + 1) % BATADV_TQ_GLOBAL_WINDOW_SIZE;
}

/**
 * batadv_ring_buffer_set - compute the average of all non-zero values stored
 * in the given ring buffer
 * @lq_recv: pointer to the ring buffer
 *
 * Returns computed average value.
 */
static uint8_t batadv_ring_buffer_avg(const uint8_t lq_recv[])
{
	const uint8_t *ptr;
	uint16_t count = 0, i = 0, sum = 0;

	ptr = lq_recv;

	while (i < BATADV_TQ_GLOBAL_WINDOW_SIZE) {
		if (*ptr != 0) {
			count++;
			sum += *ptr;
		}

		i++;
		ptr++;
	}

	if (count == 0)
		return 0;

	return (uint8_t)(sum / count);
}

/**
 * batadv_dup_status - duplicate status
 * @BATADV_NO_DUP: the packet is a duplicate
 * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the
 *  neighbor)
 * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor
 * @BATADV_PROTECTED: originator is currently protected (after reboot)
 */
enum batadv_dup_status {
	BATADV_NO_DUP = 0,
	BATADV_ORIG_DUP,
	BATADV_NEIGH_DUP,
	BATADV_PROTECTED,
};

>>>>>>>>>>>>>>

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

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

  parent reply	other threads:[~2013-06-11  8:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11  6:34 pull request for net: batman-adv 2013-06-11 Antonio Quartulli
2013-06-11  6:34 ` [PATCH 1/3] batman-adv: wait for rtnl in batadv_store_mesh_iface instead of failing if it is taken Antonio Quartulli
2013-06-11 14:09   ` Ben Hutchings
2013-06-11 14:17     ` Antonio Quartulli
2013-06-11  6:35 ` [PATCH 2/3] batman-adv: forward late OGMs from best next hop Antonio Quartulli
2013-06-11  6:35 ` [PATCH 3/3] batman-adv: Don't handle address updates when bla is disabled Antonio Quartulli
     [not found] ` <1370932501-3937-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2013-06-11  8:07   ` Antonio Quartulli [this message]
2013-06-13  8:27   ` pull request for net: batman-adv 2013-06-11 David Miller

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=20130611080735.GA1466@ritirata.org \
    --to=ordex-gaufno9rbhfsroww+9zijq@public.gmane.org \
    --cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).