<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/bridge/br_fdb.c, branch linux-3.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-05-10T00:49:17Z</updated>
<entry>
<title>bridge: Convert compare_ether_addr to ether_addr_equal</title>
<updated>2012-05-10T00:49:17Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2012-05-08T18:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a7b6ef9b9938a1f5cb91ccc0b713b9443edc79f'/>
<id>urn:sha1:9a7b6ef9b9938a1f5cb91ccc0b713b9443edc79f</id>
<content type='text'>
Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Done via cocci script:

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
-	!compare_ether_addr(a, b)
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	compare_ether_addr(a, b)
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) == 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) != 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) == 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) != 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!!ether_addr_equal(a, b)
+	ether_addr_equal(a, b)

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add generic PF_BRIDGE:RTM_ FDB hooks</title>
<updated>2012-04-15T17:06:04Z</updated>
<author>
<name>John Fastabend</name>
</author>
<published>2012-04-15T06:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77162022ab26a1f99d3af30c03760a76f86e193d'/>
<id>urn:sha1:77162022ab26a1f99d3af30c03760a76f86e193d</id>
<content type='text'>
This adds two new flags NTF_MASTER and NTF_SELF that can
now be used to specify where PF_BRIDGE netlink commands should
be sent. NTF_MASTER sends the commands to the 'dev-&gt;master'
device for parsing. Typically this will be the linux net/bridge,
or open-vswitch devices. Also without any flags set the command
will be handled by the master device as well so that current user
space tools continue to work as expected.

The NTF_SELF flag will push the PF_BRIDGE commands to the
device. In the basic example below the commands are then parsed
and programmed in the embedded bridge.

Note if both NTF_SELF and NTF_MASTER bits are set then the
command will be sent to both 'dev-&gt;master' and 'dev' this allows
user space to easily keep the embedded bridge and software bridge
in sync.

There is a slight complication in the case with both flags set
when an error occurs. To resolve this the rtnl handler clears
the NTF_ flag in the netlink ack to indicate which sets completed
successfully. The add/del handlers will abort as soon as any
error occurs.

To support this new net device ops were added to call into
the device and the existing bridging code was refactored
to use these. There should be no required changes in user space
to support the current bridge behavior.

A basic setup with a SR-IOV enabled NIC looks like this,

          veth0  veth2
            |      |
          ------------
          |  bridge0 |   &lt;---- software bridging
          ------------
               /
               /
  ethx.y      ethx
    VF         PF
     \         \          &lt;---- propagate FDB entries to HW
     \         \
  --------------------
  |  Embedded Bridge |    &lt;---- hardware offloaded switching
  --------------------

In this case the embedded bridge must be managed to allow 'veth0'
to communicate with 'ethx.y' correctly. At present drivers managing
the embedded bridge either send frames onto the network which
then get dropped by the switch OR the embedded bridge will flood
these frames. With this patch we have a mechanism to manage the
embedded bridge correctly from user space. This example is specific
to SR-IOV but replacing the VF with another PF or dropping this
into the DSA framework generates similar management issues.

Examples session using the 'br'[1] tool to add, dump and then
delete a mac address with a new "embedded" option and enabled
ixgbe driver:

# br fdb add 22:35:19:ac:60:59 dev eth3
# br fdb
port    mac addr                flags
veth0   22:35:19:ac:60:58       static
veth0   9a:5f:81:f7:f6:ec       local
eth3    00:1b:21:55:23:59       local
eth3    22:35:19:ac:60:59       static
veth0   22:35:19:ac:60:57       static
#br fdb add 22:35:19:ac:60:59 embedded dev eth3
#br fdb
port    mac addr                flags
veth0   22:35:19:ac:60:58       static
veth0   9a:5f:81:f7:f6:ec       local
eth3    00:1b:21:55:23:59       local
eth3    22:35:19:ac:60:59       static
veth0   22:35:19:ac:60:57       static
eth3    22:35:19:ac:60:59       local embedded
#br fdb del 22:35:19:ac:60:59 embedded dev eth3

I added a couple lines to 'br' to set the flags correctly is all. It
is my opinion that the merit of this patch is now embedded and SW
bridges can both be modeled correctly in user space using very nearly
the same message passing.

[1] 'br' tool was published as an RFC here and will be renamed 'bridge'
    http://patchwork.ozlabs.org/patch/117664/

Thanks to Jamal Hadi Salim, Stephen Hemminger and Ben Hutchings for
valuable feedback, suggestions, and review.

v2: fixed api descriptions and error case with both NTF_SELF and
    NTF_MASTER set plus updated patch description.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: Stop using NLA_PUT*().</title>
<updated>2012-04-02T08:33:44Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2012-04-02T00:49:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2eb812e6501597e8b4bc4fdef2db8158c1a3afb6'/>
<id>urn:sha1:2eb812e6501597e8b4bc4fdef2db8158c1a3afb6</id>
<content type='text'>
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: BH already disabled in br_fdb_cleanup()</title>
<updated>2012-01-17T15:17:32Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2012-01-16T04:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27a429383b399fc0f68bea55c422d7179f3c8b05'/>
<id>urn:sha1:27a429383b399fc0f68bea55c422d7179f3c8b05</id>
<content type='text'>
br_fdb_cleanup() is run from timer interrupt, BH already masked.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
CC: Štefan Gula &lt;steweg@gmail.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net:bridge: use IS_ENABLED</title>
<updated>2011-12-16T20:49:52Z</updated>
<author>
<name>Igor Maravić</name>
</author>
<published>2011-12-12T02:58:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6373c4c0ecb3a944c34117a3daeac315d641b5f'/>
<id>urn:sha1:e6373c4c0ecb3a944c34117a3daeac315d641b5f</id>
<content type='text'>
Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)

Signed-off-by: Igor Maravić &lt;igorm@etf.rs&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: add local MAC address to forwarding table (v2)</title>
<updated>2011-12-09T00:40:28Z</updated>
<author>
<name>stephen hemminger</name>
</author>
<published>2011-12-08T07:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43598813386f6205edf3c21f1fe97f731ccb4f15'/>
<id>urn:sha1:43598813386f6205edf3c21f1fe97f731ccb4f15</id>
<content type='text'>
If user has configured a MAC address that is not one of the existing
ports of the bridge, then we need to add a special entry in the forwarding
table. This forwarding table entry has no outgoing port so it has to be
treated a little differently. The special entry is reported by the netlink
interface with ifindex of bridge, but ignored by the old interface since there
is no usable way to put it in the ABI.

Reported-by: Koki Sanagi &lt;sanagi.koki@jp.fujitsu.com&gt;
Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: rearrange fdb notifications (v2)</title>
<updated>2011-12-09T00:40:28Z</updated>
<author>
<name>stephen hemminger</name>
</author>
<published>2011-12-08T07:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31e8a49c161b00c648e960903512c9cbaee777b1'/>
<id>urn:sha1:31e8a49c161b00c648e960903512c9cbaee777b1</id>
<content type='text'>
Pass bridge to fdb_notify so it can determine correct namespace based
on namespace of bridge rather than namespace of destination port.
Also makes next patch easier.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: refactor fdb_notify</title>
<updated>2011-12-09T00:40:28Z</updated>
<author>
<name>stephen hemminger</name>
</author>
<published>2011-12-06T13:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f58ee4e1a28b68ad94130a747d676cbc6644dbd1'/>
<id>urn:sha1:f58ee4e1a28b68ad94130a747d676cbc6644dbd1</id>
<content type='text'>
Move fdb_notify outside of fdb_create. This fixes the problem
that notification of local entries are not flagged correctly.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: add NTF_USE support</title>
<updated>2011-11-14T05:41:54Z</updated>
<author>
<name>stephen hemminger</name>
</author>
<published>2011-11-09T18:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=292d1398983f3514a0eab13b7606df7f4730b498'/>
<id>urn:sha1:292d1398983f3514a0eab13b7606df7f4730b498</id>
<content type='text'>
More changes to the recent code to support control of forwarding
database via netlink.
   * Support NTF_USE like neighbour table
   * Validate state bits from application
   * Only send notifications (and change bits) if new entry is
     different.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: allow updating existing fdb entries</title>
<updated>2011-10-03T16:17:33Z</updated>
<author>
<name>stephen hemminger</name>
</author>
<published>2011-09-30T14:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64af1bac9b979ae1f2f052742fda06d65f497643'/>
<id>urn:sha1:64af1bac9b979ae1f2f052742fda06d65f497643</id>
<content type='text'>
Need to allow application to update existing fdb entries that already
exist. This makes bridge netlink neighbor API have same flags and
semantics as ip neighbor table.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
