From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
I'm seeing underruns with these 64bpp YUV formats on TGL.
The weird details:
- only happens on pipe B/C/D SDR planes, pipe A SDR planes
seem fine, as do all HDR planes
- somehow CDCLK related, higher CDCLK allows for bigger plane
with these formats without underruns. With 300MHz CDCLK I
can only go up to 1200 pixels wide or so, with 650MHz even
a 3840 pixel wide plane was OK
- ICL and ADL so far appear unaffected
So not really sure what's the deal with this, but bspec does
state "64-bit formats supported only on the HDR planes" so
let's just drop these formats from the SDR planes. We already
disallow 64bpp RGB formats.
Cc: stable(a)vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index ff9764cac1e7..80e558042d97 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -106,8 +106,6 @@ static const u32 icl_sdr_y_plane_formats[] = {
DRM_FORMAT_Y216,
DRM_FORMAT_XYUV8888,
DRM_FORMAT_XVYU2101010,
- DRM_FORMAT_XVYU12_16161616,
- DRM_FORMAT_XVYU16161616,
};
static const u32 icl_sdr_uv_plane_formats[] = {
@@ -134,8 +132,6 @@ static const u32 icl_sdr_uv_plane_formats[] = {
DRM_FORMAT_Y216,
DRM_FORMAT_XYUV8888,
DRM_FORMAT_XVYU2101010,
- DRM_FORMAT_XVYU12_16161616,
- DRM_FORMAT_XVYU16161616,
};
static const u32 icl_hdr_plane_formats[] = {
--
2.45.2
This is the start of the stable review cycle for the 6.1.121 release.
There are 76 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 19 Dec 2024 17:05:03 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.121-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.121-rc1
Dan Carpenter <dan.carpenter(a)linaro.org>
ALSA: usb-audio: Fix a DMA to stack memory bug
Juergen Gross <jgross(a)suse.com>
x86/xen: remove hypercall page
Juergen Gross <jgross(a)suse.com>
x86/xen: use new hypercall functions instead of hypercall page
Juergen Gross <jgross(a)suse.com>
x86/xen: add central hypercall functions
Juergen Gross <jgross(a)suse.com>
x86/xen: don't do PV iret hypercall through hypercall page
Juergen Gross <jgross(a)suse.com>
x86/static-call: provide a way to do very early static-call updates
Juergen Gross <jgross(a)suse.com>
objtool/x86: allow syscall instruction
Juergen Gross <jgross(a)suse.com>
x86: make get_cpu_vendor() accessible from Xen code
Juergen Gross <jgross(a)suse.com>
xen/netfront: fix crash when removing device
Nikolay Kuratov <kniv(a)yandex-team.ru>
tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
Eduard Zingerman <eddyz87(a)gmail.com>
bpf: sync_linked_regs() must preserve subreg_def
Nathan Chancellor <nathan(a)kernel.org>
blk-iocost: Avoid using clamp() on inuse in __propagate_weights()
Frédéric Danis <frederic.danis(a)collabora.com>
Bluetooth: SCO: Add support for 16 bits transparent voice setting
Iulia Tanasescu <iulia.tanasescu(a)nxp.com>
Bluetooth: iso: Fix recursive locking warning
Daniil Tatianin <d-tatianin(a)yandex-team.ru>
ACPICA: events/evxfregn: don't release the ContextMutex that was never acquired
Daniel Borkmann <daniel(a)iogearbox.net>
team: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
Daniel Borkmann <daniel(a)iogearbox.net>
bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
Martin Ottens <martin.ottens(a)fau.de>
net/sched: netem: account for backlog updates from child qdisc
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dsa: felix: fix stuck CPU-injected packets with short taprio windows
Paul Barker <paul.barker.ct(a)bp.renesas.com>
Documentation: PM: Clarify pm_runtime_resume_and_get() return value
Venkata Prasad Potturu <venkataprasad.potturu(a)amd.com>
ASoC: amd: yc: Fix the wrong return value
Stefan Wahren <wahrenst(a)gmx.net>
qca_spi: Make driver probing reliable
Stefan Wahren <wahrenst(a)gmx.net>
qca_spi: Fix clock speed for multiple QCA7000
Anumula Murali Mohan Reddy <anumula(a)chelsio.com>
cxgb4: use port number to set mac addr
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
ACPI: resource: Fix memory resource type union access
Daniel Machon <daniel.machon(a)microchip.com>
net: sparx5: fix the maximum frame length register
Daniel Machon <daniel.machon(a)microchip.com>
net: sparx5: fix FDMA performance issue
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
spi: aspeed: Fix an error handling path in aspeed_spi_[read|write]_user()
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: perform error cleanup in ocelot_hwstamp_set()
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: be resilient to loss of PTP packets during transmission
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: ocelot->ts_id_lock and ocelot_port->tx_skbs.lock are IRQ-safe
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: improve handling of TX timestamp for unknown skb
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: fix memory leak on ocelot_port_add_txtstamp_skb()
Eric Dumazet <edumazet(a)google.com>
net: defer final 'struct net' free in netns dismantle
Eric Dumazet <edumazet(a)google.com>
net: lapb: increase LAPB_HEADER_LEN
Thomas Weißschuh <linux(a)weissschuh.net>
ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init()
Jeremi Piotrowski <jpiotrowski(a)linux.microsoft.com>
ptp: kvm: Use decrypted memory in confidential guest on x86
Danielle Ratson <danieller(a)nvidia.com>
selftests: mlxsw: sharedbuffer: Ensure no extra packets are counted
Danielle Ratson <danieller(a)nvidia.com>
selftests: mlxsw: sharedbuffer: Remove duplicate test cases
Danielle Ratson <danieller(a)nvidia.com>
selftests: mlxsw: sharedbuffer: Remove h1 ingress test case
Dan Carpenter <dan.carpenter(a)linaro.org>
net/mlx5: DR, prevent potential error pointer dereference
Eric Dumazet <edumazet(a)google.com>
tipc: fix NULL deref in cleanup_bearer()
Remi Pommarel <repk(a)triplefau.lt>
batman-adv: Do not let TT changes list grows indefinitely
Remi Pommarel <repk(a)triplefau.lt>
batman-adv: Remove uninitialized data in full table TT response
Remi Pommarel <repk(a)triplefau.lt>
batman-adv: Do not send uninitialized TT changes
David (Ming Qiang) Wu <David.Wu3(a)amd.com>
amdgpu/uvd: get ring reference from rq scheduler
Suraj Sonawane <surajsonawane0215(a)gmail.com>
acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl
Benjamin Lin <benjamin-jw.lin(a)mediatek.com>
wifi: mac80211: fix station NSS capability initialization order
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: clean up 'ret' in sta_link_apply_parameters()
Lin Ma <linma(a)zju.edu.cn>
wifi: nl80211: fix NL80211_ATTR_MLO_LINK_ID off-by-one
Sungjong Seo <sj1557.seo(a)samsung.com>
exfat: fix potential deadlock on __exfat_get_dentry_set
Yuezhang Mo <Yuezhang.Mo(a)sony.com>
exfat: support dynamic allocate bh for exfat_entry_set_cache
Paulo Alcantara <pc(a)manguebit.com>
smb: client: fix UAF in smb2_reconnect_server()
Michal Luczaj <mhal(a)rbox.co>
bpf, sockmap: Fix update element with same
Jiri Olsa <jolsa(a)kernel.org>
bpf,perf: Fix invalid prog_array access in perf_event_detach_bpf_prog
Darrick J. Wong <djwong(a)kernel.org>
xfs: only run precommits once per transaction object
Darrick J. Wong <djwong(a)kernel.org>
xfs: fix scrub tracepoints when inode-rooted btrees are involved
Darrick J. Wong <djwong(a)kernel.org>
xfs: return from xfs_symlink_verify early on V4 filesystems
Darrick J. Wong <djwong(a)kernel.org>
xfs: don't drop errno values when we fail to ficlone the entire range
Darrick J. Wong <djwong(a)kernel.org>
xfs: update btree keys correctly when _insrec splits an inode root block
Jiasheng Jiang <jiashengjiangcool(a)outlook.com>
drm/i915: Fix memory leak by correcting cache object name in error handler
Neal Frager <neal.frager(a)amd.com>
usb: dwc3: xilinx: make sure pipe clock is deselected in usb2 only mode
Lianqin Hu <hulianqin(a)vivo.com>
usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer
Joe Hattori <joe(a)pf.is.s.u-tokyo.ac.jp>
usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_switch_probe()
Joe Hattori <joe(a)pf.is.s.u-tokyo.ac.jp>
usb: typec: anx7411: fix fwnode_handle reference leak
Vitalii Mordan <mordan(a)ispras.ru>
usb: ehci-hcd: fix call balance of clocks handling routines
Stefan Wahren <wahrenst(a)gmx.net>
usb: dwc2: Fix HCD port connection race
Stefan Wahren <wahrenst(a)gmx.net>
usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
Stefan Wahren <wahrenst(a)gmx.net>
usb: dwc2: Fix HCD resume
Joe Hattori <joe(a)pf.is.s.u-tokyo.ac.jp>
ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys()
Mark Tomlinson <mark.tomlinson(a)alliedtelesis.co.nz>
usb: host: max3421-hcd: Correctly abort a USB request.
Jaakko Salo <jaakkos(a)gmail.com>
ALSA: usb-audio: Add implicit feedback quirk for Yamaha THR5
Tejun Heo <tj(a)kernel.org>
blk-cgroup: Fix UAF in blkcg_unpin_online()
MoYuanhao <moyuanhao3676(a)163.com>
tcp: check space before adding MPTCP SYN options
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix racy issue from session lookup and expire
Jann Horn <jannh(a)google.com>
bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
-------------
Diffstat:
Documentation/power/runtime_pm.rst | 4 +-
Makefile | 4 +-
arch/x86/include/asm/processor.h | 2 +
arch/x86/include/asm/static_call.h | 15 ++
arch/x86/include/asm/sync_core.h | 6 +-
arch/x86/include/asm/xen/hypercall.h | 36 ++--
arch/x86/kernel/cpu/common.c | 38 ++--
arch/x86/kernel/static_call.c | 9 +
arch/x86/xen/enlighten.c | 65 ++++++-
arch/x86/xen/enlighten_hvm.c | 13 +-
arch/x86/xen/enlighten_pv.c | 4 +-
arch/x86/xen/enlighten_pvh.c | 7 -
arch/x86/xen/xen-asm.S | 50 ++++-
arch/x86/xen/xen-head.S | 106 ++++++++---
arch/x86/xen/xen-ops.h | 9 +
block/blk-cgroup.c | 6 +-
block/blk-iocost.c | 9 +-
drivers/acpi/acpica/evxfregn.c | 2 -
drivers/acpi/nfit/core.c | 7 +-
drivers/acpi/resource.c | 6 +-
drivers/ata/sata_highbank.c | 1 +
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
drivers/gpu/drm/i915/i915_scheduler.c | 2 +-
drivers/net/bonding/bond_main.c | 1 +
drivers/net/dsa/ocelot/felix_vsc9959.c | 17 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +-
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 5 +-
.../mellanox/mlx5/core/steering/dr_domain.c | 4 +-
.../net/ethernet/microchip/sparx5/sparx5_main.c | 11 +-
.../net/ethernet/microchip/sparx5/sparx5_port.c | 2 +-
drivers/net/ethernet/mscc/ocelot_ptp.c | 207 +++++++++++++--------
drivers/net/ethernet/qualcomm/qca_spi.c | 26 ++-
drivers/net/ethernet/qualcomm/qca_spi.h | 1 -
drivers/net/team/team.c | 3 +-
drivers/net/xen-netfront.c | 5 +-
drivers/ptp/ptp_kvm_arm.c | 4 +
drivers/ptp/ptp_kvm_common.c | 1 +
drivers/ptp/ptp_kvm_x86.c | 61 ++++--
drivers/spi/spi-aspeed-smc.c | 10 +-
drivers/usb/dwc2/hcd.c | 19 +-
drivers/usb/dwc3/dwc3-xilinx.c | 5 +-
drivers/usb/gadget/function/u_serial.c | 9 +-
drivers/usb/host/ehci-sh.c | 9 +-
drivers/usb/host/max3421-hcd.c | 16 +-
drivers/usb/typec/anx7411.c | 66 ++++---
fs/exfat/dir.c | 15 ++
fs/exfat/exfat_fs.h | 5 +-
fs/smb/client/connect.c | 78 ++++----
fs/smb/server/auth.c | 2 +
fs/smb/server/mgmt/user_session.c | 6 +-
fs/smb/server/server.c | 4 +-
fs/smb/server/smb2pdu.c | 27 +--
fs/xfs/libxfs/xfs_btree.c | 29 ++-
fs/xfs/libxfs/xfs_symlink_remote.c | 4 +-
fs/xfs/scrub/trace.h | 2 +-
fs/xfs/xfs_file.c | 8 +
fs/xfs/xfs_trans.c | 16 +-
include/linux/compiler.h | 39 ++--
include/linux/dsa/ocelot.h | 1 +
include/linux/ptp_kvm.h | 1 +
include/linux/static_call.h | 1 +
include/net/bluetooth/bluetooth.h | 1 +
include/net/lapb.h | 2 +-
include/net/net_namespace.h | 1 +
include/soc/mscc/ocelot.h | 2 -
kernel/bpf/verifier.c | 5 +-
kernel/static_call_inline.c | 2 +-
kernel/trace/bpf_trace.c | 11 ++
kernel/trace/trace_kprobe.c | 2 +-
net/batman-adv/translation-table.c | 58 ++++--
net/bluetooth/iso.c | 8 +-
net/bluetooth/sco.c | 29 +--
net/core/net_namespace.c | 21 ++-
net/core/sock_map.c | 1 +
net/ipv4/tcp_output.c | 6 +-
net/mac80211/cfg.c | 9 +-
net/sched/sch_netem.c | 22 ++-
net/tipc/udp_media.c | 7 +-
net/wireless/nl80211.c | 2 +-
sound/soc/amd/yc/acp6x-mach.c | 13 +-
sound/usb/quirks.c | 44 +++--
tools/objtool/check.c | 11 +-
.../selftests/drivers/net/mlxsw/sharedbuffer.sh | 55 ++++--
84 files changed, 980 insertions(+), 459 deletions(-)
Hey Greg, Sasha,
We are doing some work to further automate stable-rc testing, triage, validation and reporting of stable-rc branches in the new KernelCI system. As part of that, we want to start relying on the X-KernelTest-* mail header parameters, however there is no parameter with the git commit hash of the brach head.
Today, there is only information about the tree and branch, but no tags or commits. Essentially, we want to parse the email headers and immediately be able to request results from the KernelCI Dashboard API passing the head commit being tested.
Is it possible to add 'X-KernelTest-Commit'?
Thank you.
- Gus
--
Gustavo Padovan
Kernel Lead
Collabora Ltd.
Platinum Building, St John's Innovation Park
Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718
This patch series is to fix bugs and improve codes regarding various
driver core device iterating APIs
Signed-off-by: Zijun Hu <quic_zijuhu(a)quicinc.com>
---
Changes in v4:
- Squich patches 3-5 into one based on Jonathan and Fan comments.
- Add one more patch
- Link to v3: https://lore.kernel.org/r/20241212-class_fix-v3-0-04e20c4f0971@quicinc.com
Changes in v3:
- Correct commit message, add fix tag, and correct pr_crit() message for 1st patch
- Add more patches regarding driver core device iterating APIs.
- Link to v2: https://lore.kernel.org/r/20241112-class_fix-v2-0-73d198d0a0d5@quicinc.com
Changes in v2:
- Remove both fix and stable tag for patch 1/3
- drop patch 3/3
- Link to v1: https://lore.kernel.org/r/20241105-class_fix-v1-0-80866f9994a5@quicinc.com
---
Zijun Hu (8):
driver core: class: Fix wild pointer dereferences in API class_dev_iter_next()
blk-cgroup: Fix class @block_class's subsystem refcount leakage
driver core: Move true expression out of if condition in 3 device finding APIs
driver core: Rename declaration parameter name for API device_find_child() cluster
driver core: Correct parameter check for API device_for_each_child_reverse_from()
driver core: Correct API device_for_each_child_reverse_from() prototype
driver core: Introduce device_iter_t for device iterating APIs
driver core: Move 2 one line device finding APIs to header
block/blk-cgroup.c | 1 +
drivers/base/bus.c | 9 +++++---
drivers/base/class.c | 11 ++++++++--
drivers/base/core.c | 49 +++++++++----------------------------------
drivers/base/driver.c | 9 +++++---
drivers/cxl/core/hdm.c | 2 +-
drivers/cxl/core/region.c | 2 +-
include/linux/device.h | 28 ++++++++++++++++---------
include/linux/device/bus.h | 7 +++++--
include/linux/device/class.h | 4 ++--
include/linux/device/driver.h | 2 +-
11 files changed, 60 insertions(+), 64 deletions(-)
---
base-commit: cdd30ebb1b9f36159d66f088b61aee264e649d7a
change-id: 20241104-class_fix-f176bd9eba22
prerequisite-change-id: 20241201-const_dfc_done-aaec71e3bbea:v4
prerequisite-patch-id: 536aa56c0d055f644a1f71ab5c88b7cac9510162
prerequisite-patch-id: 39b0cf088c72853d9ce60c9e633ad2070a0278a8
prerequisite-patch-id: 60b22c42b67ad56a3d2a7b80a30ad588cbe740ec
prerequisite-patch-id: 119a167d7248481987b5e015db0e4fdb0d6edab8
prerequisite-patch-id: 133248083f3d3c57beb16473c2a4c62b3abc5fd0
prerequisite-patch-id: 4cda541f55165650bfa69fb19cbe0524eff0cb85
prerequisite-patch-id: 2b4193c6ea6370c07e6b66de04be89fb09448f54
prerequisite-patch-id: 73c675db18330c89fd8ca4790914d1d486ce0db8
prerequisite-patch-id: 88c50fc851fd7077797fd4e63fb12966b1b601bd
prerequisite-patch-id: 47b93916c1b5fb809d7c99aeaa05c729b1af01c5
prerequisite-patch-id: 52ffb42b5aae69cae708332e0ddc7016139999f1
Best regards,
--
Zijun Hu <quic_zijuhu(a)quicinc.com>
When device_add(&udev->dev) succeeds and a later call fails,
usb_new_device() does not properly call device_del(). As comment of
device_add() says, 'if device_add() succeeds, you should call
device_del() when you want to get rid of it. If device_add() has not
succeeded, use only put_device() to drop the reference count'.
Found by code review.
Cc: stable(a)vger.kernel.org
Fixes: 9f8b17e643fe ("USB: make usbdevices export their device nodes instead of using a separate class")
Signed-off-by: Ma Ke <make_ruc2021(a)163.com>
---
Changes in v3:
- modified the bug description according to the changes of the patch;
- removed redundant put_device() in patch v2 as suggestions.
Changes in v2:
- modified the bug description to make it more clear;
- added the missed part of the patch.
---
drivers/usb/core/hub.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4b93c0bd1d4b..21ac9b464696 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2663,13 +2663,13 @@ int usb_new_device(struct usb_device *udev)
err = sysfs_create_link(&udev->dev.kobj,
&port_dev->dev.kobj, "port");
if (err)
- goto fail;
+ goto out_del_dev;
err = sysfs_create_link(&port_dev->dev.kobj,
&udev->dev.kobj, "device");
if (err) {
sysfs_remove_link(&udev->dev.kobj, "port");
- goto fail;
+ goto out_del_dev;
}
if (!test_and_set_bit(port1, hub->child_usage_bits))
@@ -2683,6 +2683,8 @@ int usb_new_device(struct usb_device *udev)
pm_runtime_put_sync_autosuspend(&udev->dev);
return err;
+out_del_dev:
+ device_del(&udev->dev);
fail:
usb_set_device_state(udev, USB_STATE_NOTATTACHED);
pm_runtime_disable(&udev->dev);
--
2.25.1
From: Kan Liang <kan.liang(a)linux.intel.com>
The only difference between 5 and 6 is the new counters snapshotting
group, without the following counters snapshotting enabling patches,
it's impossible to utilize the feature in a PEBS record. It's safe to
share the same code path with format 5.
Add format 6, so the end user can at least utilize the legacy PEBS
features.
Fixes: a932aa0e868f ("perf/x86: Add Lunar Lake and Arrow Lake support")
Signed-off-by: Kan Liang <kan.liang(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
No changes since V5
arch/x86/events/intel/ds.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 8dcf90f6fb59..ba74e1198328 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -2551,6 +2551,7 @@ void __init intel_ds_init(void)
x86_pmu.large_pebs_flags |= PERF_SAMPLE_TIME;
break;
+ case 6:
case 5:
x86_pmu.pebs_ept = 1;
fallthrough;
--
2.38.1
From: Joshua Washington <joshwash(a)google.com>
This patch fixes a number of consistency issues in the queue allocation
path related to XDP.
As it stands, the number of allocated XDP queues changes in three
different scenarios.
1) Adding an XDP program while the interface is up via
gve_add_xdp_queues
2) Removing an XDP program while the interface is up via
gve_remove_xdp_queues
3) After queues have been allocated and the old queue memory has been
removed in gve_queues_start.
However, the requirement for the interface to be up for
gve_(add|remove)_xdp_queues to be called, in conjunction with the fact
that the number of queues stored in priv isn't updated until _after_ XDP
queues have been allocated in the normal queue allocation path means
that if an XDP program is added while the interface is down, XDP queues
won't be added until the _second_ if_up, not the first.
Given the expectation that the number of XDP queues is equal to the
number of RX queues, scenario (3) has another problematic implication.
When changing the number of queues while an XDP program is loaded, the
number of XDP queues must be updated as well, as there is logic in the
driver (gve_xdp_tx_queue_id()) which relies on every RX queue having a
corresponding XDP TX queue. However, the number of XDP queues stored in
priv would not be updated until _after_ a close/open leading to a
mismatch in the number of XDP queues reported vs the number of XDP
queues which actually exist after the queue count update completes.
This patch remedies these issues by doing the following:
1) The allocation config getter function is set up to retrieve the
_expected_ number of XDP queues to allocate instead of relying
on the value stored in `priv` which is only updated once the queues
have been allocated.
2) When adjusting queues, XDP queues are adjusted to match the number of
RX queues when XDP is enabled. This only works in the case when
queues are live, so part (1) of the fix must still be available in
the case that queues are adjusted when there is an XDP program and
the interface is down.
Fixes: 5f08cd3d6423 ("gve: Alloc before freeing when adjusting queues")
Cc: stable(a)vger.kernel.org
Signed-off-by: Joshua Washington <joshwash(a)google.com>
Signed-off-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Reviewed-by: Shailend Chand <shailend(a)google.com>
Reviewed-by: Willem de Bruijn <willemb(a)google.com>
---
drivers/net/ethernet/google/gve/gve_main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 5cab7b88610f..09fb7f16f73e 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -930,11 +930,13 @@ static void gve_init_sync_stats(struct gve_priv *priv)
static void gve_tx_get_curr_alloc_cfg(struct gve_priv *priv,
struct gve_tx_alloc_rings_cfg *cfg)
{
+ int num_xdp_queues = priv->xdp_prog ? priv->rx_cfg.num_queues : 0;
+
cfg->qcfg = &priv->tx_cfg;
cfg->raw_addressing = !gve_is_qpl(priv);
cfg->ring_size = priv->tx_desc_cnt;
cfg->start_idx = 0;
- cfg->num_rings = gve_num_tx_queues(priv);
+ cfg->num_rings = priv->tx_cfg.num_queues + num_xdp_queues;
cfg->tx = priv->tx;
}
@@ -1843,6 +1845,7 @@ int gve_adjust_queues(struct gve_priv *priv,
{
struct gve_tx_alloc_rings_cfg tx_alloc_cfg = {0};
struct gve_rx_alloc_rings_cfg rx_alloc_cfg = {0};
+ int num_xdp_queues;
int err;
gve_get_curr_alloc_cfgs(priv, &tx_alloc_cfg, &rx_alloc_cfg);
@@ -1853,6 +1856,10 @@ int gve_adjust_queues(struct gve_priv *priv,
rx_alloc_cfg.qcfg = &new_rx_config;
tx_alloc_cfg.num_rings = new_tx_config.num_queues;
+ /* Add dedicated XDP TX queues if enabled. */
+ num_xdp_queues = priv->xdp_prog ? new_rx_config.num_queues : 0;
+ tx_alloc_cfg.num_rings += num_xdp_queues;
+
if (netif_running(priv->dev)) {
err = gve_adjust_config(priv, &tx_alloc_cfg, &rx_alloc_cfg);
return err;
--
2.47.1.613.gc27f4b7a9f-goog
From: Joshua Washington <joshwash(a)google.com>
When busy polling is enabled, xsk_sendmsg for AF_XDP zero copy marks
the NAPI ID corresponding to the memory pool allocated for the socket.
In GVE, this NAPI ID will never correspond to a NAPI ID of one of the
dedicated XDP TX queues registered with the umem because XDP TX is not
set up to share a NAPI with a corresponding RX queue.
This patch moves XSK TX descriptor processing from the TX NAPI to the RX
NAPI, and the gve_xsk_wakeup callback is updated to use the RX NAPI
instead of the TX NAPI, accordingly. The branch on if the wakeup is for
TX is removed, as the NAPI poll should be invoked whether the wakeup is
for TX or for RX.
Fixes: fd8e40321a12 ("gve: Add AF_XDP zero-copy support for GQI-QPL format")
Cc: stable(a)vger.kernel.org
Signed-off-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Signed-off-by: Joshua Washington <joshwash(a)google.com>
Reviewed-by: Willem de Bruijn <willemb(a)google.com>
---
drivers/net/ethernet/google/gve/gve.h | 1 +
drivers/net/ethernet/google/gve/gve_main.c | 8 +++++
drivers/net/ethernet/google/gve/gve_tx.c | 36 +++++++++++++---------
3 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index dd92949bb214..8167cc5fb0df 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -1140,6 +1140,7 @@ int gve_xdp_xmit_one(struct gve_priv *priv, struct gve_tx_ring *tx,
void gve_xdp_tx_flush(struct gve_priv *priv, u32 xdp_qid);
bool gve_tx_poll(struct gve_notify_block *block, int budget);
bool gve_xdp_poll(struct gve_notify_block *block, int budget);
+int gve_xsk_tx_poll(struct gve_notify_block *block, int budget);
int gve_tx_alloc_rings_gqi(struct gve_priv *priv,
struct gve_tx_alloc_rings_cfg *cfg);
void gve_tx_free_rings_gqi(struct gve_priv *priv,
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index e4e8ff4f9f80..5cab7b88610f 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -333,6 +333,14 @@ int gve_napi_poll(struct napi_struct *napi, int budget)
if (block->rx) {
work_done = gve_rx_poll(block, budget);
+
+ /* Poll XSK TX as part of RX NAPI. Setup re-poll based on max of
+ * TX and RX work done.
+ */
+ if (priv->xdp_prog)
+ work_done = max_t(int, work_done,
+ gve_xsk_tx_poll(block, budget));
+
reschedule |= work_done == budget;
}
diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c
index 852f8c7e39d2..4350ebd9c2bd 100644
--- a/drivers/net/ethernet/google/gve/gve_tx.c
+++ b/drivers/net/ethernet/google/gve/gve_tx.c
@@ -981,33 +981,41 @@ static int gve_xsk_tx(struct gve_priv *priv, struct gve_tx_ring *tx,
return sent;
}
+int gve_xsk_tx_poll(struct gve_notify_block *rx_block, int budget)
+{
+ struct gve_rx_ring *rx = rx_block->rx;
+ struct gve_priv *priv = rx->gve;
+ struct gve_tx_ring *tx;
+ int sent = 0;
+
+ tx = &priv->tx[gve_xdp_tx_queue_id(priv, rx->q_num)];
+ if (tx->xsk_pool) {
+ sent = gve_xsk_tx(priv, tx, budget);
+
+ u64_stats_update_begin(&tx->statss);
+ tx->xdp_xsk_sent += sent;
+ u64_stats_update_end(&tx->statss);
+ if (xsk_uses_need_wakeup(tx->xsk_pool))
+ xsk_set_tx_need_wakeup(tx->xsk_pool);
+ }
+
+ return sent;
+}
+
bool gve_xdp_poll(struct gve_notify_block *block, int budget)
{
struct gve_priv *priv = block->priv;
struct gve_tx_ring *tx = block->tx;
u32 nic_done;
- bool repoll;
u32 to_do;
/* Find out how much work there is to be done */
nic_done = gve_tx_load_event_counter(priv, tx);
to_do = min_t(u32, (nic_done - tx->done), budget);
gve_clean_xdp_done(priv, tx, to_do);
- repoll = nic_done != tx->done;
-
- if (tx->xsk_pool) {
- int sent = gve_xsk_tx(priv, tx, budget);
-
- u64_stats_update_begin(&tx->statss);
- tx->xdp_xsk_sent += sent;
- u64_stats_update_end(&tx->statss);
- repoll |= (sent == budget);
- if (xsk_uses_need_wakeup(tx->xsk_pool))
- xsk_set_tx_need_wakeup(tx->xsk_pool);
- }
/* If we still have work we want to repoll */
- return repoll;
+ return nic_done != tx->done;
}
bool gve_tx_poll(struct gve_notify_block *block, int budget)
--
2.47.1.613.gc27f4b7a9f-goog