342604a4bb
* [Mellanox] Don't populate arm64 Kconfig when integrating hw-mgmt
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
* Intgerate HW-MGMT 7.0030.2008 Changes
## Patch List
* 0285-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch :
* 0286-pinctrl-Introduce-struct-pinfunction-and-PINCTRL_PIN.patch :
* 0287-pinctrl-mlxbf3-Add-pinctrl-driver-support.patch :
* 0288-UBUNTU-SAUCE-gpio-mmio-handle-ngpios-properly-in-bgp.patch :
* 0289-UBUNTU-SAUCE-gpio-mlxbf3-Add-gpio-driver-support.patch :
* 0291-mlxsw-core_hwmon-Align-modules-label-name-assignment.patch :
* 0292-mlxsw-i2c-Limit-single-transaction-buffer-size.patch :
* 0293-mlxsw-reg-Limit-MTBR-register-records-buffer-by-one-.patch :
* 0296-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch :
* 0298-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch :
* 0299-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch :
* 0300-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch :
* 0301-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch :
* 0302-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch :
* 0303-UBUNTU-SAUCE-Add-BF3-related-ACPI-config-and-Ring-de.patch :
* 0306-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch :
* 0307-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch :
* 0308-leds-mlxreg-Remove-code-for-amber-LED-colour.patch :
* 0308-platform_data-mlxreg-Add-capability-bit-and-mask-fie.patch :
* 0309-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch :
* 0310-hwmon-mlxreg-fan-Extend-number-of-supporetd-fans.patch :
* 0317-platform-mellanox-Introduce-support-for-switches-equ.patch :
* 0318-mellanox-Relocate-mlx-platform-driver.patch :
* 0319-UBUNTU-SAUCE-mlxbf-tmfifo-fix-potential-race.patch :
* 0320-UBUNTU-SAUCE-mlxbf-tmfifo-Drop-the-Rx-packet-if-no-m.patch :
* 0321-UBUNTU-SAUCE-mlxbf-tmfifo-Drop-jumbo-frames.patch :
* 0322-UBUNTU-SAUCE-mlxbf-tmfifo.c-Amend-previous-tmfifo-pa.patch :
* 0323-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch :
* 0324-mlxbf_gige-fix-white-space-in-mlxbf_gige_eth_ioctl.patch :
* 0325-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch :
* 0326-platform-mellanox-mlxreg-hotplug-Add-support-for-new.patch :
* 0327-platform-mellanox-mlx-platform-Change-register-name.patch :
* 0328-platform-mellanox-mlx-platform-Add-support-for-new-X.patch :
* [Mellanox] Remove thermal zone related code and replace with new one
* Revert "Revert "[Mellanox] Align PSU temperature sysfs node name with hw-management change (#16820)" (#16956)"
This reverts commit c2edc6f9d5
.
---------
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
Co-authored-by: Junchao-Mellanox <junchao@nvidia.com>
Co-authored-by: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com>
101 lines
3.5 KiB
Diff
101 lines
3.5 KiB
Diff
From a72d23ea2daedf011b2a3239c7f1dbfe28d36e7d Mon Sep 17 00:00:00 2001
|
|
From: Liming Sun <limings@nvidia.com>
|
|
Date: Sun, 4 Jun 2023 10:28:15 -0400
|
|
Subject: [PATCH] UBUNTU: SAUCE: mlxbf-tmfifo: Drop jumbo frames
|
|
X-NVConfidentiality: public
|
|
|
|
BugLink: https://bugs.launchpad.net/bugs/2021749
|
|
|
|
This commit drops over-sized network packets to avoid tmfifo
|
|
queue stuck.
|
|
|
|
Signed-off-by: Liming Sun <limings@nvidia.com>
|
|
Acked-by: Tim Gardner <tim.gardner@canonical.com>
|
|
Acked-by: Bartlomiej Zolnierkiewicz <bartlomiej.zolnierkiewicz@canonical.com>
|
|
[bzolnier: removed Change-Id from the commit description]
|
|
Signed-off-by: Bartlomiej Zolnierkiewicz <bartlomiej.zolnierkiewicz@canonical.com>
|
|
---
|
|
drivers/platform/mellanox/mlxbf-tmfifo.c | 24 +++++++++++++++++-------
|
|
1 file changed, 17 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
|
|
index 88610f45456b..4f3226007e32 100644
|
|
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
|
|
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
|
|
@@ -234,7 +234,7 @@ static u8 mlxbf_tmfifo_net_default_mac[ETH_ALEN] = {
|
|
static efi_char16_t mlxbf_tmfifo_efi_name[] = L"RshimMacAddr";
|
|
|
|
/* Maximum L2 header length. */
|
|
-#define MLXBF_TMFIFO_NET_L2_OVERHEAD 36
|
|
+#define MLXBF_TMFIFO_NET_L2_OVERHEAD (ETH_HLEN + VLAN_HLEN)
|
|
|
|
/* Supported virtio-net features. */
|
|
#define MLXBF_TMFIFO_NET_FEATURES \
|
|
@@ -773,13 +773,14 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring,
|
|
* flag is set.
|
|
*/
|
|
static void mlxbf_tmfifo_rxtx_header(struct mlxbf_tmfifo_vring *vring,
|
|
- struct vring_desc *desc,
|
|
+ struct vring_desc **desc,
|
|
bool is_rx, bool *vring_change)
|
|
{
|
|
struct mlxbf_tmfifo *fifo = vring->fifo;
|
|
struct virtio_net_config *config;
|
|
struct mlxbf_tmfifo_msg_hdr hdr;
|
|
int vdev_id, hdr_len;
|
|
+ bool drop_rx = false;
|
|
|
|
/* Read/Write packet header. */
|
|
if (is_rx) {
|
|
@@ -801,8 +802,8 @@ static void mlxbf_tmfifo_rxtx_header(struct mlxbf_tmfifo_vring *vring,
|
|
if (ntohs(hdr.len) >
|
|
__virtio16_to_cpu(virtio_legacy_is_little_endian(),
|
|
config->mtu) +
|
|
- MLXBF_TMFIFO_NET_L2_OVERHEAD)
|
|
- return;
|
|
+ MLXBF_TMFIFO_NET_L2_OVERHEAD)
|
|
+ drop_rx = true;
|
|
} else {
|
|
vdev_id = VIRTIO_ID_CONSOLE;
|
|
hdr_len = 0;
|
|
@@ -817,16 +818,25 @@ static void mlxbf_tmfifo_rxtx_header(struct mlxbf_tmfifo_vring *vring,
|
|
|
|
if (!tm_dev2)
|
|
return;
|
|
- vring->desc = desc;
|
|
+ vring->desc = *desc;
|
|
vring = &tm_dev2->vrings[MLXBF_TMFIFO_VRING_RX];
|
|
*vring_change = true;
|
|
}
|
|
+
|
|
+ if (drop_rx && !IS_VRING_DROP(vring)) {
|
|
+ if (vring->desc_head)
|
|
+ mlxbf_tmfifo_release_pkt(vring);
|
|
+ *desc = &vring->drop_desc;
|
|
+ vring->desc_head = *desc;
|
|
+ vring->desc = *desc;
|
|
+ }
|
|
+
|
|
vring->pkt_len = ntohs(hdr.len) + hdr_len;
|
|
} else {
|
|
/* Network virtio has an extra header. */
|
|
hdr_len = (vring->vdev_id == VIRTIO_ID_NET) ?
|
|
sizeof(struct virtio_net_hdr) : 0;
|
|
- vring->pkt_len = mlxbf_tmfifo_get_pkt_len(vring, desc);
|
|
+ vring->pkt_len = mlxbf_tmfifo_get_pkt_len(vring, *desc);
|
|
hdr.type = (vring->vdev_id == VIRTIO_ID_NET) ?
|
|
VIRTIO_ID_NET : VIRTIO_ID_CONSOLE;
|
|
hdr.len = htons(vring->pkt_len - hdr_len);
|
|
@@ -875,7 +885,7 @@ static bool mlxbf_tmfifo_rxtx_one_desc(struct mlxbf_tmfifo_vring *vring,
|
|
|
|
/* Beginning of a packet. Start to Rx/Tx packet header. */
|
|
if (vring->pkt_len == 0) {
|
|
- mlxbf_tmfifo_rxtx_header(vring, desc, is_rx, &vring_change);
|
|
+ mlxbf_tmfifo_rxtx_header(vring, &desc, is_rx, &vring_change);
|
|
(*avail)--;
|
|
|
|
/* Return if new packet is for another ring. */
|
|
--
|
|
2.14.1
|
|
|