All users are gone now, remove the API.
Signed-off-by: Christoph Hellwig
---
arch/mips/Kconfig | 1 -
arch/mips/jazz/jazzdma.c| 1 -
arch/mips/mm/dma-noncoherent.c | 6 --
arch/parisc/Kconfig | 1 -
arch/parisc/kernel/pci-dma.c| 6 --
include/l
All operations are based on the controller, not the host page size.
Switch the dma pool to use the controller page size as well to avoid
massive overallocations on large page size systems.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 de
Use the proper modern API to transfer cache ownership for incoherent DMA.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/53c700.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 521950d0731e4a..57a08c42d00325
Use the proper modern API to transfer cache ownership for incoherent DMA.
Note that this moves the DMA helpers to the main lib82596.c file, so
that they can use virt_to_dma.
Signed-off-by: Christoph Hellwig
---
drivers/net/ethernet/i825xx/lasi_82596.c | 11 +--
drivers/net/ethernet/i825xx/lib82
Switch from coherent DMA pools to those backed by dma_alloc_pages. This
helps device with non-coherent DMA to avoid host accesses to uncached
memory for every submission of a larger than single entry I/O.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/pci.c | 80
Add a new file that contains helpera for misc DMA ops, which is only
built when CONFIG_DMA_OPS is set.
Signed-off-by: Christoph Hellwig
---
kernel/dma/Makefile | 1 +
kernel/dma/mapping.c | 47 +---
kernel/dma/ops_helpers.c | 51 +
This allows us to get rid of the LIB82596_DMA_ATTR defined and prepare
for untangling the coherent vs non-coherent DMA allocation API.
Signed-off-by: Christoph Hellwig
---
drivers/net/ethernet/i825xx/lasi_82596.c | 24 ++--
drivers/net/ethernet/i825xx/lib82596.c | 36 --
dma_declare_coherent_memory should not be in a DMA API guide aimed
at driver writers (that is consumers of the API). Move it to a comment
near the function instead.
Signed-off-by: Christoph Hellwig
---
Documentation/core-api/dma-api.rst | 24
kernel/dma/coherent.c
Add an new variant of a dmapool that uses non-coherent memory from
dma_alloc_pages. Unlike the existing mempool_create this one
initialized a pool allocated by the caller to avoid a pointless extra
allocation. At some point it might be worth to also switch the coherent
allocation over to a simila
Just merge these helpers into the main dma_direct_{alloc,free} routines,
as the additional checks are always false for the two callers.
Signed-off-by: Christoph Hellwig
---
arch/x86/kernel/amd_gart_64.c | 6 +++---
include/linux/dma-direct.h| 4
kernel/dma/direct.c | 39
Signed-off-by: Christoph Hellwig
---
arch/mips/include/asm/jazzdma.h | 2 -
arch/mips/jazz/jazzdma.c| 70 -
2 files changed, 72 deletions(-)
diff --git a/arch/mips/include/asm/jazzdma.h b/arch/mips/include/asm/jazzdma.h
index d13f940022d5f9..c831da7fa8980
Hi all,
this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs
with a separate new dma_alloc_pages API, which is available on all
platforms. In addition to cleaning up the convoluted code path, this
ensures that other drivers that have asked for better support for
non-coherent D
Hello,
syzbot found the following issue on:
HEAD commit:4993e4fe Add linux-next specific files for 20200814
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=107ad7d690
kernel config: https://syzkaller.appspot.com/x/.config?x=2055bd0d83d5ee16
dashboard
On 8/18/20 6:12 PM, Udip Pant wrote:
While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we
need to check the program type of the target program to grant the read /
write access to the packet data.
The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB
and othe
On Tue Aug 18 2020, Russell King - ARM Linux admin wrote:
> On Tue, Aug 18, 2020 at 12:32:45PM +0200, Kurt Kanzenbach wrote:
>> -static int is_pdelay_resp(u8 *msgtype)
>> +static int is_pdelay_resp(const struct ptp_header *hdr)
>> {
>> -return (*msgtype & 0xf) == 3;
>> +return (hdr->tsmt &
On Tue Aug 18 2020, Russell King wrote:
> On Tue, Aug 18, 2020 at 12:32:44PM +0200, Kurt Kanzenbach wrote:
>> The message type is located at different offsets within the ptp header
>> depending
>> on the ptp version (v1 or v2). Therefore, drivers which also deal with ptp v1
>> have some code for i
On Tue, 18 Aug 2020 16:17:19 -0700
Wei Wang wrote:
> + if (!oneline)
> + out("\n\tinet-sockopt: (");
> + else
> + out(" inet-sockopt: (");
> + out("recverr: %d, ", sockopt->recverr)
On 8/18/20 6:39 PM, Andrii Nakryiko wrote:
On Tue, Aug 18, 2020 at 6:23 PM Yonghong Song wrote:
On 8/18/20 2:33 PM, Andrii Nakryiko wrote:
That compilation warning is more annoying, than helpful.
Curious which compiler and which version caused this issue?
I did not hit with gcc 8.2 or
When H_SEND_CRQ command returns with H_CLOSED, it means the
server's CRQ is not ready yet. Instead of resetting immediately,
we wait for the server to launch passive init.
ibmvnic_init() and ibmvnic_reset_init() should also return the
error code from ibmvnic_send_crq_init() call.
Signed-off-by: Li
This patch series refactor reset_init and init functions,
improve the debugging messages, and make some other cosmetic changes
to make the code easier to read and debug.
Lijun Pan (5):
ibmvnic: print caller in several error messages
ibmvnic: compare adapter->init_done_rc with more readable
These two functions share the majority of the code, hence merge
them together. In the meanwhile, add a reset pass-in parameter
to differentiate them. Thus, the code is easier to read and to tell
the difference between reset_init and regular init.
Signed-off-by: Lijun Pan
---
drivers/net/ethernet
The error messages in the changed functions are exactly the same.
In order to differentiate them and make debugging easier,
we print the function names in the error messages.
Signed-off-by: Lijun Pan
---
drivers/net/ethernet/ibm/ibmvnic.c | 14 +++---
1 file changed, 7 insertions(+), 7 d
At the beginning of the function, from_passive_init is set false by
"adapter->from_passive_init = false;",
hence the if statement will never run.
Signed-off-by: Lijun Pan
---
drivers/net/ethernet/ibm/ibmvnic.c | 12
1 file changed, 12 deletions(-)
diff --git a/drivers/net/ethernet/
Instead of comparing (adapter->init_done_rc == 1), let it
be (adapter->init_done_rc == PARTIALSUCCESS).
Signed-off-by: Lijun Pan
---
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
b/drivers/net/ethernet/i
On Tue, Aug 18, 2020 at 6:37 PM Alexei Starovoitov
wrote:
>
> On Tue, Aug 18, 2020 at 06:31:51PM -0700, Andrii Nakryiko wrote:
> > On Tue, Aug 18, 2020 at 6:21 PM Alexei Starovoitov
> > wrote:
> > >
> > > On Tue, Aug 18, 2020 at 03:39:12PM -0700, Andrii Nakryiko wrote:
> > > > This patch set adds
Add tests for BTF type ID relocations. To allow testing this, enhance
core_relo.c test runner to allow dynamic initialization of test inputs.
If __builtin_btf_type_id() is not supported by Clang, skip tests.
Signed-off-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/core_reloc.c | 168 +
This patch set adds libbpf support for two new classes of CO-RE relocations:
type-based (TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_TARGET) and enum
value-vased (ENUMVAL_EXISTS/ENUMVAL_VALUE):
- TYPE_EXISTS allows to detect presence in kernel BTF of a locally-recorded
BTF type. Useful for fe
Add tests validating existence and value relocations for enum value-based
relocations. If __builtin_preserve_enum_value() built-in is not supported,
skip tests.
Signed-off-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/core_reloc.c | 56 +
.../bpf/progs/btf__core_reloc_enum
Implement two relocations of a new enumerator value-based CO-RE relocation
kind: ENUMVAL_EXISTS and ENUMVAL_VALUE.
First, ENUMVAL_EXISTS, allows to detect the presence of a named enumerator
value in the target (kernel) BTF. This is useful to do BPF helper/map/program
type support detection from BP
Implement support for TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_REMOTE
relocations. These are examples of type-based relocations, as opposed to
field-based relocations supported already. The difference is that they are
calculating relocation values based on the type itself, not a field within
a s
Add selftests for TYPE_EXISTS and TYPE_SIZE relocations, testing correctness
of relocations and handling of type compatiblity/incompatibility.
If __builtin_preserve_type_info() is not supported by compiler, skip tests.
Signed-off-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/core_reloc.c
Sending Slab or tail pages into ->sendpage will cause really strange
delayed oops. Prevent it right in the networking code instead of
requiring drivers to guess the exact conditions where sendpage works.
Based on a patch from Coly Li .
Signed-off-by: Christoph Hellwig
---
net/socket.c | 6
Since this is a mock-up driver with no real data path for now, but we
will have one at some point, enable VLANs while not filtering.
Signed-off-by: Florian Fainelli
---
drivers/net/dsa/dsa_loop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa
Changes in v2:
- set the DSA configure_vlan_while_not_filtering boolean
- return the actual occupancy
Florian Fainelli (2):
net: dsa: loop: Configure VLANs while not filtering
net: dsa: loop: Return VLAN table size through devlink
drivers/net/dsa/dsa_loop.c | 56
We return the VLAN table size through devlink as a simple parameter, we
do not support altering it at runtime:
devlink resource show mdio_bus/fixed-0:1f
mdio_bus/fixed-0:1f:
name VTU size 4096 occ 0 unit entry dpipe_tables none
and after configure a bridge with VLAN filtering:
devlink resource
On 8/18/2020 8:35 PM, Jakub Kicinski wrote:
On Tue, 18 Aug 2020 20:43:11 -0600 David Ahern wrote:
On 8/18/20 6:24 PM, Jakub Kicinski wrote:
On Mon, 17 Aug 2020 15:50:53 +0300 Ido Schimmel wrote:
From: Ido Schimmel
This patch set extends devlink to allow device drivers to expose device
met
From: Alexei Starovoitov
Add a test that mounts two bpffs instances and checks progs.debug
and maps.debug for sanity data.
Signed-off-by: Alexei Starovoitov
---
.../selftests/bpf/prog_tests/test_bpffs.c | 94 +++
1 file changed, 94 insertions(+)
create mode 100644 tools/te
From: Alexei Starovoitov
v5->v6:
- refactored Makefiles with Andrii's help
- switched to explicit $(MAKE) style
- switched to userldlibs instead of userldflags
- fixed build issue with libbpf Makefile due to invocation from kbuild
- fixed menuconfig order as spotted by Daniel
- introduced C
From: Alexei Starovoitov
Refactor the code a bit to extract bpf_link_by_id() helper.
It's similar to existing bpf_prog_by_id().
Signed-off-by: Alexei Starovoitov
Acked-by: Andrii Nakryiko
Acked-by: Song Liu
---
include/linux/bpf.h | 1 +
kernel/bpf/syscall.c | 46 ++
From: Alexei Starovoitov
Add kernel module with user mode driver that populates bpffs with
BPF iterators.
$ mount bpffs /my/bpffs/ -t bpf
$ ls -la /my/bpffs/
total 4
drwxrwxrwt 2 root root0 Jul 2 00:27 .
drwxr-xr-x 19 root root 4096 Jul 2 00:09 ..
-rw--- 1 root root0 Jul 2 00:27
From: Alexei Starovoitov
The program and map iterators work similar to seq_file-s.
Once the program is pinned in bpffs it can be read with "cat" tool
to print human readable output. In this case about BPF programs and maps.
For example:
$ cat /sys/fs/bpf/progs.debug
id nameattached
On 2020/8/19 03:49, Christoph Hellwig wrote:
> On Wed, Aug 19, 2020 at 12:33:37AM +0800, Coly Li wrote:
>> On 2020/8/19 00:24, Christoph Hellwig wrote:
>>> I think we should go for something simple like this instead:
>>
>> This idea is fine to me. Should a warning message be through here? IMHO
>> t
On 8/18/20 7:53 PM, Xu Wang wrote:
Simplify the return expression.
Signed-off-by: Xu Wang
Acked-by: Yonghong Song
On Tue, 18 Aug 2020 17:28:17 -0700 Jacob Keller wrote:
> +The ``devlink-flash`` command allows optionally specifying a mask indicating
> +the how the device should handle subsections of flash components when
remove one 'the'?
> +updating. This mask indicates the set of sections which are allowed
Hi,
Is port mirroring working? Port mirroring registers on MT7531 have
moved, according to bpi's MT7531 reference manual.
Please fix that as well.
On Tue, 18 Aug 2020 17:28:15 -0700 Jacob Keller wrote:
> struct devlink_ops {
> + /**
> + * @supported_flash_update_params:
> + * mask of parameters supported by the driver's .flash_update
> + * implemementation.
> + */
> + u32 supported_flash_update_params;
To be sure
On Tue, 18 Aug 2020 12:44:17 -0700 David Awogbemila wrote:
> Update the driver version reported to the device and ethtool.
>
> Signed-off-by: David Awogbemila
Please remove the driver version, we're working on getting rid of it in
all networking drivers.
On Tue, 18 Aug 2020 12:44:06 -0700 David Awogbemila wrote:
> + if (link_status) {
> + netif_carrier_on(priv->dev);
> + } else {
> + dev_info(&priv->pdev->dev, "Device link is down.\n");
Down message but no Up message?
> + netif_carrier_off(priv->dev);
On Tue, 18 Aug 2020 20:43:11 -0600 David Ahern wrote:
> On 8/18/20 6:24 PM, Jakub Kicinski wrote:
> > On Mon, 17 Aug 2020 15:50:53 +0300 Ido Schimmel wrote:
> >> From: Ido Schimmel
> >>
> >> This patch set extends devlink to allow device drivers to expose device
> >> metrics to user space in a s
On Tue, 18 Aug 2020 12:44:04 -0700 David Awogbemila wrote:
> From: Kuo Zhao
>
> Changes:
> - Add a new flag in service_task_flags. Check both this flag and
> ethtool flag when handle report stats. Update the stats when user turns
> ethtool flag on.
>
> - In order to expose the NIC stats to the g
Simplify the return expression.
Signed-off-by: Xu Wang
---
tools/lib/bpf/libbpf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5d20b2da4427..cd59e237ca96 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/l
On 2020/8/18 下午7:49, YueHaibing wrote:
Remove duplicate include file
Signed-off-by: YueHaibing
---
drivers/vhost/vdpa.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 3fab94f88894..95e2b8307a2a 100644
--- a/drivers/vhost/vdpa.c
+++ b/dr
Remove linux/sunrpc/auth_gss.h which is included more than once
Reported-by: Hulk Robot
Signed-off-by: Wang Hai
---
net/sunrpc/auth_gss/trace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sunrpc/auth_gss/trace.c b/net/sunrpc/auth_gss/trace.c
index d26036a57443..76685abba60f 100644
--
Remove linux/notifier.h which is included more than once
Reported-by: Hulk Robot
Signed-off-by: Wang Hai
---
drivers/net/ipa/ipa.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h
index 55115cfb2972..407fee841a9a 100644
--- a/drivers/net/ipa/ipa.h
Dear maintainers:
These two patches are to expose the WBS sco packet length to the user
space. Since different vendors may choose different USB alternate
settings which result in different packet lengths, we need the kernel
to expose the lengths to the user space to handle the packets
properly.
T
On 8/18/20 6:24 PM, Jakub Kicinski wrote:
> On Mon, 17 Aug 2020 15:50:53 +0300 Ido Schimmel wrote:
>> From: Ido Schimmel
>>
>> This patch set extends devlink to allow device drivers to expose device
>> metrics to user space in a standard and extensible fashion, as opposed
>> to the driver-specific
在 2020/8/19 3:54, David Miller 写道:
From: Wang Hai
Date: Tue, 18 Aug 2020 21:44:04 +0800
Fix the missing free_netdev() before return from
gemini_ethernet_port_probe() in the error handling case.
Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
Reported-by: Hulk
Replace alloc_etherdev_mq with devm_alloc_etherdev_mqs. In this way,
when probe fails, netdev can be freed automatically.
Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
Reported-by: Hulk Robot
Signed-off-by: Wang Hai
---
v1->v2: Make use of devm_alloc_etherdev_mq
From: Maciej Żenczykowski
This reduces likelihood of incorrect use.
Test: builds
Signed-off-by: Maciej Żenczykowski
---
drivers/net/veth.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index e56cd562a664..b80cbffeb88e 100644
-
> @@ -553,32 +554,21 @@ static int smsc95xx_phy_update_flowcontrol(struct
> usbnet *dev, u8 duplex,
> static int smsc95xx_link_reset(struct usbnet *dev)
> {
> struct smsc95xx_priv *pdata = dev->driver_priv;
> - struct mii_if_info *mii = &dev->mii;
> - struct ethtool_cmd ecmd = { .c
When receiving an IPv4 packet inside an IPv6 GRE packet, and the
IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would
get corrupted. This is due to the common ip6_tnl_rcv() function assuming
that the inner header is always IPv6. This patch checks the tunnel
protocol for IPv4 inn
On Tue, Aug 18, 2020 at 01:11:27PM +0200, Andre Edich wrote:
> Generally, each PHY has their own configuration and it can be done
> through an external PHY driver. The smsc95xx driver uses only the
> hard-coded internal PHY configuration.
>
> This patch adds phylib support to probe external PHY d
David Miller wrote:
>From: Miaohe Lin
>Date: Tue, 18 Aug 2020 07:41:32 -0400
>
>> @@ -417,7 +417,7 @@ static void sock_warn_obsolete_bsdism(const char
>> *name) {
>> static int warned;
>> static char warncomm[TASK_COMM_LEN];
>> -if (strcmp(warncomm, current->comm) && warned < 5) {
Eric Dumazet wrote:
>On Tue, Aug 18, 2020 at 4:58 AM Miaohe Lin wrote:
>>
>> The npages test against MAX_SKB_FRAGS can be relaxed if we succeed to
>> allocate high order pages as the note in comment said.
>>
>
>
>We do not want this change.
>
>This interface is used by datagram providers, we do
On 8/18/20 6:36 PM, Andrii Nakryiko wrote:
Get rid of two feature detectors: reallocarray and libelf-mmap. Optional
feature detections complicate libbpf Makefile and cause more troubles for
various applications that want to integrate libbpf as part of their build.
Patch #1 replaces all reallocar
On 8/18/20 2:33 PM, Andrii Nakryiko wrote:
Add BPF program code sanitization pass, replacing calls to BPF
bpf_probe_read_{kernel,user}[_str]() helpers with bpf_probe_read[_str](), if
libbpf detects that kernel doesn't support new variants.
I know this has been merged. The whole patch set loo
On Tue, Aug 18, 2020 at 6:23 PM Yonghong Song wrote:
>
>
>
> On 8/18/20 2:33 PM, Andrii Nakryiko wrote:
> > That compilation warning is more annoying, than helpful.
>
> Curious which compiler and which version caused this issue?
> I did not hit with gcc 8.2 or latest clang in my environment.
>
St
> -邮件原件-
> 发件人: Björn Töpel [mailto:bjorn.to...@gmail.com]
> 发送时间: 2020年8月18日 22:05
> 收件人: Li,Rongqing
> 抄送: Netdev ; intel-wired-lan
> ; Karlsson, Magnus
> ; Björn Töpel ; bpf
> ; Maciej Fijalkowski ;
> Piotr ; Maciej
> 主题: Re: [Intel-wired-lan] [PATCH 0/2] intel/xdp fixes for fliping
On Tue, Aug 18, 2020 at 06:31:51PM -0700, Andrii Nakryiko wrote:
> On Tue, Aug 18, 2020 at 6:21 PM Alexei Starovoitov
> wrote:
> >
> > On Tue, Aug 18, 2020 at 03:39:12PM -0700, Andrii Nakryiko wrote:
> > > This patch set adds libbpf support to two new classes of CO-RE
> > > relocations:
> > > typ
Get rid of two feature detectors: reallocarray and libelf-mmap. Optional
feature detections complicate libbpf Makefile and cause more troubles for
various applications that want to integrate libbpf as part of their build.
Patch #1 replaces all reallocarray() uses into libbpf-internal reallocarray(
Re-implement glibc's reallocarray() for libbpf internal-only use.
reallocarray(), unfortunately, is not available in all versions of glibc, so
requires extra feature detection and using reallocarray() stub from
and COMPAT_NEED_REALLOCARRAY. All this complicates build
of libbpf unnecessarily and is
Most of libbpf source files already include libbpf_internal.h, so it's a good
place to centralize identifier poisoning. So move kernel integer type
poisoning there. And also add reallocarray to a poison list to prevent
accidental use of it. libbpf_reallocarray() should be used universally
instead.
Most netlink-related functions were unique to bpftool usage, so I moved them
into net.c. Few functions are still used by both bpftool and libbpf itself
internally, so I've copy-pasted them (libbpf_nl_get_link,
libbpf_netlink_open). It's a bit of duplication of code, but better separation
of libbpf
It's trivial to handle missing ELF_C_MMAP_READ support in libelf the way that
objtool has solved it in
("774bec3fddcc objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ").
So instead of having an entire feature detector for that, just do what objtool
does for perf and libbpf. And keep their
On Tue, Aug 18, 2020 at 6:25 PM Alexei Starovoitov
wrote:
>
> On Tue, Aug 18, 2020 at 6:24 PM Andrii Nakryiko wrote:
> >
> > Get rid of two feature detectors: reallocarray and libelf-mmap. Optional
> > feature detections complicate libbpf Makefile and cause more troubles for
> > various applicati
On Tue, Aug 18, 2020 at 6:21 PM Alexei Starovoitov
wrote:
>
> On Tue, Aug 18, 2020 at 03:39:12PM -0700, Andrii Nakryiko wrote:
> > This patch set adds libbpf support to two new classes of CO-RE relocations:
> > type-based (TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_TARGET) and enum
> > value-vase
On Tue, Aug 18, 2020 at 6:24 PM Andrii Nakryiko wrote:
>
> Get rid of two feature detectors: reallocarray and libelf-mmap. Optional
> feature detections complicate libbpf Makefile and cause more troubles for
> various applications that want to integrate libbpf as part of their build.
>
> Patch #1
On 8/18/20 2:33 PM, Andrii Nakryiko wrote:
That compilation warning is more annoying, than helpful.
Curious which compiler and which version caused this issue?
I did not hit with gcc 8.2 or latest clang in my environment.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/Makefile | 2 +-
Re-implement glibc's reallocarray() for libbpf internal-only use.
reallocarray(), unfortunately, is not available in all versions of glibc, so
requires extra feature detection and using reallocarray() stub from
and COMPAT_NEED_REALLOCARRAY. All this complicates build
of libbpf unnecessarily and is
On Tue, Aug 18, 2020 at 03:39:12PM -0700, Andrii Nakryiko wrote:
> This patch set adds libbpf support to two new classes of CO-RE relocations:
> type-based (TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_TARGET) and enum
> value-vased (ENUMVAL_EXISTS/ENUMVAL_VALUE):
>
> LLVM patches adding these relo
Most of libbpf source files already include libbpf_internal.h, so it's a good
place to centralize identifier poisoning. So move kernel integer type
poisoning there. And also add reallocarray to a poison list to prevent
accidental use of it. libbpf_reallocarray() should be used universally
instead.
Most netlink-related functions were unique to bpftool usage, so I moved them
into net.c. Few functions are still used by both bpftool and libbpf itself
internally, so I've copy-pasted them (libbpf_nl_get_link,
libbpf_netlink_open). It's a bit of duplication of code, but better separation
of libbpf
Get rid of two feature detectors: reallocarray and libelf-mmap. Optional
feature detections complicate libbpf Makefile and cause more troubles for
various applications that want to integrate libbpf as part of their build.
Patch #1 replaces all reallocarray() uses into libbpf-internal reallocarray(
It's trivial to handle missing ELF_C_MMAP_READ support in libelf the way that
objtool has solved it in
("774bec3fddcc objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ").
So instead of having an entire feature detector for that, just do what objtool
does for perf and libbpf. And keep their
On Tue, Aug 18, 2020 at 6:08 PM Alexei Starovoitov
wrote:
>
> On Tue, Aug 18, 2020 at 02:59:08PM -0700, Andrii Nakryiko wrote:
> > It's trivial to handle missing ELF_C_MMAP_READ support in libelf the way
> > that
> > objtool has solved it in
> > ("774bec3fddcc objtool: Add fallback from ELF_C_REA
While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we
need to check the program type of the target program to grant the read /
write access to the packet data.
The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB
and others. Since the BPF_PROG_TYPE_EXT program ty
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
lib/nlattr.c
between commit:
58e813cceabd ("treewide: Use fallthrough pseudo-keyword")
from the kspp-gustavo tree and commit:
8aa26c575fb3 ("netlink: make NLA_BINARY validation more flexible")
from the net-next tr
On Tue, Aug 18, 2020 at 02:59:08PM -0700, Andrii Nakryiko wrote:
> It's trivial to handle missing ELF_C_MMAP_READ support in libelf the way that
> objtool has solved it in
> ("774bec3fddcc objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ").
>
> So instead of having an entire feature detect
From: Maciej Żenczykowski
This provides a minor performance boost by virtue of inlining
instead of cross module function calls.
Test: builds
Signed-off-by: Maciej Żenczykowski
---
drivers/net/tun.c | 18 --
include/linux/if_tun.h | 15 ---
2 files changed, 12 i
From: Maciej Żenczykowski
This reduces likelihood of incorrect use.
Test: builds
Signed-off-by: Maciej Żenczykowski
---
drivers/net/tun.c | 6 +++---
include/linux/if_tun.h | 8
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
i
On Tue, Aug 18, 2020 at 05:30:37PM -0700, Yonghong Song wrote:
>
>
> On 8/18/20 5:05 PM, Alexei Starovoitov wrote:
> > On Tue, Aug 18, 2020 at 03:23:09PM -0700, Yonghong Song wrote:
> > >
> > > We did not use cond_resched() since for some iterators, e.g.,
> > > netlink iterator, where rcu read_l
On Tue, Aug 18, 2020 at 1:44 PM Carlos Neira wrote:
>
> Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
> This change folds a test case into test_progs.
>
> Changes from V4:
> - Added accidentally removed blank space in Makefile.
> - Added () around bit-shift operations
The devlink core recently gained support for checking whether the driver
supports a flash_update parameter, via `supported_flash_update_params`.
However, parameters are specified as function arguments. Adding a new
parameter still requires modifying the signature of the .flash_update
callback in al
On 8/18/20 5:05 PM, Alexei Starovoitov wrote:
On Tue, Aug 18, 2020 at 03:23:09PM -0700, Yonghong Song wrote:
We did not use cond_resched() since for some iterators, e.g.,
netlink iterator, where rcu read_lock critical section spans between
consecutive seq_ops->next(), which makes impossible
Signed-off-by: Jacob Keller
---
include/uapi/linux/devlink.h | 24
1 file changed, 24 insertions(+)
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index b7f23faae901..bc63bd0b60c1 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linu
This series introduces support for the new attribute to devlink flash
update, DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK.
This attribute is a bitfield which allows userspace to specify what set of
subfields to overwrite when performing a flash update for a device.
The intention is to support the ab
Add support for specifying the overwrite sections to allow in the flash
update command. This is done by adding a new "overwrite" option which
can take either "settings" or "identifiers" passing the overwrite mode
multiple times will combine the fields using bitwise-OR.
Signed-off-by: Jacob Keller
This series introduces support for a new attribute to the flash update
command: DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK.
This attribute is a bitfield which allows userspace to specify what set of
subfields to overwrite when performing a flash update for a device.
The intention is to support the
Hi,
Does the drivers/net/ethernet/sfc/sfc driver require (expect)
dma_addr_t to be 64 bits (as opposed to 32 bits)?
I see that several #defines in ef100_regs.h are 64...
When used with DMA_BIT_MASK(64), does the value just need to be
truncated to 32 bits? Will that work?
When I build this dri
Support the recently added DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK
parameter in the ice flash update handler. Convert the overwrite mask
bitfield into the appropriate preservation level used by the firmware
when updating.
Because there is no equivalent preservation level for overwriting only
iden
1 - 100 of 396 matches
Mail list logo