<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/batman-adv/vis.c, branch v3.3.8</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>batman-adv: create a common substructure for tt_global/local_entry</title>
<updated>2011-11-20T12:08:35+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-10-30T11:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=48100bac89a6161ca53dd65697fe635f77986686'/>
<id>48100bac89a6161ca53dd65697fe635f77986686</id>
<content type='text'>
Several functions in the translation table management code assume that the
tt_global_entry and tt_local_entry structures have the same initial fields such
as 'addr' and 'hash_entry'. To improve the code readability and to avoid
mistakes in later changes, a common substructure that substitute the shared
fields has been introduced (struct tt_common_entry).

Thanks to this modification, it has also been possible to slightly reduce the
code length by merging some functions like compare_ltt/gtt() and
tt_local/global_hash_find()

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several functions in the translation table management code assume that the
tt_global_entry and tt_local_entry structures have the same initial fields such
as 'addr' and 'hash_entry'. To improve the code readability and to avoid
mistakes in later changes, a common substructure that substitute the shared
fields has been introduced (struct tt_common_entry).

Thanks to this modification, it has also been possible to slightly reduce the
code length by merging some functions like compare_ltt/gtt() and
tt_local/global_hash_find()

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: fixed hash functions type to uint32_t instead of int</title>
<updated>2011-11-20T12:08:33+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-10-05T15:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c90681b8505946761b55d4981c9c3b56b3c4171b'/>
<id>c90681b8505946761b55d4981c9c3b56b3c4171b</id>
<content type='text'>
There are two reasons for this fix:
- the result of choose_orig() and vis_choose() is an index and therefore it can't
  be negative. Hence it is correct to make the return type unsigned too.

- sizeof(int) may not be the same on ALL the architectures. Since we plan to use
  choose_orig() as DHT hash function, we need to guarantee that, given the same
  argument, the result is the same. Then it is correct to explicitly express
  the size of the return type (and the second argument). Since the expected
  length is currently 4, uint32_t is the most convenient choice.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two reasons for this fix:
- the result of choose_orig() and vis_choose() is an index and therefore it can't
  be negative. Hence it is correct to make the return type unsigned too.

- sizeof(int) may not be the same on ALL the architectures. Since we plan to use
  choose_orig() as DHT hash function, we need to guarantee that, given the same
  argument, the result is the same. Then it is correct to explicitly express
  the size of the return type (and the second argument). Since the expected
  length is currently 4, uint32_t is the most convenient choice.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Remove unnecessary OOM logging messages</title>
<updated>2011-09-08T15:52:30+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-08-29T21:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=320f422f629c7ed5d07b4186aa491d1e11d18a4c'/>
<id>320f422f629c7ed5d07b4186aa491d1e11d18a4c</id>
<content type='text'>
Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: correct several typ0s in the comments</title>
<updated>2011-08-22T13:16:19+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-07-09T15:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=015758d00251a4dd9287806cdab4b9c1298f97ed'/>
<id>015758d00251a4dd9287806cdab4b9c1298f97ed</id>
<content type='text'>
Several typos have been corrected and some sentences have been rephrased

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several typos have been corrected and some sentences have been rephrased

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: hash_add() has to discriminate on the return value</title>
<updated>2011-08-22T13:16:19+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-07-09T22:36:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1a1f37d9257a4792ca17b28b1c2e4ad15fe95b28'/>
<id>1a1f37d9257a4792ca17b28b1c2e4ad15fe95b28</id>
<content type='text'>
hash_add() returns 0 on success while returns -1 either on error and on
entry already present. The caller could use such information to select
its behaviour. For this reason it is useful that hash_add() returns -1
in case on error and returns 1 in case of entry already present.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hash_add() returns 0 on success while returns -1 either on error and on
entry already present. The caller could use such information to select
its behaviour. For this reason it is useful that hash_add() returns -1
in case on error and returns 1 in case of entry already present.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: protect the local and the global trans-tables with rcu</title>
<updated>2011-06-20T09:37:30+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-04-27T12:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7683fdc1e88644ee8108a1f33faba80545f0024d'/>
<id>7683fdc1e88644ee8108a1f33faba80545f0024d</id>
<content type='text'>
The local and the global translation-tables are now lock free and rcu
protected.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Acked-by: Simon Wunderlich &lt;siwu@hrz.tu-chemnitz.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The local and the global translation-tables are now lock free and rcu
protected.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Acked-by: Simon Wunderlich &lt;siwu@hrz.tu-chemnitz.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: move smallest_signed_int(), seq_before() and seq_after() into main.h</title>
<updated>2011-05-30T05:39:35+00:00</updated>
<author>
<name>Antonio Quartulli</name>
<email>ordex@autistici.org</email>
</author>
<published>2011-05-18T07:20:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f5d33d37786af139cecde5af831d64a671bb756b'/>
<id>f5d33d37786af139cecde5af831d64a671bb756b</id>
<content type='text'>
smallest_signed_int(), seq_before() and seq_after() are very useful
functions that help to handle comparisons between sequence numbers.
However they were only defined in vis.c. With this patch every
batman-adv function will be able to use them.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smallest_signed_int(), seq_before() and seq_after() are very useful
functions that help to handle comparisons between sequence numbers.
However they were only defined in vis.c. With this patch every
batman-adv function will be able to use them.

Signed-off-by: Antonio Quartulli &lt;ordex@autistici.org&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Calculate sizeof using variable insead of types</title>
<updated>2011-05-30T05:39:33+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-05-14T21:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=704509b8d44886cebfbaff1a9813c35dfa986954'/>
<id>704509b8d44886cebfbaff1a9813c35dfa986954</id>
<content type='text'>
Documentation/CodingStyle recommends to use the form

	p = kmalloc(sizeof(*p), ...);

to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Documentation/CodingStyle recommends to use the form

	p = kmalloc(sizeof(*p), ...);

to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Remove casts from type x to type x</title>
<updated>2011-05-30T05:39:33+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-05-14T21:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=958ca5985604a6f13387d32de489365df816558b'/>
<id>958ca5985604a6f13387d32de489365df816558b</id>
<content type='text'>
Casting from pointer like 'struct orig_node*' to 'struct orig_node *'
doesn't provide any additional functionality and can be savely removed.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Casting from pointer like 'struct orig_node*' to 'struct orig_node *'
doesn't provide any additional functionality and can be savely removed.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Add const type qualifier for pointers</title>
<updated>2011-05-30T05:39:31+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-05-14T21:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=747e4221a03cde62402b614ca1f8e961b8416130'/>
<id>747e4221a03cde62402b614ca1f8e961b8416130</id>
<content type='text'>
batman-adv uses pointers which are marked as const and should not
violate that type qualifier by passing it to functions which force a
cast to the non-const version.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
batman-adv uses pointers which are marked as const and should not
violate that type qualifier by passing it to functions which force a
cast to the non-const version.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
