Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-30 Thread Jason Wang
On 2020/12/31 下午2:52, Yongji Xie wrote: On Thu, Dec 31, 2020 at 1:50 PM Jason Wang wrote: On 2020/12/31 下午1:15, Yongji Xie wrote: On Thu, Dec 31, 2020 at 10:49 AM Jason Wang wrote: On 2020/12/30 下午6:12, Yongji Xie wrote: On Wed, Dec 30, 2020 at 4:41 PM Jason Wang wrote: On 2020/12/30 下

Re: Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-30 Thread Yongji Xie
On Thu, Dec 31, 2020 at 1:50 PM Jason Wang wrote: > > > On 2020/12/31 下午1:15, Yongji Xie wrote: > > On Thu, Dec 31, 2020 at 10:49 AM Jason Wang wrote: > >> > >> On 2020/12/30 下午6:12, Yongji Xie wrote: > >>> On Wed, Dec 30, 2020 at 4:41 PM Jason Wang wrote: > On 2020/12/30 下午3:09, Yongji Xie

Re: [PATCH bpf-next 1/2] bpf: try to avoid kzalloc in cgroup/{s,g}etsockopt

2020-12-30 Thread Martin KaFai Lau
On Tue, Dec 22, 2020 at 07:09:33PM -0800, s...@google.com wrote: > On 12/22, Martin KaFai Lau wrote: > > On Thu, Dec 17, 2020 at 09:23:23AM -0800, Stanislav Fomichev wrote: > > > When we attach a bpf program to cgroup/getsockopt any other getsockopt() > > > syscall starts incurring kzalloc/kfree co

Re: [PATCH bpf-next 1/2] bpf: try to avoid kzalloc in cgroup/{s,g}etsockopt

2020-12-30 Thread Martin KaFai Lau
On Mon, Dec 21, 2020 at 02:22:41PM -0800, Song Liu wrote: > On Thu, Dec 17, 2020 at 9:24 AM Stanislav Fomichev wrote: > > > > When we attach a bpf program to cgroup/getsockopt any other getsockopt() > > syscall starts incurring kzalloc/kfree cost. While, in general, it's > > not an issue, sometime

Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-30 Thread Jason Wang
On 2020/12/31 下午1:15, Yongji Xie wrote: On Thu, Dec 31, 2020 at 10:49 AM Jason Wang wrote: On 2020/12/30 下午6:12, Yongji Xie wrote: On Wed, Dec 30, 2020 at 4:41 PM Jason Wang wrote: On 2020/12/30 下午3:09, Yongji Xie wrote: On Wed, Dec 30, 2020 at 2:11 PM Jason Wang wrote: On 2020/12/29 下

[PATCH iproute2-next] rdma: Add support for the netlink extack

2020-12-30 Thread Leon Romanovsky
From: Patrisious Haddad Add support in rdma for extack errors to be received in userspace when sent from kernel, so now netlink extack error messages sent from kernel would be printed for the user. Signed-off-by: Patrisious Haddad Signed-off-by: Leon Romanovsky --- Kernel part: https://lore.ke

Re: [PATCH net-next] nfc: Add a virtual nci device driver

2020-12-30 Thread Bongsu Jeon
On Tue, Dec 29, 2020 at 6:16 AM Jakub Kicinski wrote: > > On Mon, 28 Dec 2020 18:45:07 +0900 Bongsu Jeon wrote: > > From: Bongsu Jeon > > > > A NCI virtual device can be made to simulate a NCI device in user space. > > Using the virtual NCI device, The NCI module and application can be > > valida

Re: Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-30 Thread Yongji Xie
On Thu, Dec 31, 2020 at 10:49 AM Jason Wang wrote: > > > On 2020/12/30 下午6:12, Yongji Xie wrote: > > On Wed, Dec 30, 2020 at 4:41 PM Jason Wang wrote: > >> > >> On 2020/12/30 下午3:09, Yongji Xie wrote: > >>> On Wed, Dec 30, 2020 at 2:11 PM Jason Wang wrote: > On 2020/12/29 下午6:26, Yongji Xie

[PATCH net] docs: net: fix documentation on .ndo_get_stats

2020-12-30 Thread Jakub Kicinski
Fix calling context. Signed-off-by: Jakub Kicinski --- Documentation/networking/netdevices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/netdevices.rst b/Documentation/networking/netdevices.rst index 5a85fcc80c76..a80676f5477d 100644 --- a/

[PATCH net] net: bareudp: add missing error handling for bareudp_link_config()

2020-12-30 Thread Jakub Kicinski
.dellink does not get called after .newlink fails, bareudp_newlink() must undo what bareudp_configure() has done if bareudp_link_config() fails. Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Signed-off-by: Jakub Kicinski -

[PATCH net] net: suggest L2 discards be counted towards rx_dropped

2020-12-30 Thread Jakub Kicinski
>From the existing definitions it's unclear which stat to use to report filtering based on L2 dst addr in old broadcast-medium Ethernet. Signed-off-by: Jakub Kicinski --- include/uapi/linux/if_link.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/if_l

[PATCH net] net: vlan: avoid leaks on register_vlan_dev() failures

2020-12-30 Thread Jakub Kicinski
VLAN checks for NETREG_UNINITIALIZED to distinguish between registration failure and unregistration in progress. Since commit cb626bf566eb ("net-sysfs: Fix reference count leak") registration failure may, however, result in NETREG_UNREGISTERED as well as NETREG_UNINITIALIZED. This fix is similer

[PATCH net-next v2] net: nfc: nci: Change the NCI close sequence

2020-12-30 Thread Bongsu Jeon
From: Bongsu Jeon If there is a NCI command in work queue after closing the NCI device at nci_unregister_device, The NCI command timer starts at flush_workqueue function and then NCI command timeout handler would be called 5 second after flushing the NCI command work queue and destroying the qu

Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-30 Thread Jason Wang
On 2020/12/30 下午6:12, Yongji Xie wrote: On Wed, Dec 30, 2020 at 4:41 PM Jason Wang wrote: On 2020/12/30 下午3:09, Yongji Xie wrote: On Wed, Dec 30, 2020 at 2:11 PM Jason Wang wrote: On 2020/12/29 下午6:26, Yongji Xie wrote: On Tue, Dec 29, 2020 at 5:11 PM Jason Wang wrote: - Original M

Re: [PATCH 12/21] vhost-vdpa: introduce uAPI to get the number of virtqueue groups

2020-12-30 Thread Jason Wang
On 2020/12/30 下午6:05, Eli Cohen wrote: On Wed, Dec 16, 2020 at 02:48:09PM +0800, Jason Wang wrote: Follows the vDPA support for multiple address spaces, this patch introduce uAPI for the userspace to know the number of virtqueue groups supported by the vDPA device. Signed-off-by: Jason Wang -

Re: [PATCH 2/2] net: ks8851: Register MDIO bus and the internal PHY

2020-12-30 Thread kernel test robot
suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Marek-Vasut/net-phy-micrel-Add-KS8851-PHY-support/20201230-210003 base: https://git.kernel.org/pub/scm/linux/kernel/git/dav

Re: [PATCH v5 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-30 Thread Daniel Borkmann
On 12/29/20 7:09 PM, Lorenzo Bianconi wrote: + hard_start = page_address(rx_buffer->page) + + rx_buffer->page_offset - offset; + xdp_prepare_buff(&xdp, hard_start, offset, size, true); #if (PAGE_SIZE > 4096)

[PATCH] neighbour: Disregard DEAD dst in neigh_update

2020-12-30 Thread Tong Zhu
In 4.x kernel a dst in DST_OBSOLETE_DEAD state is associated with loopback net_device and leads to loopback neighbour. It leads to an ethernet header with all zero addresses. A very troubling case is working with mac80211 and ath9k. A packet with all zero source MAC address to mac80211 will eventu

Re: [PATCH] ibmvnic: fix: NULL pointer dereference.

2020-12-30 Thread Lijun Pan
On Wed, Dec 30, 2020 at 1:25 AM YANG LI wrote: > > The error is due to dereference a null pointer in function > reset_one_sub_crq_queue(): > > if (!scrq) { > netdev_dbg(adapter->netdev, >"Invalid scrq reset. irq (%d) or msgs(%p).\n", > scrq->irq, scrq->msgs); >

Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-30 Thread Jakub Kicinski
On Mon, 28 Dec 2020 16:14:17 -0500 Konstantin Ryabitsev wrote: > On Mon, Dec 28, 2020 at 01:05:26PM -0800, Florian Fainelli wrote: > > On 12/28/2020 12:23 PM, Konstantin Ryabitsev wrote: > > > On Thu, Dec 24, 2020 at 01:57:40PM -0800, Florian Fainelli wrote: > > Konstantin, would you be wi

Re: [PATCH 1/3] vsock/virtio: support for SOCK_SEQPACKET socket.

2020-12-30 Thread Michael S. Tsirkin
On Tue, Dec 29, 2020 at 02:04:51PM +0300, Arseny Krasnov wrote: > To preserve message boundaries, new packet operation was added: > to mark start of record(with record length in header). To send record, > packet with start marker is sent first, then all data is transmitted as > 'RW' packets

Re: [PATCH 2/3] vhost/vsock: support for SOCK_SEQPACKET socket.

2020-12-30 Thread Michael S. Tsirkin
On Wed, Dec 30, 2020 at 03:56:03PM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 29, 2020 at 02:06:33PM +0300, Arseny Krasnov wrote: > > This patch simply adds transport ops and removes > > ignore of non-stream type of packets. > > > > Signed-off-by: Arseny Krasnov > > How is this supposed

Re: [PATCH 2/3] vhost/vsock: support for SOCK_SEQPACKET socket.

2020-12-30 Thread Michael S. Tsirkin
On Tue, Dec 29, 2020 at 02:06:33PM +0300, Arseny Krasnov wrote: > This patch simply adds transport ops and removes > ignore of non-stream type of packets. > > Signed-off-by: Arseny Krasnov How is this supposed to work? virtio vsock at the moment has byte level end to end credit accounting

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Andrew Lunn
> Which shows why it's pointless producing an EEPROM validation tool that > runs under Linux (as has been your suggestion). They won't use it, > since their testing only goes as far as "does it work in our product?" Yes, i would need SNIA to push for conformance testing, hold plug-testing events,

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 08:30:52PM +0100, Andrew Lunn wrote: > > Ok! > > > > So should we completely skip hwmon_device_register_with_info() call > > if (i2c_block_size < 2) ? > > Yep. That would be a nice simple test. > > But does ethtool -m still export the second page? That is also > unreliabl

KASAN: use-after-free Read in vlan_dev_real_dev

2020-12-30 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:1f45dc22 ibmvnic: continue fatal error reset after passive.. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=10dbe3ff50 kernel config: https://syzkaller.appspot.com/x/.config?x=9c6feb14e07e1220 dashboar

general protection fault in dst_dev_put (6)

2020-12-30 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:40f78232 Merge tag 'pci-v5.11-fixes-1' of git://git.kernel.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1731027750 kernel config: https://syzkaller.appspot.com/x/.config?x=9798d6898fec8a72 das

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Andrew Lunn
> Ok! > > So should we completely skip hwmon_device_register_with_info() call > if (i2c_block_size < 2) ? Yep. That would be a nice simple test. But does ethtool -m still export the second page? That is also unreliable. Andrew

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 06:31:52PM +0100, Pali Rohár wrote: > On Wednesday 30 December 2020 17:05:46 Russell King - ARM Linux admin wrote: > > On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Rohár wrote: > > > This change is really required for those Realtek chips. I thought that > > > it is obvious

[RFC PATCH v3 00/12] Generic zcopy_* functions

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon This is set of cleanup patches for zerocopy which are intended to allow a introduction of a different zerocopy implementation. The top level API will use the skb_zcopy_*() functions, while the current TCP specific zerocopy ends up using msg_zerocopy_*() calls. There should

[RFC PATCH v3 12/12] tap/tun: add skb_zcopy_init() helper for initialization.

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Replace direct assignments with skb_zcopy_init() for zerocopy cases where a new skb is initialized, without changing the reference counts. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c | 3 +-- drivers/net/tun.c | 3 +-- drivers/vhost/net.c| 1 + includ

[RFC PATCH v3 11/12] skbuff: add flags to ubuf_info for ubuf setup

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Currently, when an ubuf is attached to a new skb, the shared flags word is initialized to a fixed value. Instead of doing this, set the default flags in the ubuf, and have new skbs inherit from this default. This is needed when setting up different zerocopy types. Signed-o

[RFC PATCH v3 08/12] skbuff: Call skb_zcopy_clear() before unref'ing fragments

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon RX zerocopy fragment pages which are not allocated from the system page pool require special handling. Give the callback in skb_zcopy_clear() a chance to process them first. Signed-off-by: Jonathan Lemon --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

[RFC PATCH v3 02/12] skbuff: simplify sock_zerocopy_put

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon All 'struct ubuf_info' users should have a callback defined as of commit 0a4a060bb204 ("sock: fix zerocopy_success regression with msg_zerocopy"). Remove the dead code path to consume_skb(), which makes assumptions about how the structure was allocated. Signed-off-by: Jonat

[PATCH iproute2] build: Fix link errors on some systems

2020-12-30 Thread Roi Dayan
Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. ../lib/libutil.a(utils.o): In function `get_rate': utils.c:(.text+0x10dc): undefined reference to `floor' ../lib/libutil

[RFC PATCH v3 04/12] skbuff: replace sock_zerocopy_put() with skb_zcopy_put()

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Replace sock_zerocopy_put with the generic skb_zcopy_put() function. Pass 'true' as the success argument, as this is identical to no change. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 7 ++- net/core/skbuff.c | 9 + net/ipv4/tcp.c

[RFC PATCH v3 09/12] skbuff: rename sock_zerocopy_* to msg_zerocopy_*

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon At Willem's suggestion, rename the sock_zerocopy_* functions so that they match the MSG_ZEROCOPY flag, which makes it clear they are specific to this zerocopy implementation. Signed-off-by: Jonathan Lemon Acked-by: Willem de Bruijn --- include/linux/skbuff.h | 16

[RFC PATCH v3 07/12] skbuff: Call sock_zerocopy_put_abort from skb_zcopy_put_abort

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon The sock_zerocopy_put_abort function contains logic which is specific to the current zerocopy implementation. Add a wrapper which checks the callback and dispatches apppropriately. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 10 ++ net/core/skbuff.c

Re: [PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 06:27:07PM +0100, Marek Behún wrote: > On Wed, 30 Dec 2020 18:06:52 +0100 > Pali Rohár wrote: > > > if (!sfp->type->module_supported(&id) && > > (memcmp(id.base.vendor_name, "UBNT", 16) || > > memcmp(id.base.vendor_pn, "UF-INSTANT ", 1

[RFC PATCH v3 03/12] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Before this change, the caller of sock_zerocopy_callback would need to save the zerocopy status, decrement and check the refcount, and then call the callback function - the callback was only invoked when the refcount reached zero. Now, the caller just passes the status into

[RFC PATCH v3 01/12] skbuff: remove unused skb_zcopy_abort function

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon skb_zcopy_abort() has no in-tree consumers, remove it. Signed-off-by: Jonathan Lemon Acked-by: Willem de Bruijn --- include/linux/skbuff.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 333bcdc39635..3

[RFC PATCH v3 05/12] skbuff: replace sock_zerocopy_get with skb_zcopy_get

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Rename the get routines for consistency. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 12 ++-- net/core/skbuff.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a6c8683

[RFC PATCH v3 06/12] skbuff: Add skb parameter to the ubuf zerocopy callback

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon Add an optional skb parameter to the zerocopy callback parameter, which is passed down from skb_zcopy_clear(). This gives access to the original skb, which is needed for upcoming RX zero-copy error handling. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c

[RFC PATCH v3 10/12] net: group skb_shinfo zerocopy related bits together.

2020-12-30 Thread Jonathan Lemon
From: Jonathan Lemon In preparation for expanded zerocopy (TX and RX), move the zerocopy related bits out of tx_flags into their own flag word. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c | 3 +-- drivers/net/tun.c | 3 +-- drivers/net/xen-netback/

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 06:43:07PM +0100, Pali Rohár wrote: > On Wednesday 30 December 2020 18:13:15 Andrew Lunn wrote: > > Hi Pali > > > > I have to agree with Russell here. I would rather have no diagnostics > > than untrustable diagnostics. > > Ok! > > So should we completely skip hwmon_devic

Re: [PATCH v2] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Florian Westphal
Visa Hankala wrote: > Use three-way comparison for address components to avoid integer > wraparound in the result of xfrm_policy_addr_delta(). This ensures > that the search trees are built and traversed correctly. > > Treat IPv4 and IPv6 similarly by returning 0 when prefixlen == 0. > Prefix /0

[PATCH net] r8169: work around power-saving bug on some chip versions

2020-12-30 Thread Heiner Kallweit
A user reported failing network with RTL8168dp (a quite rare chip version). Realtek confirmed that few chip versions suffer from a PLL power-down hw bug. Fixes: 07df5bd874f0 ("r8169: power down chip in probe") Signed-off-by: Heiner Kallweit --- Note that since the original change source file r816

Re: [PATCH v2] btf: support ints larger than 128 bits

2020-12-30 Thread Yonghong Song
On 12/19/20 8:36 AM, Sean Young wrote: clang supports arbitrary length ints using the _ExtInt extension. This can be useful to hold very large values, e.g. 256 bit or 512 bit types. Larger types (e.g. 1024 bits) are possible but I am unaware of a use case for these. This requires the _ExtInt

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 18:13:15 Andrew Lunn wrote: > On Wed, Dec 30, 2020 at 05:05:46PM +, Russell King - ARM Linux admin > wrote: > > On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Rohár wrote: > > > This change is really required for those Realtek chips. I thought that > > > it is obv

Re: [PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 18:17:41 Andrew Lunn wrote: > On Wed, Dec 30, 2020 at 05:06:23PM +, Russell King - ARM Linux admin > wrote: > > On Wed, Dec 30, 2020 at 05:57:58PM +0100, Pali Rohár wrote: > > > On Wednesday 30 December 2020 16:13:10 Russell King - ARM Linux admin > > > wrote: >

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 17:05:46 Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Rohár wrote: > > This change is really required for those Realtek chips. I thought that > > it is obvious that from *both* addresses 0x50 and 0x51 can be read only > > one b

Re: [PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Marek Behún
On Wed, 30 Dec 2020 18:06:52 +0100 Pali Rohár wrote: > if (!sfp->type->module_supported(&id) && > (memcmp(id.base.vendor_name, "UBNT", 16) || >memcmp(id.base.vendor_pn, "UF-INSTANT ", 16))) I would rather add a quirk member (bitfield) to the sfp struc

Re: [PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 05:06:23PM +, Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 05:57:58PM +0100, Pali Rohár wrote: > > On Wednesday 30 December 2020 16:13:10 Russell King - ARM Linux admin wrote: > > > On Wed, Dec 30, 2020 at 04:47:54PM +0100, Pali Rohár wrote: > > > > So

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 05:05:46PM +, Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Rohár wrote: > > This change is really required for those Realtek chips. I thought that > > it is obvious that from *both* addresses 0x50 and 0x51 can be read only > > on

Re: [PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 16:11:51 Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 04:47:53PM +0100, Pali Rohár wrote: > > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set SFF phys_id > > in their EEPROM. Kernel SFP subsystem currently does not allow to use > > mod

Re: [PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 05:57:58PM +0100, Pali Rohár wrote: > On Wednesday 30 December 2020 16:13:10 Russell King - ARM Linux admin wrote: > > On Wed, Dec 30, 2020 at 04:47:54PM +0100, Pali Rohár wrote: > > > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set both > > > SFP_OPTIONS_LOS_

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Rohár wrote: > This change is really required for those Realtek chips. I thought that > it is obvious that from *both* addresses 0x50 and 0x51 can be read only > one byte at the same time. Reading 2 bytes (for be16 value) cannot be > really done by one

Re: [PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 16:13:10 Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 04:47:54PM +0100, Pali Rohár wrote: > > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set both > > SFP_OPTIONS_LOS_INVERTED and SFP_OPTIONS_LOS_NORMAL bits in their EEPROM. > > > > S

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Pali Rohár
On Wednesday 30 December 2020 16:10:37 Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 04:47:52PM +0100, Pali Rohár wrote: > > Workaround for GPON SFP modules based on VSOL V2801F brand was added in > > commit 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 > > v2.0

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Heiner Kallweit
On 30.12.2020 17:15, Florian Fainelli wrote: > > > On 12/30/2020 1:12 AM, Heiner Kallweit wrote: >> On 30.12.2020 10:07, DENG Qingfang wrote: >>> Hi Heiner, >>> Thanks for your reply. >>> >>> On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit >>> wrote: I don't think that's the best option. >

Re: [PATCH v2] net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 10:33:09AM +, Charles Keepax wrote: > A new flag MACB_CAPS_CLK_HW_CHG was added and all callers of > macb_set_tx_clk were gated on the presence of this flag. > > - if (!clk) > + if (!bp->tx_clk || !(bp->caps & MACB_CAPS_CLK_HW_CHG)) > > However the flag was not added

Re: [PATCH] Allow user to set metric on default route learned via Router Advertisement.

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 12:48:32AM -0800, Praveen Chaudhary wrote: > Allow user to set metric on default route learned via Router Advertisement. > Not: RFC 4191 does not say anything for metric for IPv6 default route. Hi Praveen Please take a look at https://www.kernel.org/doc/html/latest/proces

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Florian Fainelli
On 12/30/2020 7:16 AM, Andrew Lunn wrote: >> 2. Allocated ds->slave_mii_bus before calling ds->ops->setup, because >> we cannot call dsa_slave_mii_bus_init which is private. >> >> Any better ideas? > > Do what mv88e6xxx does, allocate the MDIO bus inside the switch > driver. Yes, exactly, or y

[PATCH v2] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Visa Hankala
Use three-way comparison for address components to avoid integer wraparound in the result of xfrm_policy_addr_delta(). This ensures that the search trees are built and traversed correctly. Treat IPv4 and IPv6 similarly by returning 0 when prefixlen == 0. Prefix /0 has only one equivalence class.

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Florian Fainelli
On 12/30/2020 1:12 AM, Heiner Kallweit wrote: > On 30.12.2020 10:07, DENG Qingfang wrote: >> Hi Heiner, >> Thanks for your reply. >> >> On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit wrote: >>> I don't think that's the best option. >> >> I'm well aware of that. >> >>> You may want to add a PHY

Re: [PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 04:47:54PM +0100, Pali Rohár wrote: > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set both > SFP_OPTIONS_LOS_INVERTED and SFP_OPTIONS_LOS_NORMAL bits in their EEPROM. > > Such combination of bits is meaningless so assume that LOS signal is not > implemented.

Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 04:47:52PM +0100, Pali Rohár wrote: > Workaround for GPON SFP modules based on VSOL V2801F brand was added in > commit 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 > v2.0 workaround"). But it works only for ids explicitly added to the list. > As there are

Re: [PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Russell King - ARM Linux admin
On Wed, Dec 30, 2020 at 04:47:53PM +0100, Pali Rohár wrote: > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set SFF phys_id > in their EEPROM. Kernel SFP subsystem currently does not allow to use > modules detected as SFF. > > This change extends check for SFP modules so also those wi

Re: [PATCH 2/2] net: ks8851: Register MDIO bus and the internal PHY

2020-12-30 Thread Andrew Lunn
> +static int ks8851_mdio_read(struct mii_bus *bus, int phy_id, int reg) > +{ > + struct ks8851_net *ks = bus->priv; > + > + if (phy_id != 0) > + return 0x; > + Please check for C45 and return -EOPNOTSUPP. Andrew

[PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2020-12-30 Thread Pali Rohár
Workaround for GPON SFP modules based on VSOL V2801F brand was added in commit 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround"). But it works only for ids explicitly added to the list. As there are more rebraded VSOL V2801F modules and OEM vendors are putting into

[PATCH 4/4] net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant

2020-12-30 Thread Pali Rohár
SFP GPON module Ubiquiti U-Fiber Instant has in its EEPROM stored nonsense information. It claims that support all transceiver types including 10G Ethernet which is not truth. So clear all claimed modes and set only one mode which module supports: 1000baseX_Full. This change finally allows to dete

[PATCH 3/4] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set

2020-12-30 Thread Pali Rohár
Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set both SFP_OPTIONS_LOS_INVERTED and SFP_OPTIONS_LOS_NORMAL bits in their EEPROM. Such combination of bits is meaningless so assume that LOS signal is not implemented. This patch fixes link carrier for GPON SFP module Ubiquiti U-Fiber In

[PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Pali Rohár
Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set SFF phys_id in their EEPROM. Kernel SFP subsystem currently does not allow to use modules detected as SFF. This change extends check for SFP modules so also those with SFF phys_id are allowed. With this change also GPON SFP module Ubiq

[PATCH 0/4] net: sfp: add support for GPON RTL8672/RTL9601C and Ubiquiti U-Fiber

2020-12-30 Thread Pali Rohár
This patch series add generic workaround for reading EEPROM content from broken GPON SFP modules based on Realtek RTL8672/RTL9601C chips and add another workarounds for GPON SFP module Ubiquiti U-Fiber Instant. GPON SFP modules based on Realtek RTL8672/RTL9601C chips do not have a real EEPROM but

Re: [PATCH 1/2] net: phy: micrel: Add KS8851 PHY support

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 01:53:57PM +0100, Marek Vasut wrote: > The KS8851 has a reduced internal PHY, which is accessible through its > registers at offset 0xe4. The PHY is compatible with KS886x PHY present > in Micrel switches, except the PHY ID Low/High registers are swapped. Can you intercept

Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 03:55:02PM +0200, Vladyslav Tarasiuk wrote: > > On 29-Dec-20 18:25, Andrew Lunn wrote: > > > Hi Andrew, > > > > > > Following this conversation, I wrote some pseudocode checking if I'm on > > > right path here. > > > Please review: > > > > > > struct eeprom_page { > > >

[PATCH net,stable] net: usb: qmi_wwan: add Quectel EM160R-GL

2020-12-30 Thread Bjørn Mork
New modem using ff/ff/30 for QCDM, ff/00/00 for AT and NMEA, and ff/ff/ff for RMNET/QMI. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=2c7c ProdID=0620 Rev= 4.09 S: Manufacturer=Quectel S: Product=EM160R-GL S:

Re: BTFIDS: FAILED unresolved symbol udp6_sock

2020-12-30 Thread Qais Yousef
On 12/30/20 14:28, Jiri Olsa wrote: > On Wed, Dec 30, 2020 at 02:28:02PM +0100, Jiri Olsa wrote: > > On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > > > On Tue, Dec 29, 2020 at 11:28:35PM +, Qais Yousef wrote: > > > > Hi Jiri > > > > > > > > On 12/29/20 18:34, Jiri Olsa wrote: > >

Re: [PATCH rfc 3/3] virtio-net: support transmit timestamp

2020-12-30 Thread Willem de Bruijn
On Wed, Dec 30, 2020 at 7:38 AM Richard Cochran wrote: > > On Mon, Dec 28, 2020 at 11:22:33AM -0500, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Add optional delivery time (SO_TXTIME) offload for virtio-net. > > > > The Linux TCP/IP stack tries to avoid bursty transmission and netw

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Andrew Lunn
On Wed, Dec 30, 2020 at 09:42:09AM +, Marc Zyngier wrote: > > +static irqreturn_t > > +mt7530_irq(int irq, void *data) > > +{ > > + struct mt7530_priv *priv = data; > > + bool handled = false; > > + int phy; > > + u32 val; > > + > > + val = mt7530_read(priv, MT7530_SYS_INT_STS); > > +

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Andrew Lunn
> 2. Allocated ds->slave_mii_bus before calling ds->ops->setup, because > we cannot call dsa_slave_mii_bus_init which is private. > > Any better ideas? Do what mv88e6xxx does, allocate the MDIO bus inside the switch driver. Andrew

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Andrew Lunn
> > +static void mt7530_irq_bus_lock(struct irq_data *d) > > +{ > > + struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); > > + > > + mutex_lock(&priv->reg_mutex); > > Are you always guaranteed to be in a thread context? I guess that > is the case, given that you request a threaded inter

Re: BTFIDS: FAILED unresolved symbol udp6_sock

2020-12-30 Thread Jiri Olsa
On Wed, Dec 30, 2020 at 11:19:36AM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 30, 2020 at 02:28:52PM +0100, Jiri Olsa escreveu: > > On Wed, Dec 30, 2020 at 02:28:02PM +0100, Jiri Olsa wrote: > > > On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > > > > On Tue, Dec 29, 2020 at 1

[PATCH] mt76: fix enum conversion warning

2020-12-30 Thread Arnd Bergmann
From: Arnd Bergmann A recent patch changed some enum values, but not the type declaration for the assignment: drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: error: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Werror,-W

[PATCH v1] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2020-12-30 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Signed-off-by: Yingjie Wang --- dri

Re: BTFIDS: FAILED unresolved symbol udp6_sock

2020-12-30 Thread Arnaldo Carvalho de Melo
Em Wed, Dec 30, 2020 at 02:28:52PM +0100, Jiri Olsa escreveu: > On Wed, Dec 30, 2020 at 02:28:02PM +0100, Jiri Olsa wrote: > > On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > > > On Tue, Dec 29, 2020 at 11:28:35PM +, Qais Yousef wrote: > > > > Hi Jiri > > > > > > > > On 12/29/20 1

Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-12-30 Thread Vladyslav Tarasiuk
On 29-Dec-20 18:25, Andrew Lunn wrote: Hi Andrew, Following this conversation, I wrote some pseudocode checking if I'm on right path here. Please review: struct eeprom_page {     u8 page_number;     u8 bank_number;     u16 offset;     u16 data_length;     u8 *data; }

Re: [PATCH] ibmvnic: fix: NULL pointer dereference.

2020-12-30 Thread Michal Suchánek
On Wed, Dec 30, 2020 at 03:23:14PM +0800, YANG LI wrote: > The error is due to dereference a null pointer in function > reset_one_sub_crq_queue(): > > if (!scrq) { > netdev_dbg(adapter->netdev, >"Invalid scrq reset. irq (%d) or msgs(%p).\n", > scrq->irq, scrq->msg

Re: [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference

2020-12-30 Thread Baruch Siach
Hi Ulises, On Tue, Dec 29 2020, Ulises Alonso wrote: > Can you also replace the sentence > > "(like libpcap always does)." > > with > > "(which old libpcap versions used do)." Are you sure this change is correct? The text says: ... it requires two if you want to get packet's timestamp

Re: BTFIDS: FAILED unresolved symbol udp6_sock

2020-12-30 Thread Jiri Olsa
On Wed, Dec 30, 2020 at 02:28:02PM +0100, Jiri Olsa wrote: > On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > > On Tue, Dec 29, 2020 at 11:28:35PM +, Qais Yousef wrote: > > > Hi Jiri > > > > > > On 12/29/20 18:34, Jiri Olsa wrote: > > > > On Tue, Dec 29, 2020 at 03:13:52PM +, Q

Re: BTFIDS: FAILED unresolved symbol udp6_sock

2020-12-30 Thread Jiri Olsa
On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > On Tue, Dec 29, 2020 at 11:28:35PM +, Qais Yousef wrote: > > Hi Jiri > > > > On 12/29/20 18:34, Jiri Olsa wrote: > > > On Tue, Dec 29, 2020 at 03:13:52PM +, Qais Yousef wrote: > > > > Hi > > > > > > > > When I enable CONFIG_DEBU

Announcing Netdev 0x15

2020-12-30 Thread Jamal Hadi Salim
While we bid goodbye to 2020, here's some good hopeful news for 2021. cheers, jamal Forwarded Message Subject: [NetDev-People] Announcing Netdev 0x15 Date: Sun, 27 Dec 2020 15:54:31 -0700 From: Tom Herbert via people Reply-To: Tom Herbert To: peo...@netdevconf.info Hello

Re: [PATCH] selftests: xfrm: fix test return value override issue in xfrm_policy.sh

2020-12-30 Thread Florian Westphal
Po-Hsu Lin wrote: > When running this xfrm_policy.sh test script, even with some cases > marked as FAIL, the overall test result will still be PASS: > > $ sudo ./xfrm_policy.sh > PASS: policy before exception matches > FAIL: expected ping to .254 to fail (exceptions) > PASS: direct policy matches

[PATCH 1/2] net: phy: micrel: Add KS8851 PHY support

2020-12-30 Thread Marek Vasut
The KS8851 has a reduced internal PHY, which is accessible through its registers at offset 0xe4. The PHY is compatible with KS886x PHY present in Micrel switches, except the PHY ID Low/High registers are swapped. Add PHY ID for this KS8851 PHY and use custom PHY ID mask due to the swap. Signed-off

[PATCH 2/2] net: ks8851: Register MDIO bus and the internal PHY

2020-12-30 Thread Marek Vasut
The KS8851 has a reduced internal PHY, which is accessible through its registers at offset 0xe4. The PHY is compatible with KS886x PHY present in Micrel switches, except the PHY ID Low/High registers are swapped. Register MDIO bus so this PHY can be detected and probed by phylib. Signed-off-by: Ma

Re: [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Florian Westphal
Visa Hankala wrote: > On Tue, Dec 29, 2020 at 05:01:27PM +0100, Florian Westphal wrote: > > This is suspicious. Is prefixlen == 0 impossible? > > > > If not, then after patch > > mask = ~0U << 32; > > > > ... and function returns 0. > > With prefixlen == 0, there is only one equivalence class,

Re: [PATCH rfc 3/3] virtio-net: support transmit timestamp

2020-12-30 Thread Richard Cochran
On Mon, Dec 28, 2020 at 11:22:33AM -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > Add optional delivery time (SO_TXTIME) offload for virtio-net. > > The Linux TCP/IP stack tries to avoid bursty transmission and network > congestion through pacing: computing an skb delivery time base

Re: [PATCH rfc 2/3] virtio-net: support receive timestamp

2020-12-30 Thread Richard Cochran
On Mon, Dec 28, 2020 at 07:57:20PM -0500, Willem de Bruijn wrote: > There is a well understood method for synchronizing guest and host > clock in KVM using ptp_kvm. For virtual environments without NIC > hardware offload, the when host timestamps in software, this suffices. > > Syncing host with N

[PATCH net] net: ipv6: Validate GSO SKB before finish IPv6 processing

2020-12-30 Thread Aya Levin
There are cases where GSO segment's length exceeds the egress MTU. If so: - Consume the SKB and its segments. - Issue an ICMP packet with 'Packet Too Big' message containing the MTU, allowing the source host to reduce its Path MTU appropriately. Note: These cases are handled in the same manne

Re: [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()

2020-12-30 Thread Visa Hankala
On Tue, Dec 29, 2020 at 05:01:27PM +0100, Florian Westphal wrote: > Visa Hankala wrote: > > Use three-way comparison for address elements to avoid integer > > wraparound in the result of xfrm_policy_addr_delta(). > > > > This ensures that the search trees are built and traversed correctly > > whe

  1   2   >