<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/netdevsim/bpf.c, branch v5.8</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=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-02-03T23:32:20Z</updated>
<entry>
<title>netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs</title>
<updated>2020-02-03T23:32:20Z</updated>
<author>
<name>Taehee Yoo</name>
<email>ap420073@gmail.com</email>
</author>
<published>2020-02-01T16:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6556ff32f12d0a5380dd2fa6bbaa01373925a7d1'/>
<id>urn:sha1:6556ff32f12d0a5380dd2fa6bbaa01373925a7d1</id>
<content type='text'>
Debugfs APIs return valid pointer or error pointer. it doesn't return NULL.
So, using IS_ERR is enough, not using IS_ERR_OR_NULL.

Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: move netdev creation/destruction to dev probe</title>
<updated>2019-04-26T05:52:03Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e05b2d141fef22cfac1928cf0eb6890e5dae4216'/>
<id>urn:sha1:e05b2d141fef22cfac1928cf0eb6890e5dae4216</id>
<content type='text'>
Remove the existing way to create netdevsim over rtnetlink and move the
netdev creation/destruction to dev probe, so for every probed port,
a netdevsim-netdev instance is created.

Adjust selftests to work with new interface.

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>netdevsim: merge sdev into dev</title>
<updated>2019-04-26T05:52:02Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d514f41e793d2cbc737ba107d7ae26f387f5eecf'/>
<id>urn:sha1:d514f41e793d2cbc737ba107d7ae26f387f5eecf</id>
<content type='text'>
As previously introduce dev which is mapped 1:1 to a bus device covers
the purpose of the original shared device, merge the sdev code into dev.

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>netdevsim: move sdev-specific init/uninit code into separate functions</title>
<updated>2019-04-12T23:49:54Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-12T12:49:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b3a84bce4e21cb6826ba67c5fc68ce63dad83d9'/>
<id>urn:sha1:4b3a84bce4e21cb6826ba67c5fc68ce63dad83d9</id>
<content type='text'>
In order to improve readability and prepare for future code changes,
move sdev specific init/uninit code into separate functions.

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>netdevsim: make bpf_offload_dev_create() per-sdev instead of first ns</title>
<updated>2019-04-12T23:49:54Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-12T12:49:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b26b6946a62f37c1d0f9181288a74e3bee1bf6bb'/>
<id>urn:sha1:b26b6946a62f37c1d0f9181288a74e3bee1bf6bb</id>
<content type='text'>
offload dev is stored in sdev struct. However, first netdevsim instance
is used as a priv. Change this to be sdev to as it is shared among
multiple netdevsim instances.

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>netdevsim: move sdev specific bpf debugfs files to sdev dir</title>
<updated>2019-04-12T23:49:54Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-12T12:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38f58c972334833e0e0804a32e8cee8d8d475cb7'/>
<id>urn:sha1:38f58c972334833e0e0804a32e8cee8d8d475cb7</id>
<content type='text'>
Some netdevsim bpf debugfs files are per-sdev, yet they are defined per
netdevsim instance. Move them under sdev directory.

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>bpf: offload: add priv field for drivers</title>
<updated>2019-02-12T16:07:09Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2019-02-12T08:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc'/>
<id>urn:sha1:dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc</id>
<content type='text'>
Currently bpf_offload_dev does not have any priv pointer, forcing
the drivers to work backwards from the netdev in program metadata.
This is not great given programs are conceptually associated with
the offload device, and it means one or two unnecessary deferences.
Add a priv pointer to bpf_offload_dev.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Quentin Monnet &lt;quentin.monnet@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>netdevsim: convert to DEFINE_SHOW_ATTRIBUTE</title>
<updated>2018-12-13T00:00:48Z</updated>
<author>
<name>Yangtao Li</name>
<email>tiny.windzz@gmail.com</email>
</author>
<published>2018-12-12T16:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6652f0ff037d3cad81b82afd4f75c964ef611ec'/>
<id>urn:sha1:e6652f0ff037d3cad81b82afd4f75c964ef611ec</id>
<content type='text'>
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li &lt;tiny.windzz@gmail.com&gt;
Acked-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: Remove unused variable in nsim_bpf</title>
<updated>2018-11-17T01:51:13Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2018-11-12T22:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac8acec9912a93be9953446766e0bb73aeeecc64'/>
<id>urn:sha1:ac8acec9912a93be9953446766e0bb73aeeecc64</id>
<content type='text'>
Clang warns:

drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state'
[-Werror,-Wunused-variable]
        struct nsim_bpf_bound_prog *state;
                                    ^
1 error generated.

The declaration should have been removed in commit b07ade27e933 ("bpf:
pass translate() as a callback and remove its ndo_bpf subcommand").

Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Acked-by: Quentin Monnet &lt;quentin.monnet@netronome.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: do not pass netdev to translate() and prepare() offload callbacks</title>
<updated>2018-11-10T23:39:54Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin.monnet@netronome.com</email>
</author>
<published>2018-11-09T13:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16a8cb5cffd0a2929ae97bc258d2d9c92a4e7f6d'/>
<id>urn:sha1:16a8cb5cffd0a2929ae97bc258d2d9c92a4e7f6d</id>
<content type='text'>
The kernel functions to prepare verifier and translate for offloaded
program retrieve "offload" from "prog", and "netdev" from "offload".
Then both "prog" and "netdev" are passed to the callbacks.

Simplify this by letting the drivers retrieve the net device themselves
from the offload object attached to prog - if they need it at all. There
is currently no need to pass the netdev as an argument to those
functions.

Signed-off-by: Quentin Monnet &lt;quentin.monnet@netronome.com&gt;
Reviewed-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
