* Re: [PATCH net-next v3 0/3] net: ptp: introduce common defines for PTP message types
From: Vladimir Oltean @ 2020-11-20 22:39 UTC (permalink / raw)
To: Christian Eggers
Cc: Richard Cochran, Andrew Lunn, Heiner Kallweit, Jakub Kicinski,
Russell King, David S . Miller, netdev, linux-kernel
In-Reply-To: <20201120084106.10046-1-ceggers@arri.de>
On Fri, Nov 20, 2020 at 09:41:03AM +0100, Christian Eggers wrote:
> This series introduces commen defines for PTP event messages. Driver
> internal defines are removed and some uses of magic numbers are replaced
> by the new defines.
>
> Changes v2 --> v3
> ------------------
> - extend commit description for ptp_ines (Jacob Keller)
>
> Changes v1 --> v2
> ------------------
> - use defines instead of an enum (Richard Cochran)
> - no changes necessary for dp63640
> - add cover message (Vladimir Oltean)
I understand that you don't want to spend a lifetime on this, but I see
that there are more drivers which you did not touch.
is_sync() in drivers/net/phy/dp83640.c can be made to
return ptp_get_msgtype(hdr, type) == PTP_MSGTYPE_SYNC;
this can be removed from drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h:
enum {
MLXSW_SP_PTP_MESSAGE_TYPE_SYNC,
MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ,
MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ,
MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP,
};
Either way, this can also be applied as-is, since there's nothing wrong
with it.
^ permalink raw reply
* Re: [PATCH net-next v3 3/3] ptp: ptp_ines: use new PTP_MSGTYPE_* define(s)
From: Vladimir Oltean @ 2020-11-20 22:33 UTC (permalink / raw)
To: Christian Eggers
Cc: Richard Cochran, Andrew Lunn, Heiner Kallweit, Jakub Kicinski,
Russell King, David S . Miller, netdev, linux-kernel,
Kurt Kanzenbach
In-Reply-To: <20201120084106.10046-4-ceggers@arri.de>
On Fri, Nov 20, 2020 at 09:41:06AM +0100, Christian Eggers wrote:
> Remove driver internal defines for this. Masking msgtype with 0xf is
> already done within ptp_get_msgtype().
>
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: Kurt Kanzenbach <kurt@linutronix.de>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next v3 2/3] dpaa2-eth: use new PTP_MSGTYPE_* define(s)
From: Vladimir Oltean @ 2020-11-20 22:31 UTC (permalink / raw)
To: Christian Eggers
Cc: Richard Cochran, Andrew Lunn, Heiner Kallweit, Jakub Kicinski,
Russell King, David S . Miller, netdev, linux-kernel,
Ioana Ciornei, Ioana Radulescu, Yangbo Lu
In-Reply-To: <20201120084106.10046-3-ceggers@arri.de>
On Fri, Nov 20, 2020 at 09:41:05AM +0100, Christian Eggers wrote:
> Remove usage of magic numbers.
>
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com>
> Cc: Yangbo Lu <yangbo.lu@nxp.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next v3 1/3] net: ptp: introduce common defines for PTP message types
From: Vladimir Oltean @ 2020-11-20 22:30 UTC (permalink / raw)
To: Christian Eggers
Cc: Richard Cochran, Andrew Lunn, Heiner Kallweit, Jakub Kicinski,
Russell King, David S . Miller, netdev, linux-kernel,
Kurt Kanzenbach
In-Reply-To: <20201120084106.10046-2-ceggers@arri.de>
On Fri, Nov 20, 2020 at 09:41:04AM +0100, Christian Eggers wrote:
> Using PTP wide defines will obsolete different driver internal defines
> and uses of magic numbers.
>
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> Cc: Kurt Kanzenbach <kurt@linutronix.de>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next] net: don't include ethtool.h from netdevice.h
From: Johannes Berg @ 2020-11-20 22:28 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, andrew, mkubecek, linux-rdma, linux-wireless
In-Reply-To: <20201120221328.1422925-1-kuba@kernel.org>
On Fri, 2020-11-20 at 14:13 -0800, Jakub Kicinski wrote:
> linux/netdevice.h is included in very many places, touching any
> of its dependecies causes large incremental builds.
>
> Drop the linux/ethtool.h include, linux/netdevice.h just needs
> a forward declaration of struct ethtool_ops.
>
> Fix all the places which made use of this implicit include.
> include/net/cfg80211.h | 1 +
Sounds good to me, thanks. Will still cause all wireless drivers to
rebuild this way though. Maybe I'll see later if something can be done
about that.
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Thanks,
johannes
^ permalink raw reply
* Re: [PATCH net-next v6 0/6] netdevsim: add ethtool coalesce and ring settings
From: Jakub Kicinski @ 2020-11-20 22:22 UTC (permalink / raw)
To: Antonio Cardace; +Cc: netdev, David S . Miller, Michal Kubecek
In-Reply-To: <20201118204522.5660-1-acardace@redhat.com>
On Wed, 18 Nov 2020 21:45:16 +0100 Antonio Cardace wrote:
> Output of ethtool-ring.sh and ethtool-coalesce.sh selftests:
>
> # ./ethtool-ring.sh
> PASSED all 4 checks
> # ./ethtool-coalesce.sh
> PASSED all 22 checks
> # ./ethtool-pause.sh
> PASSED all 7 checks
>
> Changelog v5 -> v6
> - moved some bits from patch 3, they
> were part of a refactoring made in patch 2
Applied, thanks!
^ permalink raw reply
* Re: [PATCH 000/141] Fix fall-through warnings for Clang
From: Miguel Ojeda @ 2020-11-20 22:21 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: linux-kernel, alsa-devel, amd-gfx, bridge, ceph-devel,
cluster-devel, coreteam, devel, dm-devel, drbd-dev, dri-devel,
GR-everest-linux-l2, GR-Linux-NIC-Dev, intel-gfx, intel-wired-lan,
keyrings, linux1394-devel, linux-acpi, linux-afs, Linux ARM,
linux-arm-msm, linux-atm-general, linux-block, linux-can,
linux-cifs, Linux Crypto Mailing List, linux-decnet-user,
Ext4 Developers List, linux-fbdev, linux-geode, linux-gpio,
linux-hams, linux-hwmon, linux-i3c, linux-ide, linux-iio,
linux-input, linux-integrity, linux-mediatek,
Linux Media Mailing List, linux-mmc, Linux-MM, linux-mtd,
linux-nfs, linux-rdma, linux-renesas-soc, linux-scsi, linux-sctp,
linux-security-module, linux-stm32, linux-usb, linux-watchdog,
linux-wireless, Network Development, netfilter-devel, nouveau,
op-tee, oss-drivers, patches, rds-devel, reiserfs-devel,
samba-technical, selinux, target-devel, tipc-discussion,
usb-storage, virtualization, wcn36xx,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), xen-devel,
linux-hardening, Nick Desaulniers, Nathan Chancellor,
Miguel Ojeda, Joe Perches, Kees Cook
In-Reply-To: <cover.1605896059.git.gustavoars@kernel.org>
Hi Gustavo,
On Fri, Nov 20, 2020 at 7:21 PM Gustavo A. R. Silva
<gustavoars@kernel.org> wrote:
>
> Hi all,
>
> This series aims to fix almost all remaining fall-through warnings in
> order to enable -Wimplicit-fallthrough for Clang.
Thanks for this.
Since this warning is reliable in both/all compilers and we are
eventually getting rid of all the cases, what about going even further
and making it an error right after?
Cheers,
Miguel
^ permalink raw reply
* [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst
From: Lorenzo Bianconi @ 2020-11-20 22:19 UTC (permalink / raw)
To: netdev; +Cc: lorenzo.bianconi, davem, kuba, brouer, ilias.apalodimas
Introduce page_pool_put_page_bulk() entry into the API section of
page_pool.rst
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
Documentation/networking/page_pool.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
index 43088ddf95e4..e848f5b995b8 100644
--- a/Documentation/networking/page_pool.rst
+++ b/Documentation/networking/page_pool.rst
@@ -97,6 +97,14 @@ a page will cause no race conditions is enough.
* page_pool_get_dma_dir(): Retrieve the stored DMA direction.
+* page_pool_put_page_bulk(): It tries to refill a bulk of count pages into the
+ ptr_ring cache holding ptr_ring producer lock. If the ptr_ring is full,
+ page_pool_put_page_bulk() will release leftover pages to the page allocator.
+ page_pool_put_page_bulk() is suitable to be run inside the driver NAPI tx
+ completion loop for the XDP_REDIRECT use case.
+ Please consider the caller must not use data area after running
+ page_pool_put_page_bulk(), as this function overwrites it.
+
Coding examples
===============
--
2.28.0
^ permalink raw reply related
* Re: [PATCH bpf-next] bpf: simplify task_file_seq_get_next()
From: Daniel Borkmann @ 2020-11-20 22:19 UTC (permalink / raw)
To: Song Liu, bpf, netdev
Cc: kernel-team, ast, andrii, kpsingh, john.fastabend, Yonghong Song
In-Reply-To: <20201120002833.2481110-1-songliubraving@fb.com>
On 11/20/20 1:28 AM, Song Liu wrote:
> Simplify task_file_seq_get_next() by removing two in/out arguments: task
> and fstruct. Use info->task and info->files instead.
>
> Cc: Yonghong Song <yhs@fb.com>
> Signed-off-by: Song Liu <songliubraving@fb.com>
Applied, thanks!
^ permalink raw reply
* Re: [PATCH net] net: openvswitch: fix TTL decrement action netlink message format
From: Pravin Shelar @ 2020-11-20 22:16 UTC (permalink / raw)
To: Eelco Chaudron
Cc: Linux Kernel Network Developers, David S. Miller, ovs dev,
Jakub Kicinski, Bindiya Kurle, Ilya Maximets, mcroce
In-Reply-To: <160577663600.7755.4779460826621858224.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com>
On Thu, Nov 19, 2020 at 1:04 AM Eelco Chaudron <echaudro@redhat.com> wrote:
>
> Currently, the openvswitch module is not accepting the correctly formated
> netlink message for the TTL decrement action. For both setting and getting
> the dec_ttl action, the actions should be nested in the
> OVS_DEC_TTL_ATTR_ACTION attribute as mentioned in the openvswitch.h uapi.
>
> Fixes: 744676e77720 ("openvswitch: add TTL decrement action")
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Thanks for working on this. can you share OVS kmod unit test for this action?
^ permalink raw reply
* [PATCH net-next] net: don't include ethtool.h from netdevice.h
From: Jakub Kicinski @ 2020-11-20 22:13 UTC (permalink / raw)
To: davem; +Cc: netdev, andrew, mkubecek, linux-rdma, linux-wireless,
Jakub Kicinski
linux/netdevice.h is included in very many places, touching any
of its dependecies causes large incremental builds.
Drop the linux/ethtool.h include, linux/netdevice.h just needs
a forward declaration of struct ethtool_ops.
Fix all the places which made use of this implicit include.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/isdn/capi/capi.c | 1 +
drivers/media/pci/ttpci/av7110_av.c | 1 +
drivers/net/bonding/bond_procfs.c | 1 +
drivers/net/can/usb/gs_usb.c | 1 +
drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 +
drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 ++
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 1 +
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 1 +
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 1 +
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 +
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 1 +
drivers/net/ethernet/google/gve/gve_ethtool.c | 1 +
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 +
drivers/net/ethernet/huawei/hinic/hinic_port.h | 1 +
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 1 +
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 1 +
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 +
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 +
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 +
drivers/net/ethernet/pensando/ionic/ionic_stats.c | 1 +
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 1 +
drivers/net/geneve.c | 1 +
drivers/net/hyperv/netvsc_drv.c | 1 +
drivers/net/hyperv/rndis_filter.c | 1 +
drivers/net/ipvlan/ipvlan_main.c | 2 ++
drivers/net/nlmon.c | 1 +
drivers/net/team/team.c | 1 +
drivers/net/vrf.c | 1 +
drivers/net/vsockmon.c | 1 +
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 ++
drivers/scsi/fcoe/fcoe_transport.c | 1 +
drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 2 ++
drivers/staging/wimax/i2400m/usb.c | 1 +
include/linux/netdevice.h | 2 +-
include/linux/qed/qed_if.h | 1 +
include/net/cfg80211.h | 1 +
include/rdma/ib_addr.h | 1 +
include/rdma/ib_verbs.h | 1 +
net/packet/af_packet.c | 1 +
net/sched/sch_cbs.c | 1 +
net/sched/sch_taprio.c | 1 +
net/socket.c | 1 +
44 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 85767f52fe3c..fdf87acccd06 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -11,6 +11,7 @@
#include <linux/compiler.h>
#include <linux/module.h>
+#include <linux/ethtool.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/major.h>
diff --git a/drivers/media/pci/ttpci/av7110_av.c b/drivers/media/pci/ttpci/av7110_av.c
index ea9f7d0058a2..91f4866c7e59 100644
--- a/drivers/media/pci/ttpci/av7110_av.c
+++ b/drivers/media/pci/ttpci/av7110_av.c
@@ -11,6 +11,7 @@
* the project's page is at https://linuxtv.org
*/
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index fd5c9cbe45b1..56d34be5e797 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/proc_fs.h>
+#include <linux/ethtool.h>
#include <linux/export.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 3005157059ca..853c7b22aaef 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -9,6 +9,7 @@
* Many thanks to all socketcan devs!
*/
+#include <linux/ethtool.h>
#include <linux/init.h>
#include <linux/signal.h>
#include <linux/module.h>
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 3b2cd28f962d..6cdd9efe8df3 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -3,6 +3,7 @@
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
+#include <linux/ethtool.h>
#include <linux/pci.h>
#include "ena_netdev.h"
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
index 926cca9a0c83..1a7148041e3d 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
@@ -10,6 +10,8 @@
#ifndef AQ_NIC_H
#define AQ_NIC_H
+#include <linux/ethtool.h>
+
#include "aq_common.h"
#include "aq_rss.h"
#include "aq_hw.h"
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 47b3c3127879..950ea26ae0d2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -20,6 +20,7 @@
#define DRV_VER_MIN 10
#define DRV_VER_UPD 1
+#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/rhashtable.h>
#include <linux/crash_dump.h>
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
index 23b80aa171dd..a217316228f4 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
@@ -8,6 +8,7 @@
* the Free Software Foundation.
*/
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index 16eebfc52109..66f2c553370c 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -15,6 +15,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
* NONINFRINGEMENT. See the GNU General Public License for more details.
***********************************************************************/
+#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/net_tstamp.h>
#include <linux/pci.h>
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index c7bdac79299a..2f218fbfed06 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -5,6 +5,7 @@
/* ETHTOOL Support for VNIC_VF Device*/
+#include <linux/ethtool.h>
#include <linux/pci.h>
#include <linux/net_tstamp.h>
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index 27308600da15..8e681ce72d62 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -39,6 +39,7 @@
#include <linux/bitops.h>
#include <linux/cache.h>
+#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
index cd8f9a481d73..d546993bda09 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
@@ -33,6 +33,7 @@
* SOFTWARE.
*/
+#include <linux/ethtool.h>
#include <linux/pci.h>
#include "t4vf_common.h"
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 7b44769bd87c..2fb197fd3daf 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -4,6 +4,7 @@
* Copyright (C) 2015-2019 Google, Inc.
*/
+#include <linux/ethtool.h>
#include <linux/rtnetlink.h>
#include "gve.h"
#include "gve_adminq.h"
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index f9d4d234a2af..8cb8f9eb354f 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -25,6 +25,7 @@
#include <linux/dcbnl.h>
#include <linux/delay.h>
#include <linux/device.h>
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h b/drivers/net/ethernet/huawei/hinic/hinic_port.h
index 9c3cbe45c9ec..c9ae3d4dc547 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_port.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_port.h
@@ -8,6 +8,7 @@
#define HINIC_PORT_H
#include <linux/types.h>
+#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/bitops.h>
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 908fefaa6b85..66776ba7bfb6 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2013 - 2019 Intel Corporation. */
+#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include "fm10k.h"
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index b18b45d02165..724040743a6d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -11,6 +11,7 @@
#ifndef OTX2_COMMON_H
#define OTX2_COMMON_H
+#include <linux/ethtool.h>
#include <linux/pci.h>
#include <linux/iommu.h>
#include <linux/net_tstamp.h>
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index a46efe37cfa9..6e02910f7692 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -36,6 +36,7 @@
#include <linux/bitops.h>
#include <linux/compiler.h>
+#include <linux/ethtool.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 74b3959b36d4..642099fee380 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -4,6 +4,7 @@
#ifndef _MLXSW_SPECTRUM_H
#define _MLXSW_SPECTRUM_H
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/rhashtable.h>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
index 5023d91269f4..40e2e79d4517 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
@@ -6,6 +6,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
+#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/slab.h>
#include <linux/device.h>
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index deabd813e3fe..0afec2fa572d 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
+#include <linux/ethtool.h>
#include <linux/printk.h>
#include <linux/dynamic_debug.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_stats.c b/drivers/net/ethernet/pensando/ionic/ionic_stats.c
index ff20a2ac4c2f..6ae75b771a15 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_stats.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_stats.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
+#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
index d58b51d277f1..ca1535ebb6e7 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
@@ -5,6 +5,7 @@
*/
#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
#include <linux/if_arp.h>
#include <net/pkt_sched.h>
#include "rmnet_config.h"
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index a3c8ce6deb93..26fd3ab54406 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -7,6 +7,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/etherdevice.h>
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 261e6e55a907..d17bbc75f5e7 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -10,6 +10,7 @@
#include <linux/init.h>
#include <linux/atomic.h>
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/highmem.h>
#include <linux/device.h>
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index b22e47bcfeca..2c2b55c32a7a 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -6,6 +6,7 @@
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
*/
+#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/wait.h>
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 60b7d93bb834..a707502a0c0f 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -2,6 +2,8 @@
/* Copyright (c) 2014 Mahesh Bandewar <maheshb@google.com>
*/
+#include <linux/ethtool.h>
+
#include "ipvlan.h"
static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval,
diff --git a/drivers/net/nlmon.c b/drivers/net/nlmon.c
index afb119f38325..5e19a6839dea 100644
--- a/drivers/net/nlmon.c
+++ b/drivers/net/nlmon.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index b4092127a92c..c19dac21c468 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -4,6 +4,7 @@
* Copyright (c) 2011 Jiri Pirko <jpirko@redhat.com>
*/
+#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index f2793ffde191..f8d711a84763 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -9,6 +9,7 @@
* Based on dummy, team and ipvlan drivers
*/
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/vsockmon.c b/drivers/net/vsockmon.c
index e8563acf98e8..b1bb1b04b664 100644
--- a/drivers/net/vsockmon.c
+++ b/drivers/net/vsockmon.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/if_arp.h>
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 6890bbe04a8c..1528ef69a514 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -14,6 +14,8 @@
* Written by: Bhanu Prakash Gollapudi (bprakash@broadcom.com)
*/
+#include <linux/ethtool.h>
+
#include "bnx2fc.h"
static struct list_head adapter_list;
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index 6e187d0e71fd..b927b3d84523 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/netdevice.h>
+#include <linux/ethtool.h>
#include <linux/errno.h>
#include <linux/crc32.h>
#include <scsi/libfcoe.h>
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
index ace4a6d28562..ad55cd738847 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
@@ -7,6 +7,8 @@
*
*/
+#include <linux/ethtool.h>
+
#include "ethsw.h"
static struct {
diff --git a/drivers/staging/wimax/i2400m/usb.c b/drivers/staging/wimax/i2400m/usb.c
index 3b84dd7b5567..f250d03ce7c7 100644
--- a/drivers/staging/wimax/i2400m/usb.c
+++ b/drivers/staging/wimax/i2400m/usb.c
@@ -51,6 +51,7 @@
#include "i2400m-usb.h"
#include "linux-wimax-i2400m.h"
#include <linux/debugfs.h>
+#include <linux/ethtool.h>
#include <linux/slab.h>
#include <linux/module.h>
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 03433a4c929e..0049e8fe4905 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -34,7 +34,6 @@
#include <linux/workqueue.h>
#include <linux/dynamic_queue_limits.h>
-#include <linux/ethtool.h>
#include <net/net_namespace.h>
#ifdef CONFIG_DCB
#include <net/dcbnl.h>
@@ -51,6 +50,7 @@
struct netpoll_info;
struct device;
+struct ethtool_ops;
struct phy_device;
struct dsa_port;
struct ip_tunnel_parm;
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index 57fb295ea41a..68d17a4fbf20 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -7,6 +7,7 @@
#ifndef _QED_IF_H
#define _QED_IF_H
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ab249ca5d5d1..78c763dfc99a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -10,6 +10,7 @@
* Copyright (C) 2018-2020 Intel Corporation
*/
+#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/debugfs.h>
#include <linux/list.h>
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index b0e636ac6690..d808dc3d239e 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -7,6 +7,7 @@
#ifndef IB_ADDR_H
#define IB_ADDR_H
+#include <linux/ethtool.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/if_arp.h>
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 9bf6c319a670..3883efd588aa 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -12,6 +12,7 @@
#ifndef IB_VERBS_H
#define IB_VERBS_H
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 62ebfaa7adcb..48a0ed836b46 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -46,6 +46,7 @@
* Copyright (C) 2011, <lokec@ccs.neu.edu>
*/
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/capability.h>
diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c
index 2eaac2ff380f..459cc240eda9 100644
--- a/net/sched/sch_cbs.c
+++ b/net/sched/sch_cbs.c
@@ -50,6 +50,7 @@
* locredit = max_frame_size * (sendslope / port_transmit_rate)
*/
+#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index b0ad7687ee2c..26fb8a62996b 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -6,6 +6,7 @@
*
*/
+#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/kernel.h>
diff --git a/net/socket.c b/net/socket.c
index 152b1dcf93c6..bfef11ba35b8 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -52,6 +52,7 @@
* Based upon Swansea University Computer Society NET3.039
*/
+#include <linux/ethtool.h>
#include <linux/mm.h>
#include <linux/socket.h>
#include <linux/file.h>
--
2.24.1
^ permalink raw reply related
* Re: [PATCH bpf-next 3/6] libbpf: refactor CO-RE relocs to not assume a single BTF object
From: Martin KaFai Lau @ 2020-11-20 22:11 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: bpf, netdev, ast, daniel, kernel-team
In-Reply-To: <20201119232244.2776720-4-andrii@kernel.org>
On Thu, Nov 19, 2020 at 03:22:41PM -0800, Andrii Nakryiko wrote:
> Refactor CO-RE relocation candidate search to not expect a single BTF, rather
> return all candidate types with their corresponding BTF objects. This will
> allow to extend CO-RE relocations to accommodate kernel module BTFs.
Acked-by: Martin KaFai Lau <kafai@fb.com>
^ permalink raw reply
* Re: [kuba@kernel.org: Re: [PATCH net-next v2 0/3] net: introduce rps_default_mask]
From: Daniel Borkmann @ 2020-11-20 21:56 UTC (permalink / raw)
To: marcel, Saeed Mahameed, Jakub Kicinski, netdev
Cc: Paolo Abeni, Jonathan Corbet, David S. Miller, Shuah Khan,
Marcelo Tosatti
In-Reply-To: <CA+aaKfD_6qdNVRgr2TdDeuOau1UCFzRqWRB8iM-_GHV7mMrcsg@mail.gmail.com>
On 11/20/20 6:39 PM, Marcel Apfelbaum wrote:
> +netdev
> [Sorry for the second email, I failed to set the text-only mode]
> On Fri, Nov 20, 2020 at 7:30 PM Marcel Apfelbaum <mapfelba@redhat.com> wrote:
[...]
>>> ---------- Forwarded message ----------
>>> From: Jakub Kicinski <kuba@kernel.org>
>>> To: Paolo Abeni <pabeni@redhat.com>
>>> Cc: Saeed Mahameed <saeed@kernel.org>, netdev@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>, "David S. Miller" <davem@davemloft.net>, Shuah Khan <shuah@kernel.org>, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>, Daniel Borkmann <daniel@iogearbox.net>
>>> Bcc:
>>> Date: Wed, 4 Nov 2020 11:42:26 -0800
>>> Subject: Re: [PATCH net-next v2 0/3] net: introduce rps_default_mask
>>> On Wed, 04 Nov 2020 18:36:08 +0100 Paolo Abeni wrote:
>>>> On Tue, 2020-11-03 at 08:52 -0800, Jakub Kicinski wrote:
>>>>> On Tue, 03 Nov 2020 16:22:07 +0100 Paolo Abeni wrote:
>>>>>> The relevant use case is an host running containers (with the related
>>>>>> orchestration tools) in a RT environment. Virtual devices (veths, ovs
>>>>>> ports, etc.) are created by the orchestration tools at run-time.
>>>>>> Critical processes are allowed to send packets/generate outgoing, it gets a network-interface
>>>> upstart job just as it does on a real host.
>>>>
>>>>>> network traffic - but any interrupt is moved away from the related
>>>>>> cores, so that usual incoming network traffic processing does not
>>>>>> happen there.
>>>>>>
>>>>>> Still an xmit operation on a virtual devices may be transmitted via ovs
>>>>>> or veth, with the relevant forwarding operation happening in a softirq
>>>>>> on the same CPU originating the packet.
>>>>>>
>>>>>> RPS is configured (even) on such virtual devices to move away the
>>>>>> forwarding from the relevant CPUs.
>>>>>>
>>>>>> As Saeed noted, such configuration could be possibly performed via some
>>>>>> user-space daemon monitoring network devices and network namespaces
>>>>>> creation. That will be anyway prone to some race: the orchestation tool
>>>>>> may create and enable the netns and virtual devices before the daemon
>>>>>> has properly set the RPS mask.
>>>>>>
>>>>>> In the latter scenario some packet forwarding could still slip in the
>>>>>> relevant CPU, causing measurable latency. In all non RT scenarios the
>>>>>> above will be likely irrelevant, but in the RT context that is not
>>>>>> acceptable - e.g. it causes in real environments latency above the
>>>>>> defined limits, while the proposed patches avoid the issue.
>>>>>>
>>>>>> Do you see any other simple way to avoid the above race?
>>>>>>
>>>>>> Please let me know if the above answers your doubts,
>>>>>
>>>>> Thanks, that makes it clearer now.
>>>>>
>>>>> Depending on how RT-aware your container management is it may or may not
>>>>> be the right place to configure this, as it creates the veth interface.
>>>>> Presumably it's the container management which does the placement of
>>>>> the tasks to cores, why is it not setting other attributes, like RPS?
>>
>> The CPU isolation is done statically at system boot by setting Linux kernel parameters,
>> So the container management component, in this case the Machine Configuration Operator (for Openshift)
>> or the K8s counterpart can't really help. (actually they would help if a global RPS mask would exist)
>>
>> I tried to tweak the rps_cpus mask using the container management stack, but there
>> is no sane way to do it, please let me get a little into the details.
>>
>> The k8s orchestration component that deals with injecting the network device(s) into the
>> container is CNI, which is interface based and implemented by a lot of plugins, making it
>> hardly feasible to go over all the existing plugins and change them. Also what about
>> the 3rd party ones?
>>
>> Writing a new CNI plugin and chain it into the existing one is also not an option AFAIK,
>> they work at the network level and do not have access to sysfs (they handle the network namespaces).
>> Even if it would be possible (I don't have a deep CNI understanding), it will require a cluster global configuration
>> that is actually needed only for some of the cluster nodes.
CNI chaining would be ugly, agree, but in a typical setting you'd have the CNI plugin
itself which is responsible to set up the Pod for communication to the outside world;
part of it would be creation of devices and moving them into the target netns, and
then you also typically have an agent running in kube-system namespace in the hostns
to which the CNI plugin talks to via IPC e.g. to set up IPAM and other state. Such
agent usually sets up all sort of knobs for the networking layer upon bootstrap.
Assuming you have a cluster where only some of the nodes have RT kernel, these would
likely have special node annotations in K8s so you could select them to run certain
workloads on it.. couldn't such agent be taught to be RT-aware and set up all the
needed knobs? Agree it's a bit ugly to change the relevant CNI plugins to be RT-aware,
but what if you also need other settings in future aside from RPS mask for RT? At some
point you'd likely end up having to extend these anyway, no?
>> Another approach is to set the RPS configuration from the inside(of the container),
>> but the /sys mount is read only for unprivileged containers, so we lose again.
>>
>> That leaves us with a host daemon hack:
>> Since the virtual network devices are created in the host namespace and
>> then "moved" into the container, we can listen to some udev event
>> and write to the rps_cpus file after the virtual netdev is created and before
>> it is moved (as stated above, the work is done by a CNI plugin implementation).
>> That is of course extremely racy and not a valid solution.
>>
>>>> The container orchestration is quite complex, and I'm unsure isolation
>>>> and networking configuration are performed (or can be performed) by the
>>>> same precess (without an heavy refactor).
>>>>
>>>> On the flip hand, the global rps mask knob looked quite
>>>> straightforward to me.
>>>
>>> I understand, but I can't shake the feeling this is a hack.
>>>
>>> Whatever sets the CPU isolation should take care of the RPS settings.
>>
>> Sadly it can't be done, please see above.
>>
>>>> Possibly I can reduce the amount of new code introduced by this
>>>> patchset removing some code duplication
>>>> between rps_default_mask_sysctl() and flow_limit_cpu_sysctl(). Would
>>>> that make this change more acceptable? Or should I drop this
>>>> altogether?
>>>
>>> I'm leaning towards drop altogether, unless you can get some
>>> support/review tags from other netdev developers. So far it
>>> appears we only got a down vote from Saeed.
>>
>> Any solution that will allow the user space to avoid the
>> network soft IRQs on specific CPUs would be welcome.
>>
>> The proposed global mask is a solution, maybe there other ways?
>>
>> Thanks,
>> Marcel
>
^ permalink raw reply
* Re: [PATCH bpf-next V7 8/8] bpf/selftests: activating bpf_check_mtu BPF-helper
From: Alexei Starovoitov @ 2020-11-20 21:50 UTC (permalink / raw)
To: Jesper Dangaard Brouer
Cc: bpf, netdev, Daniel Borkmann, maze, lmb, shaun, Lorenzo Bianconi,
marek, John Fastabend, Jakub Kicinski, eyal.birger, colrack
In-Reply-To: <160588912738.2817268.9380466634324530673.stgit@firesoul>
On Fri, Nov 20, 2020 at 05:18:47PM +0100, Jesper Dangaard Brouer wrote:
> Adding selftest for BPF-helper bpf_check_mtu(). Making sure
> it can be used from both XDP and TC.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
> ---
> tools/testing/selftests/bpf/prog_tests/check_mtu.c | 37 ++++++++++++++++++++
> tools/testing/selftests/bpf/progs/test_check_mtu.c | 33 ++++++++++++++++++
> 2 files changed, 70 insertions(+)
> create mode 100644 tools/testing/selftests/bpf/prog_tests/check_mtu.c
> create mode 100644 tools/testing/selftests/bpf/progs/test_check_mtu.c
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/check_mtu.c b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
> new file mode 100644
> index 000000000000..09b8f986a17b
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
> @@ -0,0 +1,37 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) 2020 Red Hat */
> +#include <uapi/linux/bpf.h>
> +#include <linux/if_link.h>
> +#include <test_progs.h>
> +
> +#include "test_check_mtu.skel.h"
> +#define IFINDEX_LO 1
> +
> +void test_check_mtu_xdp(struct test_check_mtu *skel)
> +{
> + int err = 0;
> + int fd;
> +
> + fd = bpf_program__fd(skel->progs.xdp_use_helper);
> + err = bpf_set_link_xdp_fd(IFINDEX_LO, fd, XDP_FLAGS_SKB_MODE);
> + if (CHECK_FAIL(err))
> + return;
> +
> + bpf_set_link_xdp_fd(IFINDEX_LO, -1, 0);
> +}
> +
> +void test_check_mtu(void)
> +{
> + struct test_check_mtu *skel;
> +
> + skel = test_check_mtu__open_and_load();
> + if (CHECK_FAIL(!skel)) {
> + perror("test_check_mtu__open_and_load");
> + return;
> + }
> +
> + if (test__start_subtest("bpf_check_mtu XDP-attach"))
> + test_check_mtu_xdp(skel);
> +
> + test_check_mtu__destroy(skel);
> +}
> diff --git a/tools/testing/selftests/bpf/progs/test_check_mtu.c b/tools/testing/selftests/bpf/progs/test_check_mtu.c
> new file mode 100644
> index 000000000000..ab97ec925a32
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/test_check_mtu.c
> @@ -0,0 +1,33 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) 2020 Red Hat */
> +#include <linux/bpf.h>
> +#include <bpf/bpf_helpers.h>
> +
> +#include <stddef.h>
> +#include <stdint.h>
> +
> +char _license[] SEC("license") = "GPL";
> +
> +SEC("xdp")
> +int xdp_use_helper(struct xdp_md *ctx)
> +{
> + uint32_t mtu_len = 0;
> + int delta = 20;
> +
> + if (bpf_check_mtu(ctx, 0, &mtu_len, delta, 0)) {
> + return XDP_ABORTED;
> + }
> + return XDP_PASS;
> +}
> +
> +SEC("classifier")
> +int tc_use_helper(struct __sk_buff *ctx)
> +{
> + uint32_t mtu_len = 0;
> + int delta = -20;
> +
> + if (bpf_check_mtu(ctx, 0, &mtu_len, delta, 0)) {
> + return BPF_DROP;
> + }
> + return BPF_OK;
> +}
Patches 7 and 8 are not adequate as tests.
They do not testing the functionality of earlier patches.
bpf_check_mtu() could be returning random value and "tests" 7 and 8 would still pass.
Please fix.
^ permalink raw reply
* Re: [PATCH 117/141] rtl8xxxu: Fix fall-through warnings for Clang
From: Jes Sorensen @ 2020-11-20 21:39 UTC (permalink / raw)
To: Gustavo A. R. Silva, Kalle Valo, David S. Miller, Jakub Kicinski
Cc: linux-wireless, netdev, linux-kernel, linux-hardening
In-Reply-To: <d522f387b2d0dde774785c7169c1f25aa529989d.1605896060.git.gustavoars@kernel.org>
On 11/20/20 1:38 PM, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix
> multiple warnings by replacing /* fall through */ comments with
> the new pseudo-keyword macro fallthrough; instead of letting the
> code fall through to the next case.
>
> Notice that Clang doesn't recognize /* fall through */ comments as
> implicit fall-through markings.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
While I wasn't CC'ed on the cover-letter I see Jakub also raised issues
about this unnecessary patch noise.
Quite frankly, this seems to be patch churn for the sake of patch churn.
If clang is broken, fix clang instead.
NACK
Jes
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 5cd7ef3625c5..afc97958fa4d 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -1145,7 +1145,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
> switch (hw->conf.chandef.width) {
> case NL80211_CHAN_WIDTH_20_NOHT:
> ht = false;
> - /* fall through */
> + fallthrough;
> case NL80211_CHAN_WIDTH_20:
> opmode |= BW_OPMODE_20MHZ;
> rtl8xxxu_write8(priv, REG_BW_OPMODE, opmode);
> @@ -1272,7 +1272,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
> switch (hw->conf.chandef.width) {
> case NL80211_CHAN_WIDTH_20_NOHT:
> ht = false;
> - /* fall through */
> + fallthrough;
> case NL80211_CHAN_WIDTH_20:
> rf_mode_bw |= WMAC_TRXPTCL_CTL_BW_20;
> subchannel = 0;
> @@ -1741,11 +1741,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
> case 3:
> priv->ep_tx_low_queue = 1;
> priv->ep_tx_count++;
> - /* fall through */
> + fallthrough;
> case 2:
> priv->ep_tx_normal_queue = 1;
> priv->ep_tx_count++;
> - /* fall through */
> + fallthrough;
> case 1:
> priv->ep_tx_high_queue = 1;
> priv->ep_tx_count++;
>
^ permalink raw reply
* Re: [PATCH net] cfg80211: fix callback type mismatches in wext-compat
From: Johannes Berg @ 2020-11-20 21:33 UTC (permalink / raw)
To: Kees Cook, Sami Tolvanen
Cc: David S. Miller, Jakub Kicinski, linux-wireless, netdev, LKML,
Sedat Dilek
In-Reply-To: <202011201118.CE625B965@keescook>
On Fri, 2020-11-20 at 11:26 -0800, Kees Cook wrote:
> On Tue, Nov 17, 2020 at 02:07:43PM -0800, Sami Tolvanen wrote:
> > On Tue, Nov 17, 2020 at 1:45 PM Kees Cook <keescook@chromium.org> wrote:
> > > On Tue, Nov 17, 2020 at 12:59:02PM -0800, Sami Tolvanen wrote:
> > > > Instead of casting callback functions to type iw_handler, which trips
> > > > indirect call checking with Clang's Control-Flow Integrity (CFI), add
> > > > stub functions with the correct function type for the callbacks.
> > >
> > > Oh, wow. iw_handler with union iwreq_data look like really nasty hacks.
> > > Aren't those just totally bypassing type checking? Where do the
> > > callbacks actually happen? I couldn't find them...
> >
> > The callbacks to these happen in ioctl_standard_call in wext-core.c.
>
> Thanks! If this is all the 'old compat' code, this patch looks fine. I
> think new stuff should probably encode types in some fashion (rather
> than via wrappers).
Everything mentioning wext has been deprecated for something like 15
years ... so yeah. But people still use it :(
johannes
^ permalink raw reply
* Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing
From: Michal Kubecek @ 2020-11-20 21:22 UTC (permalink / raw)
To: Andrew Lunn; +Cc: tanhuazhong, davem, netdev, linux-kernel, linuxarm, kuba
In-Reply-To: <20201120133938.GG1804098@lunn.ch>
On Fri, Nov 20, 2020 at 02:39:38PM +0100, Andrew Lunn wrote:
> On Fri, Nov 20, 2020 at 08:23:22AM +0100, Michal Kubecek wrote:
> > On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote:
> > > On 2020/11/20 6:02, Michal Kubecek wrote:
> > > >
> > > > We could use a similar approach as struct ethtool_link_ksettings, e.g.
> > > >
> > > > struct kernel_ethtool_coalesce {
> > > > struct ethtool_coalesce base;
> > > > /* new members which are not part of UAPI */
> > > > }
> > > >
> > > > get_coalesce() and set_coalesce() would get pointer to struct
> > > > kernel_ethtool_coalesce and ioctl code would be modified to only touch
> > > > the base (legacy?) part.
> > > > > While already changing the ops arguments, we could also add extack
> > > > pointer, either as a separate argument or as struct member (I slightly
> > > > prefer the former).
> > >
> > > If changing the ops arguments, each driver who implement
> > > set_coalesce/get_coalesce of ethtool_ops need to be updated. Is it
> > > acceptable adding two new ops to get/set ext_coalesce info (like
> > > ecc31c60240b ("ethtool: Add link extended state") does)? Maybe i can send V2
> > > in this way, and then could you help to see which one is more suitable?
> >
> > If it were just this one case, adding an extra op would be perfectly
> > fine. But from long term point of view, we should expect extending also
> > other existing ethtool requests and going this way for all of them would
> > essentially double the number of callbacks in struct ethtool_ops.
>
> coccinella might be useful here.
I played with spatch a bit and it with the spatch and patch below, I got
only three build failures (with allmodconfig) that would need to be
addressed manually - these drivers call the set_coalesce() callback on
device initialization.
I also tried to make the structure argument const in ->set_coalesce()
but that was more tricky as adjusting other functions that the structure
is passed to required either running the spatch three times or repeating
the same two rules three times in the spatch (or perhaps there is
a cleaner way but I'm missing relevant knowledge of coccinelle). Then
there was one more problem in i40e driver which modifies the structure
before passing it on to its helpers. It could be worked around but I'm
not sure if constifying the argument is worth these extra complications.
Michal
semantic patch:
------------------------------------------------------------------------
@getc@
identifier fn;
identifier ops;
@@
struct ethtool_ops ops = {
...
,.get_coalesce = fn,
...
};
@@
identifier getc.fn;
identifier dev, data;
@@
-int fn(struct net_device *dev, struct ethtool_coalesce *data)
+int fn(struct net_device *dev, struct netlink_ext_ack *extack, struct kernel_ethtool_coalesce *data)
{
+struct ethtool_coalesce *coal_base = &data->base;
<...
-data
+coal_base
...>
}
@setc@
identifier fn;
identifier ops;
@@
struct ethtool_ops ops = {
...
,.set_coalesce = fn,
...
};
@@
identifier setc.fn;
identifier dev, data;
@@
-int fn(struct net_device *dev, struct ethtool_coalesce *data)
+int fn(struct net_device *dev, struct netlink_ext_ack *extack, struct kernel_ethtool_coalesce *data)
{
+struct ethtool_coalesce *coal_base = &data->base;
<...
-data
+coal_base
...>
}
------------------------------------------------------------------------
maual part:
------------------------------------------------------------------------
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 6408b446051f..01d049d36120 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -15,6 +15,7 @@
#include <linux/bitmap.h>
#include <linux/compat.h>
+#include <linux/netlink.h>
#include <uapi/linux/ethtool.h>
#ifdef CONFIG_COMPAT
@@ -176,6 +177,10 @@ extern int
__ethtool_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *link_ksettings);
+struct kernel_ethtool_coalesce {
+ struct ethtool_coalesce base;
+};
+
/**
* ethtool_intersect_link_masks - Given two link masks, AND them together
* @dst: first mask and where result is stored
@@ -436,8 +441,12 @@ struct ethtool_ops {
struct ethtool_eeprom *, u8 *);
int (*set_eeprom)(struct net_device *,
struct ethtool_eeprom *, u8 *);
- int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
- int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
+ int (*get_coalesce)(struct net_device *,
+ struct netlink_ext_ack *extack,
+ struct kernel_ethtool_coalesce *);
+ int (*set_coalesce)(struct net_device *,
+ struct netlink_ext_ack *extack,
+ struct kernel_ethtool_coalesce *);
void (*get_ringparam)(struct net_device *,
struct ethtool_ringparam *);
int (*set_ringparam)(struct net_device *,
diff --git a/net/ethtool/coalesce.c b/net/ethtool/coalesce.c
index 1d6bc132aa4d..6f64dad0202e 100644
--- a/net/ethtool/coalesce.c
+++ b/net/ethtool/coalesce.c
@@ -9,7 +9,7 @@ struct coalesce_req_info {
struct coalesce_reply_data {
struct ethnl_reply_data base;
- struct ethtool_coalesce coalesce;
+ struct kernel_ethtool_coalesce coalesce;
u32 supported_params;
};
@@ -61,6 +61,7 @@ static int coalesce_prepare_data(const struct ethnl_req_info *req_base,
struct genl_info *info)
{
struct coalesce_reply_data *data = COALESCE_REPDATA(reply_base);
+ struct netlink_ext_ack *extack = info ? info->extack : NULL;
struct net_device *dev = reply_base->dev;
int ret;
@@ -70,7 +71,7 @@ static int coalesce_prepare_data(const struct ethnl_req_info *req_base,
ret = ethnl_ops_begin(dev);
if (ret < 0)
return ret;
- ret = dev->ethtool_ops->get_coalesce(dev, &data->coalesce);
+ ret = dev->ethtool_ops->get_coalesce(dev, extack, &data->coalesce);
ethnl_ops_complete(dev);
return ret;
@@ -124,53 +125,53 @@ static int coalesce_fill_reply(struct sk_buff *skb,
const struct ethnl_reply_data *reply_base)
{
const struct coalesce_reply_data *data = COALESCE_REPDATA(reply_base);
- const struct ethtool_coalesce *coal = &data->coalesce;
+ const struct ethtool_coalesce *cbase = &data->coalesce.base;
u32 supported = data->supported_params;
if (coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_USECS,
- coal->rx_coalesce_usecs, supported) ||
+ cbase->rx_coalesce_usecs, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_MAX_FRAMES,
- coal->rx_max_coalesced_frames, supported) ||
+ cbase->rx_max_coalesced_frames, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_USECS_IRQ,
- coal->rx_coalesce_usecs_irq, supported) ||
+ cbase->rx_coalesce_usecs_irq, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ,
- coal->rx_max_coalesced_frames_irq, supported) ||
+ cbase->rx_max_coalesced_frames_irq, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_USECS,
- coal->tx_coalesce_usecs, supported) ||
+ cbase->tx_coalesce_usecs, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_MAX_FRAMES,
- coal->tx_max_coalesced_frames, supported) ||
+ cbase->tx_max_coalesced_frames, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_USECS_IRQ,
- coal->tx_coalesce_usecs_irq, supported) ||
+ cbase->tx_coalesce_usecs_irq, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ,
- coal->tx_max_coalesced_frames_irq, supported) ||
+ cbase->tx_max_coalesced_frames_irq, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_STATS_BLOCK_USECS,
- coal->stats_block_coalesce_usecs, supported) ||
+ cbase->stats_block_coalesce_usecs, supported) ||
coalesce_put_bool(skb, ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX,
- coal->use_adaptive_rx_coalesce, supported) ||
+ cbase->use_adaptive_rx_coalesce, supported) ||
coalesce_put_bool(skb, ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX,
- coal->use_adaptive_tx_coalesce, supported) ||
+ cbase->use_adaptive_tx_coalesce, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_PKT_RATE_LOW,
- coal->pkt_rate_low, supported) ||
+ cbase->pkt_rate_low, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_USECS_LOW,
- coal->rx_coalesce_usecs_low, supported) ||
+ cbase->rx_coalesce_usecs_low, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW,
- coal->rx_max_coalesced_frames_low, supported) ||
+ cbase->rx_max_coalesced_frames_low, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_USECS_LOW,
- coal->tx_coalesce_usecs_low, supported) ||
+ cbase->tx_coalesce_usecs_low, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW,
- coal->tx_max_coalesced_frames_low, supported) ||
+ cbase->tx_max_coalesced_frames_low, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_PKT_RATE_HIGH,
- coal->pkt_rate_high, supported) ||
+ cbase->pkt_rate_high, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_USECS_HIGH,
- coal->rx_coalesce_usecs_high, supported) ||
+ cbase->rx_coalesce_usecs_high, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH,
- coal->rx_max_coalesced_frames_high, supported) ||
+ cbase->rx_max_coalesced_frames_high, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_USECS_HIGH,
- coal->tx_coalesce_usecs_high, supported) ||
+ cbase->tx_coalesce_usecs_high, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH,
- coal->tx_max_coalesced_frames_high, supported) ||
+ cbase->tx_max_coalesced_frames_high, supported) ||
coalesce_put_u32(skb, ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL,
- coal->rate_sample_interval, supported))
+ cbase->rate_sample_interval, supported))
return -EMSGSIZE;
return 0;
@@ -219,7 +220,8 @@ const struct nla_policy ethnl_coalesce_set_policy[] = {
int ethnl_set_coalesce(struct sk_buff *skb, struct genl_info *info)
{
- struct ethtool_coalesce coalesce = {};
+ struct kernel_ethtool_coalesce coalesce = {};
+ struct ethtool_coalesce *coal_base = &coalesce.base;
struct ethnl_req_info req_info = {};
struct nlattr **tb = info->attrs;
const struct ethtool_ops *ops;
@@ -255,59 +257,59 @@ int ethnl_set_coalesce(struct sk_buff *skb, struct genl_info *info)
ret = ethnl_ops_begin(dev);
if (ret < 0)
goto out_rtnl;
- ret = ops->get_coalesce(dev, &coalesce);
+ ret = ops->get_coalesce(dev, info->extack, &coalesce);
if (ret < 0)
goto out_ops;
- ethnl_update_u32(&coalesce.rx_coalesce_usecs,
+ ethnl_update_u32(&coal_base->rx_coalesce_usecs,
tb[ETHTOOL_A_COALESCE_RX_USECS], &mod);
- ethnl_update_u32(&coalesce.rx_max_coalesced_frames,
+ ethnl_update_u32(&coal_base->rx_max_coalesced_frames,
tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES], &mod);
- ethnl_update_u32(&coalesce.rx_coalesce_usecs_irq,
+ ethnl_update_u32(&coal_base->rx_coalesce_usecs_irq,
tb[ETHTOOL_A_COALESCE_RX_USECS_IRQ], &mod);
- ethnl_update_u32(&coalesce.rx_max_coalesced_frames_irq,
+ ethnl_update_u32(&coal_base->rx_max_coalesced_frames_irq,
tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ], &mod);
- ethnl_update_u32(&coalesce.tx_coalesce_usecs,
+ ethnl_update_u32(&coal_base->tx_coalesce_usecs,
tb[ETHTOOL_A_COALESCE_TX_USECS], &mod);
- ethnl_update_u32(&coalesce.tx_max_coalesced_frames,
+ ethnl_update_u32(&coal_base->tx_max_coalesced_frames,
tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES], &mod);
- ethnl_update_u32(&coalesce.tx_coalesce_usecs_irq,
+ ethnl_update_u32(&coal_base->tx_coalesce_usecs_irq,
tb[ETHTOOL_A_COALESCE_TX_USECS_IRQ], &mod);
- ethnl_update_u32(&coalesce.tx_max_coalesced_frames_irq,
+ ethnl_update_u32(&coal_base->tx_max_coalesced_frames_irq,
tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ], &mod);
- ethnl_update_u32(&coalesce.stats_block_coalesce_usecs,
+ ethnl_update_u32(&coal_base->stats_block_coalesce_usecs,
tb[ETHTOOL_A_COALESCE_STATS_BLOCK_USECS], &mod);
- ethnl_update_bool32(&coalesce.use_adaptive_rx_coalesce,
+ ethnl_update_bool32(&coal_base->use_adaptive_rx_coalesce,
tb[ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX], &mod);
- ethnl_update_bool32(&coalesce.use_adaptive_tx_coalesce,
+ ethnl_update_bool32(&coal_base->use_adaptive_tx_coalesce,
tb[ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX], &mod);
- ethnl_update_u32(&coalesce.pkt_rate_low,
+ ethnl_update_u32(&coal_base->pkt_rate_low,
tb[ETHTOOL_A_COALESCE_PKT_RATE_LOW], &mod);
- ethnl_update_u32(&coalesce.rx_coalesce_usecs_low,
+ ethnl_update_u32(&coal_base->rx_coalesce_usecs_low,
tb[ETHTOOL_A_COALESCE_RX_USECS_LOW], &mod);
- ethnl_update_u32(&coalesce.rx_max_coalesced_frames_low,
+ ethnl_update_u32(&coal_base->rx_max_coalesced_frames_low,
tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW], &mod);
- ethnl_update_u32(&coalesce.tx_coalesce_usecs_low,
+ ethnl_update_u32(&coal_base->tx_coalesce_usecs_low,
tb[ETHTOOL_A_COALESCE_TX_USECS_LOW], &mod);
- ethnl_update_u32(&coalesce.tx_max_coalesced_frames_low,
+ ethnl_update_u32(&coal_base->tx_max_coalesced_frames_low,
tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW], &mod);
- ethnl_update_u32(&coalesce.pkt_rate_high,
+ ethnl_update_u32(&coal_base->pkt_rate_high,
tb[ETHTOOL_A_COALESCE_PKT_RATE_HIGH], &mod);
- ethnl_update_u32(&coalesce.rx_coalesce_usecs_high,
+ ethnl_update_u32(&coal_base->rx_coalesce_usecs_high,
tb[ETHTOOL_A_COALESCE_RX_USECS_HIGH], &mod);
- ethnl_update_u32(&coalesce.rx_max_coalesced_frames_high,
+ ethnl_update_u32(&coal_base->rx_max_coalesced_frames_high,
tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH], &mod);
- ethnl_update_u32(&coalesce.tx_coalesce_usecs_high,
+ ethnl_update_u32(&coal_base->tx_coalesce_usecs_high,
tb[ETHTOOL_A_COALESCE_TX_USECS_HIGH], &mod);
- ethnl_update_u32(&coalesce.tx_max_coalesced_frames_high,
+ ethnl_update_u32(&coal_base->tx_max_coalesced_frames_high,
tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH], &mod);
- ethnl_update_u32(&coalesce.rate_sample_interval,
+ ethnl_update_u32(&coal_base->rate_sample_interval,
tb[ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL], &mod);
ret = 0;
if (!mod)
goto out_ops;
- ret = dev->ethtool_ops->set_coalesce(dev, &coalesce);
+ ret = dev->ethtool_ops->set_coalesce(dev, info->extack, &coalesce);
if (ret < 0)
goto out_ops;
ethtool_notify(dev, ETHTOOL_MSG_COALESCE_NTF, NULL);
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 771688e1b0da..cb378fd8fcae 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1513,71 +1513,74 @@ static int ethtool_set_eeprom(struct net_device *dev, void __user *useraddr)
static noinline_for_stack int ethtool_get_coalesce(struct net_device *dev,
void __user *useraddr)
{
- struct ethtool_coalesce coalesce = { .cmd = ETHTOOL_GCOALESCE };
+ struct kernel_ethtool_coalesce coalesce = {
+ .base = { .cmd = ETHTOOL_GCOALESCE }
+ };
int ret;
if (!dev->ethtool_ops->get_coalesce)
return -EOPNOTSUPP;
- ret = dev->ethtool_ops->get_coalesce(dev, &coalesce);
+ ret = dev->ethtool_ops->get_coalesce(dev, NULL, &coalesce);
if (ret)
return ret;
- if (copy_to_user(useraddr, &coalesce, sizeof(coalesce)))
+ if (copy_to_user(useraddr, &coalesce.base, sizeof(coalesce.base)))
return -EFAULT;
return 0;
}
static bool
ethtool_set_coalesce_supported(struct net_device *dev,
- struct ethtool_coalesce *coalesce)
+ struct kernel_ethtool_coalesce *coalesce)
{
u32 supported_params = dev->ethtool_ops->supported_coalesce_params;
+ const struct ethtool_coalesce *coal_base = &coalesce->base;
u32 nonzero_params = 0;
- if (coalesce->rx_coalesce_usecs)
+ if (coal_base->rx_coalesce_usecs)
nonzero_params |= ETHTOOL_COALESCE_RX_USECS;
- if (coalesce->rx_max_coalesced_frames)
+ if (coal_base->rx_max_coalesced_frames)
nonzero_params |= ETHTOOL_COALESCE_RX_MAX_FRAMES;
- if (coalesce->rx_coalesce_usecs_irq)
+ if (coal_base->rx_coalesce_usecs_irq)
nonzero_params |= ETHTOOL_COALESCE_RX_USECS_IRQ;
- if (coalesce->rx_max_coalesced_frames_irq)
+ if (coal_base->rx_max_coalesced_frames_irq)
nonzero_params |= ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ;
- if (coalesce->tx_coalesce_usecs)
+ if (coal_base->tx_coalesce_usecs)
nonzero_params |= ETHTOOL_COALESCE_TX_USECS;
- if (coalesce->tx_max_coalesced_frames)
+ if (coal_base->tx_max_coalesced_frames)
nonzero_params |= ETHTOOL_COALESCE_TX_MAX_FRAMES;
- if (coalesce->tx_coalesce_usecs_irq)
+ if (coal_base->tx_coalesce_usecs_irq)
nonzero_params |= ETHTOOL_COALESCE_TX_USECS_IRQ;
- if (coalesce->tx_max_coalesced_frames_irq)
+ if (coal_base->tx_max_coalesced_frames_irq)
nonzero_params |= ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ;
- if (coalesce->stats_block_coalesce_usecs)
+ if (coal_base->stats_block_coalesce_usecs)
nonzero_params |= ETHTOOL_COALESCE_STATS_BLOCK_USECS;
- if (coalesce->use_adaptive_rx_coalesce)
+ if (coal_base->use_adaptive_rx_coalesce)
nonzero_params |= ETHTOOL_COALESCE_USE_ADAPTIVE_RX;
- if (coalesce->use_adaptive_tx_coalesce)
+ if (coal_base->use_adaptive_tx_coalesce)
nonzero_params |= ETHTOOL_COALESCE_USE_ADAPTIVE_TX;
- if (coalesce->pkt_rate_low)
+ if (coal_base->pkt_rate_low)
nonzero_params |= ETHTOOL_COALESCE_PKT_RATE_LOW;
- if (coalesce->rx_coalesce_usecs_low)
+ if (coal_base->rx_coalesce_usecs_low)
nonzero_params |= ETHTOOL_COALESCE_RX_USECS_LOW;
- if (coalesce->rx_max_coalesced_frames_low)
+ if (coal_base->rx_max_coalesced_frames_low)
nonzero_params |= ETHTOOL_COALESCE_RX_MAX_FRAMES_LOW;
- if (coalesce->tx_coalesce_usecs_low)
+ if (coal_base->tx_coalesce_usecs_low)
nonzero_params |= ETHTOOL_COALESCE_TX_USECS_LOW;
- if (coalesce->tx_max_coalesced_frames_low)
+ if (coal_base->tx_max_coalesced_frames_low)
nonzero_params |= ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW;
- if (coalesce->pkt_rate_high)
+ if (coal_base->pkt_rate_high)
nonzero_params |= ETHTOOL_COALESCE_PKT_RATE_HIGH;
- if (coalesce->rx_coalesce_usecs_high)
+ if (coal_base->rx_coalesce_usecs_high)
nonzero_params |= ETHTOOL_COALESCE_RX_USECS_HIGH;
- if (coalesce->rx_max_coalesced_frames_high)
+ if (coal_base->rx_max_coalesced_frames_high)
nonzero_params |= ETHTOOL_COALESCE_RX_MAX_FRAMES_HIGH;
- if (coalesce->tx_coalesce_usecs_high)
+ if (coal_base->tx_coalesce_usecs_high)
nonzero_params |= ETHTOOL_COALESCE_TX_USECS_HIGH;
- if (coalesce->tx_max_coalesced_frames_high)
+ if (coal_base->tx_max_coalesced_frames_high)
nonzero_params |= ETHTOOL_COALESCE_TX_MAX_FRAMES_HIGH;
- if (coalesce->rate_sample_interval)
+ if (coal_base->rate_sample_interval)
nonzero_params |= ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL;
return (supported_params & nonzero_params) == nonzero_params;
@@ -1586,19 +1589,22 @@ ethtool_set_coalesce_supported(struct net_device *dev,
static noinline_for_stack int ethtool_set_coalesce(struct net_device *dev,
void __user *useraddr)
{
- struct ethtool_coalesce coalesce;
+ struct kernel_ethtool_coalesce coalesce = {};
int ret;
- if (!dev->ethtool_ops->set_coalesce)
+ if (!dev->ethtool_ops->get_coalesce || !dev->ethtool_ops->set_coalesce)
return -EOPNOTSUPP;
- if (copy_from_user(&coalesce, useraddr, sizeof(coalesce)))
+ ret = dev->ethtool_ops->get_coalesce(dev, NULL, &coalesce);
+ if (ret)
+ return ret;
+ if (copy_from_user(&coalesce.base, useraddr, sizeof(coalesce.base)))
return -EFAULT;
if (!ethtool_set_coalesce_supported(dev, &coalesce))
return -EOPNOTSUPP;
- ret = dev->ethtool_ops->set_coalesce(dev, &coalesce);
+ ret = dev->ethtool_ops->set_coalesce(dev, NULL, &coalesce);
if (!ret)
ethtool_notify(dev, ETHTOOL_MSG_COALESCE_NTF, NULL);
return ret;
@@ -2362,6 +2368,7 @@ ethtool_set_per_queue_coalesce(struct net_device *dev,
int i, ret = 0;
int n_queue;
struct ethtool_coalesce *backup = NULL, *tmp = NULL;
+ struct kernel_ethtool_coalesce coalesce = {};
DECLARE_BITMAP(queue_mask, MAX_NUM_QUEUE);
if ((!dev->ethtool_ops->set_per_queue_coalesce) ||
@@ -2377,15 +2384,14 @@ ethtool_set_per_queue_coalesce(struct net_device *dev,
return -ENOMEM;
for_each_set_bit(bit, queue_mask, MAX_NUM_QUEUE) {
- struct ethtool_coalesce coalesce;
-
ret = dev->ethtool_ops->get_per_queue_coalesce(dev, bit, tmp);
if (ret != 0)
goto roll_back;
tmp++;
- if (copy_from_user(&coalesce, useraddr, sizeof(coalesce))) {
+ if (copy_from_user(&coalesce.base, useraddr,
+ sizeof(coalesce.base))) {
ret = -EFAULT;
goto roll_back;
}
@@ -2395,7 +2401,8 @@ ethtool_set_per_queue_coalesce(struct net_device *dev,
goto roll_back;
}
- ret = dev->ethtool_ops->set_per_queue_coalesce(dev, bit, &coalesce);
+ ret = dev->ethtool_ops->set_per_queue_coalesce(dev, bit,
+ &coalesce.base);
if (ret != 0)
goto roll_back;
------------------------------------------------------------------------
^ permalink raw reply related
* Re: [PATCH net-next v2] net: dsa: avoid potential use-after-free error
From: Jakub Kicinski @ 2020-11-20 21:17 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Christian Eggers, Andrew Lunn, Florian Fainelli, Vivien Didelot,
David S . Miller, netdev, linux-kernel
In-Reply-To: <20201120210436.scmic7ygrzviy53o@skbuf>
On Fri, 20 Nov 2020 23:04:36 +0200 Vladimir Oltean wrote:
> On Fri, Nov 20, 2020 at 12:59:21PM -0800, Jakub Kicinski wrote:
> > On Fri, 20 Nov 2020 20:01:49 +0200 Vladimir Oltean wrote:
> > > On Thu, Nov 19, 2020 at 12:09:06PM +0100, Christian Eggers wrote:
> > > > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
> > > > immediately. Shouldn't store a pointer to freed memory.
> > > >
> > > > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > > > Fixes: 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX timestamping")
> > > > ---
> > >
> > > IMO this is one of the cases to which the following from
> > > Documentation/process/stable-kernel-rules.rst does not apply:
> > >
> > > - It must fix a real bug that bothers people (not a, "This could be a
> > > problem..." type thing).
> > >
> > > Therefore, specifying "net-next" as the target tree here as opposed to
> > > "net" is the correct choice.
> >
> > The commit message doesn't really explain what happens after.
> >
> > Is the dangling pointer ever accessed?
>
> Nothing happens afterwards. He explained that he accessed it once while
> working on his ksz9477 PTP series. There's no code affected by this in
> mainline.
Ah, great, I'll drop the Fixes tag altogether then.
^ permalink raw reply
* Re: [PATCH net] net: openvswitch: fix TTL decrement action netlink message format
From: Jakub Kicinski @ 2020-11-20 21:12 UTC (permalink / raw)
To: Eelco Chaudron
Cc: netdev, davem, dev, pshelar, bindiyakurle, i.maximets, mcroce
In-Reply-To: <160577663600.7755.4779460826621858224.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com>
On Thu, 19 Nov 2020 04:04:04 -0500 Eelco Chaudron wrote:
> Currently, the openvswitch module is not accepting the correctly formated
> netlink message for the TTL decrement action. For both setting and getting
> the dec_ttl action, the actions should be nested in the
> OVS_DEC_TTL_ATTR_ACTION attribute as mentioned in the openvswitch.h uapi.
IOW this change will not break any known user space, correct?
But existing OvS user space already expects it to work like you
make it work now?
What's the harm in leaving it as is?
> Fixes: 744676e77720 ("openvswitch: add TTL decrement action")
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Can we get a review from OvS folks? Matteo looks good to you (as the
original author)?
> - err = __ovs_nla_copy_actions(net, attr, key, sfa, eth_type,
> + err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type,
> vlan_tci, mpls_label_count, log);
> if (err)
> return err;
You're not canceling any nests on error, I assume this is normal.
> + add_nested_action_end(*sfa, action_start);
> add_nested_action_end(*sfa, start);
> return 0;
> }
^ permalink raw reply
* Re: [PATCH net-next v2] net: dsa: avoid potential use-after-free error
From: Vladimir Oltean @ 2020-11-20 21:04 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Christian Eggers, Andrew Lunn, Florian Fainelli, Vivien Didelot,
David S . Miller, netdev, linux-kernel
In-Reply-To: <20201120125921.1cb76a12@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Fri, Nov 20, 2020 at 12:59:21PM -0800, Jakub Kicinski wrote:
> On Fri, 20 Nov 2020 20:01:49 +0200 Vladimir Oltean wrote:
> > On Thu, Nov 19, 2020 at 12:09:06PM +0100, Christian Eggers wrote:
> > > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
> > > immediately. Shouldn't store a pointer to freed memory.
> > >
> > > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > > Fixes: 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX timestamping")
> > > ---
> >
> > IMO this is one of the cases to which the following from
> > Documentation/process/stable-kernel-rules.rst does not apply:
> >
> > - It must fix a real bug that bothers people (not a, "This could be a
> > problem..." type thing).
> >
> > Therefore, specifying "net-next" as the target tree here as opposed to
> > "net" is the correct choice.
>
> The commit message doesn't really explain what happens after.
>
> Is the dangling pointer ever accessed?
Nothing happens afterwards. He explained that he accessed it once while
working on his ksz9477 PTP series. There's no code affected by this in
mainline.
^ permalink raw reply
* Re: [PATCH 1/3] mwifiex: disable ps_mode explicitly by default instead
From: Brian Norris @ 2020-11-20 21:04 UTC (permalink / raw)
To: Tsuchiya Yuto
Cc: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
David S. Miller, Jakub Kicinski, linux-wireless,
<netdev@vger.kernel.org>, Linux Kernel, Maximilian Luz,
Andy Shevchenko, verdre
In-Reply-To: <8fa12bfff1cc30b655934e303cad78ae75b0fcde.camel@gmail.com>
On Fri, Oct 30, 2020 at 1:04 AM Tsuchiya Yuto <kitakar@gmail.com> wrote:
> On Thu, 2020-10-29 at 11:25 -0700, Brian Norris wrote:
> > For the record, Chrome OS supports plenty of mwifiex systems with 8897
> > (SDIO only) and 8997 (PCIe), with PS enabled, and you're hurting
> > those. Your problem sounds to be exclusively a problem with the PCIe
> > 8897 firmware.
>
> Actually, I already know that some Chromebooks use these mwifiex cards
> (but not out PCIe-88W8897) because I personally like chromiumos. I'm
> always wondering what is the difference. If the difference is firmware,
> our PCIe-88W8897 firmware should really be fixed instead of this stupid
> series.
PCIe is a very different beast. (For one, it uses DMA and
memory-mapped registers, where SDIO has neither.) It was a very
difficult slog to get PCIe/8997 working reliably for the few
Chromebooks that shipped it, and lots of that work is in firmware. I
would not be surprised if the PCIe-related changes Marvell made for
8997 never fed back into their PCIe-8897 firmware. Or maybe they only
ever launched PCIe-8897 for Windows, and the Windows driver included
workarounds that were never published to their Linux driver. But now
I'm just speculating.
> Yes, I'm sorry that I know this series is just a stupid one but I have to
> send this anyway because this stability issue has not been fixed for a
> long time. I should have added this buglink to every commit as well:
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=109681
>
> If the firmware can't be fixed, I'm afraid I have to go this way. It makes
> no sense to keep enabling power_save for the affected devices if we know
> it's broken.
Condolences and sympathy, seriously. You likely have little chance of
getting the firmware fixed, so without new information (e.g,. other
workarounds?), this is the probably the right way to go.
Brian
^ permalink raw reply
* Re: [PATCH net-next] net: stream: fix TCP references when INET is not enabled
From: patchwork-bot+netdevbpf @ 2020-11-20 21:00 UTC (permalink / raw)
To: Randy Dunlap; +Cc: netdev, edumazet, kuba
In-Reply-To: <20201118194438.674-1-rdunlap@infradead.org>
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 18 Nov 2020 11:44:38 -0800 you wrote:
> Fix build of net/core/stream.o when CONFIG_INET is not enabled.
> Fixes these build errors (sample):
>
> ld: net/core/stream.o: in function `sk_stream_write_space':
> (.text+0x27e): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x29c): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x2ab): undefined reference to `tcp_stream_memory_free'
> ld: net/core/stream.o: in function `sk_stream_wait_memory':
> (.text+0x5a1): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x5bf): undefined reference to `tcp_stream_memory_free'
>
> [...]
Here is the summary with links:
- [net-next] net: stream: fix TCP references when INET is not enabled
https://git.kernel.org/netdev/net-next/c/fc9840fbef0c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* Re: [PATCH net-next v2] net: dsa: avoid potential use-after-free error
From: Jakub Kicinski @ 2020-11-20 20:59 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Christian Eggers, Andrew Lunn, Florian Fainelli, Vivien Didelot,
David S . Miller, netdev, linux-kernel
In-Reply-To: <20201120180149.wp4ehikbc2ngvwtf@skbuf>
On Fri, 20 Nov 2020 20:01:49 +0200 Vladimir Oltean wrote:
> On Thu, Nov 19, 2020 at 12:09:06PM +0100, Christian Eggers wrote:
> > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
> > immediately. Shouldn't store a pointer to freed memory.
> >
> > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > Fixes: 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX timestamping")
> > ---
>
> IMO this is one of the cases to which the following from
> Documentation/process/stable-kernel-rules.rst does not apply:
>
> - It must fix a real bug that bothers people (not a, "This could be a
> problem..." type thing).
>
> Therefore, specifying "net-next" as the target tree here as opposed to
> "net" is the correct choice.
The commit message doesn't really explain what happens after.
Is the dangling pointer ever accessed?
^ permalink raw reply
* Re: [PATCH] mwifiex: pcie: add enable_device_dump module parameter
From: Brian Norris @ 2020-11-20 20:53 UTC (permalink / raw)
To: Tsuchiya Yuto
Cc: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
David S. Miller, Jakub Kicinski, linux-wireless,
<netdev@vger.kernel.org>, Linux Kernel, Maximilian Luz,
Andy Shevchenko, verdre
In-Reply-To: <7db5b6cba1548308a63855ec1dda836b6d6d9757.camel@gmail.com>
(Sorry if anything's a bit slow here. I don't really have time to
write out full proposals myself.)
On Fri, Oct 30, 2020 at 3:30 AM Tsuchiya Yuto <kitakar@gmail.com> wrote:
> Let me know if splitting this patch like this works. 1) The first patch
> is to add this module parameter but don't change the default behavior.
That *could* be OK with me, although it's already been said that there
are many people who dislike extra module parameters. I also don't see
why this needs to be a module parameter at all. If you do #2 right,
you don't really need this, as there are already several standard ways
of doing this (e.g., via Kconfig, or via nl80211 on a per-device
basis).
> 2) The second patch is to change the parameter value depending on the
> DMI matching or something so that it doesn't break the existing users.
Point 2 sounds good, and this is the key point. Note that you can do
point 2 without making it a module parameter. Just keep a flag in the
driver-private structures.
> But what I want to say here as well is that, if the firmware can be fixed,
> we don't need a patch like this.
Sure. That's also where we don't necessarily need more ways to control
this from user space (e.g., module parameters), but just better
detection of currently broken systems (in the driver). And if firmware
ever gets fixed, we can undo the "broken device" detection.
Brian
^ permalink raw reply
* Re: [kuba@kernel.org: Re: [PATCH net-next v2 0/3] net: introduce rps_default_mask]
From: Jakub Kicinski @ 2020-11-20 20:50 UTC (permalink / raw)
To: Marcel Apfelbaum
Cc: marcel, Saeed Mahameed, netdev, Paolo Abeni, Jonathan Corbet,
David S. Miller, Shuah Khan, Marcelo Tosatti, Daniel Borkmann
In-Reply-To: <CA+aaKfD_6qdNVRgr2TdDeuOau1UCFzRqWRB8iM-_GHV7mMrcsg@mail.gmail.com>
On Fri, 20 Nov 2020 19:39:24 +0200 Marcel Apfelbaum wrote:
> > The CPU isolation is done statically at system boot by setting
> > Linux kernel parameters, So the container management component, in
> > this case the Machine Configuration Operator (for Openshift) or the
> > K8s counterpart can't really help. (actually they would help if a
> > global RPS mask would exist)
> >
> > I tried to tweak the rps_cpus mask using the container management
> > stack, but there is no sane way to do it, please let me get a
> > little into the details.
> >
> > The k8s orchestration component that deals with injecting the
> > network device(s) into the container is CNI, which is interface
> > based and implemented by a lot of plugins, making it hardly
> > feasible to go over all the existing plugins and change them. Also
> > what about the 3rd party ones?
I'm not particularly amenable to the "changing user space is hard"
argument. Especially that you don't appear to have given it an honest
try.
> > Writing a new CNI plugin and chain it into the existing one is also
> > not an option AFAIK, they work at the network level and do not have
> > access to sysfs (they handle the network namespaces). Even if it
> > would be possible (I don't have a deep CNI understanding), it will
> > require a cluster global configuration that is actually needed only
> > for some of the cluster nodes.
> >
> > Another approach is to set the RPS configuration from the inside(of
> > the container), but the /sys mount is read only for unprivileged
> > containers, so we lose again.
> >
> > That leaves us with a host daemon hack:
> > Since the virtual network devices are created in the host namespace
> > and then "moved" into the container, we can listen to some udev
> > event and write to the rps_cpus file after the virtual netdev is
> > created and before it is moved (as stated above, the work is done
> > by a CNI plugin implementation). That is of course extremely racy
> > and not a valid solution.
> >
> >> > Possibly I can reduce the amount of new code introduced by this
> >> > patchset removing some code duplication
> >> > between rps_default_mask_sysctl() and flow_limit_cpu_sysctl().
> >> > Would that make this change more acceptable? Or should I drop
> >> > this altogether?
> >>
> >> I'm leaning towards drop altogether, unless you can get some
> >> support/review tags from other netdev developers. So far it
> >> appears we only got a down vote from Saeed.
As I said here, try to convince some other senior networking developers
this is the right solution and I'll apply it.
This is giving me flashbacks of trying bend the kernel for OpenStack
because there was no developer on my team who could change OpenStack.
> > Any solution that will allow the user space to avoid the
> > network soft IRQs on specific CPUs would be welcome.
> >
> > The proposed global mask is a solution, maybe there other ways?
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox