<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/switchdev.h, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-19T23:49:20Z</updated>
<entry>
<title>net: switchdev: change ageing_time type to clock_t</title>
<updated>2016-07-19T23:49:20Z</updated>
<author>
<name>Vivien Didelot</name>
<email>vivien.didelot@savoirfairelinux.com</email>
</author>
<published>2016-07-18T19:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eabfdda93477f6ee5e153f560560e9cb1c617fd7'/>
<id>urn:sha1:eabfdda93477f6ee5e153f560560e9cb1c617fd7</id>
<content type='text'>
The switchdev value for the SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME
attribute is a clock_t and requires to use helpers such as
clock_t_to_jiffies() to convert to milliseconds.

Change ageing_time type from u32 to clock_t to make it explicit.

Fixes: f55ac58ae64c ("switchdev: add bridge ageing_time attribute")
Signed-off-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: pass pointer to fib_info instead of copy</title>
<updated>2016-05-17T17:58:49Z</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.shady.money/linux/commit/?id=da4ed55165d41b1073f9a476f1c18493e9bf8c8e'/>
<id>urn:sha1:da4ed55165d41b1073f9a476f1c18493e9bf8c8e</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>switchdev: Adding complete operation to deferred switchdev ops</title>
<updated>2016-04-24T18:23:32Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-04-21T10:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ceb2afbd6aee4643056b47156baad6841db8e78'/>
<id>urn:sha1:7ceb2afbd6aee4643056b47156baad6841db8e78</id>
<content type='text'>
When using switchdev deferred operation (SWITCHDEV_F_DEFER), the operation
is executed in different context and the application doesn't have any way
to get the operation real status.

Adding a completion callback fixes that. This patch adds fields to
switchdev_attr and switchdev_obj "complete_priv" field which is used by
the "complete" callback.

Application can set a complete function which will be called once the
operation executed.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: Adding MDB entry offload</title>
<updated>2016-01-10T21:50:20Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-10T20:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d41e12593a9a6c4aaf113d44c8c619067b2b0aa'/>
<id>urn:sha1:4d41e12593a9a6c4aaf113d44c8c619067b2b0aa</id>
<content type='text'>
Define HW multicast entry: MAC and VID.
Using a MAC address simplifies support for both IPV4 and IPv6.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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: add bridge vlan_filtering attribute</title>
<updated>2016-01-06T19:42:40Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-06T12:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81435c33e062cbd4508da6f64655cb0967eeb65f'/>
<id>urn:sha1:81435c33e062cbd4508da6f64655cb0967eeb65f</id>
<content type='text'>
Adding vlan_filtering attribute to allow hardware vendor to support
vlan-aware bridges. Vlan_filtering is a per-bridge attribute.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
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: Pass original device to port netdev driver</title>
<updated>2015-12-15T16:58:20Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2015-12-15T15:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6'/>
<id>urn:sha1:6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6</id>
<content type='text'>
switchdev drivers need to know the netdev on which the switchdev op was
invoked. For example, the STP state of a VLAN interface configured on top
of a port can change while being member in a bridge. In this case, the
underlying driver should only change the STP state of that particular
VLAN and not of all the VLANs configured on the port.

However, current switchdev infrastructure only passes the port netdev down
to the driver. Solve that by passing the original device down to the
driver as part of the required switchdev object / attribute.

This doesn't entail any change in current switchdev drivers. It simply
enables those supporting stacked devices to know the originating device
and act accordingly.

Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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>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.shady.money/linux/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.shady.money/linux/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.shady.money/linux/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.shady.money/linux/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>
</feed>
