[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1308761280.10423.19.camel@Joe-Laptop>
Date: Wed, 22 Jun 2011 09:48:00 -0700
From: Joe Perches <joe@...ches.com>
To: Sebastian Pöhn
<sebastian.belden@...glemail.com>
Cc: Sebastian Pöhn <sebastian.poehn@...den.com>,
Linux Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] gianfar v5: implement nfc
On Wed, 2011-06-22 at 11:29 +0200, Sebastian Pöhn wrote:
> First of all thanks for the feedback. I know the fgar_swap_*bits
> function is a bit ugly. The problem with your suggestion is that it is
> necessary to swap a1<>a2 and b1<>b2 AT THE SAME TIME.
These swaps are done sequentially.
> Otherwise
> information the second swap is needing is swapped away by the first one.
How so?
> > swap_bits(temp_table->fe[new_first],
> > temp_table->fe[old_first], 0xff80);
> > swap_bits(temp_table->fe[new_last],
> > temp_table->fe[old_last], 0xff80);
new_first and old_first are swapped.
new_last and old_last are swapped.
> @@ -1356,10 +1356,13 @@ static void gfar_sort_mask_table(struct gfar_mask_entry *mask_table,
> new_first = mask_table[start].start + 1;
> new_last = mask_table[i - 1].end;
I'm a bit confused by this:
+ if (prev != mask_table[i].block) {
+ old_first = mask_table[start].start + 1;
+ old_last = mask_table[i - 1].end;
[no changes to start or i]
+ new_first = mask_table[start].start + 1;
+ new_last = mask_table[i - 1].end;
+
+ gfar_swap_ff80_bits(&temp_table->fe[new_first],
+ &temp_table->fe[old_first],
+ &temp_table->fe[new_last],
+ &temp_table->fe[old_last]);
Doesn't this just swap the same bits around twice?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists