<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/netdevsim/bpf.c, branch v5.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-07-26T03:37:02Z</updated>
<entry>
<title>bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands</title>
<updated>2020-07-26T03:37:02Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andriin@fb.com</email>
</author>
<published>2020-07-22T06:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8407fdeb9a6866784e249881f6c786a0835faba'/>
<id>urn:sha1:e8407fdeb9a6866784e249881f6c786a0835faba</id>
<content type='text'>
Now that BPF program/link management is centralized in generic net_device
code, kernel code never queries program id from drivers, so
XDP_QUERY_PROG/XDP_QUERY_PROG_HW commands are unnecessary.

This patch removes all the implementations of those commands in kernel, along
the xdp_attachment_query().

This patch was compile-tested on allyesconfig.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200722064603.3350758-10-andriin@fb.com
</content>
</entry>
<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>
</feed>
