<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/net/switchdev.h, branch v4.4.21</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.21</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.21'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-06-24T17:18:16Z</updated>
<entry>
<title>switchdev: pass pointer to fib_info instead of copy</title>
<updated>2016-06-24T17:18:16Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2016-05-17T16:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=835d0122a57ffaea43162d0e7a4f5bf25d2af78b'/>
<id>urn:sha1:835d0122a57ffaea43162d0e7a4f5bf25d2af78b</id>
<content type='text'>
[ Upstream commit da4ed55165d41b1073f9a476f1c18493e9bf8c8e ]

The problem is that fib_info-&gt;nh is [0] so the struct fib_info
allocation size depends on number of nexthops. If we just copy fib_info,
we do not copy the nexthops info and driver accesses memory which is not
ours.

Given the fact that fib4 does not defer operations and therefore it does
not need copy, just pass the pointer down to drivers as it was done
before.

Fixes: 850d0cbc91 ("switchdev: remove pointers from switchdev objects")
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: switchdev: fix return code of fdb_dump stub</title>
<updated>2015-11-16T20:24:37Z</updated>
<author>
<name>Dragos Tatulea</name>
<email>dragos@endocode.com</email>
</author>
<published>2015-11-16T09:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=24cb7055a3066634a0f3fa0cd6a4780652905d35'/>
<id>urn:sha1:24cb7055a3066634a0f3fa0cd6a4780652905d35</id>
<content type='text'>
rtnl_fdb_dump always expects an index to be returned by the ndo_fdb_dump op,
but when CONFIG_NET_SWITCHDEV is off, it returns an error.

Fix that by returning the given unmodified idx.

A similar fix was 0890cf6cb6ab ("switchdev: fix return value of
switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y
case.

Fixes: 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: Dragos Tatulea &lt;dragos@endocode.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: introduce possibility to defer obj_add/del</title>
<updated>2015-10-15T13:09:49Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-14T17:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4d429c5ddc5128fccd3048059ae26bb39f0d8284'/>
<id>urn:sha1:4d429c5ddc5128fccd3048059ae26bb39f0d8284</id>
<content type='text'>
Similar to the attr usecase, the caller knows if he is holding RTNL and is
in atomic section. So let the called to decide the correct call variant.

This allows drivers to sleep inside their ops and wait for hw to get the
operation status. Then the status is propagated into switchdev core.
This avoids silent errors in drivers.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: remove pointers from switchdev objects</title>
<updated>2015-10-15T13:09:49Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-14T17:40:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=850d0cbc9171f63f0418afffb0d89a84db927851'/>
<id>urn:sha1:850d0cbc9171f63f0418afffb0d89a84db927851</id>
<content type='text'>
When object is used in deferred work, we cannot use pointers in
switchdev object structures because the memory they point at may be already
used by someone else. So rather do local copy of the value.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Acked-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Reviewed-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>switchdev: allow caller to explicitly request attr_set as deferred</title>
<updated>2015-10-15T13:09:48Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-14T17:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0bc05d585d381c30de3fdf955730df31593d2101'/>
<id>urn:sha1:0bc05d585d381c30de3fdf955730df31593d2101</id>
<content type='text'>
Caller should know if he can call attr_set directly (when holding RTNL)
or if he has to defer the att_set processing for later.

This also allows drivers to sleep inside attr_set and report operation
status back to switchdev core. Switchdev core then warns if status is
not ok, instead of silent errors happening in drivers.

Benefit from newly introduced switchdev deferred ops infrastructure.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: make struct switchdev_attr parameter const for attr_set calls</title>
<updated>2015-10-15T13:09:46Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-14T17:40:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7fadf3047d005d17376da65aa9e5734f45a77d4'/>
<id>urn:sha1:f7fadf3047d005d17376da65aa9e5734f45a77d4</id>
<content type='text'>
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: introduce switchdev deferred ops infrastructure</title>
<updated>2015-10-15T13:09:46Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-14T17:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=793f40147e82cdedc80971fa7f5596d6ed1e555e'/>
<id>urn:sha1:793f40147e82cdedc80971fa7f5596d6ed1e555e</id>
<content type='text'>
Introduce infrastructure which will be used internally to defer ops.
Note that the deferred ops are queued up and either are processed by
scheduled work or explicitly by user calling deferred_process function.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: skip over ports returning -EOPNOTSUPP when recursing ports</title>
<updated>2015-10-12T12:20:20Z</updated>
<author>
<name>Scott Feldman</name>
<email>sfeldma@gmail.com</email>
</author>
<published>2015-10-09T02:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=464314ea6c119ebc22ee78453e63814453c31611'/>
<id>urn:sha1:464314ea6c119ebc22ee78453e63814453c31611</id>
<content type='text'>
This allows us to recurse over all the ports, skipping over unsupporting
ports.  Without the change, the recursion would stop at first unsupported
port.

Signed-off-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: add bridge ageing_time attribute</title>
<updated>2015-10-12T12:20:19Z</updated>
<author>
<name>Scott Feldman</name>
<email>sfeldma@gmail.com</email>
</author>
<published>2015-10-09T02:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f55ac58ae64cbb0315382e738681fe31837dcac0'/>
<id>urn:sha1:f55ac58ae64cbb0315382e738681fe31837dcac0</id>
<content type='text'>
Setting the stage to push bridge-level attributes down to port driver so
hardware can be programmed accordingly.  Bridge-level attribute example is
ageing_time.  This is a per-bridge attribute, not a per-bridge-port attr.

Signed-off-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: push object ID back to object structure</title>
<updated>2015-10-03T11:49:40Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-10-01T09:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9e8f4a548ab4710002c23c94c4b1bbde91b5e335'/>
<id>urn:sha1:9e8f4a548ab4710002c23c94c4b1bbde91b5e335</id>
<content type='text'>
Suggested-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Acked-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Reviewed-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
