!279 [sync] PR-278: fix virtio hardthrough scenes device init bug
From: @openeuler-sync-bot Reviewed-by: @LemmyHuang Signed-off-by: @LemmyHuang
This commit is contained in:
commit
17bf7ef373
@ -1,6 +1,6 @@
|
||||
Name: dpdk
|
||||
Version: 19.11
|
||||
Release: 24
|
||||
Release: 25
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%global source_version 19.11
|
||||
@ -53,6 +53,7 @@ Patch6004: backport-gro-fix-chain-index-for-more-than-2-packets.patch
|
||||
Patch6005: backport-gro-trim-tail-padding-bytes.patch
|
||||
Patch6006: backport-gro-check-payload-length-after-trim.patch
|
||||
Patch6007: backport-net-hinic-fix-crash-in-secondary-process.patch
|
||||
Patch6008: fix-virtio-hardthrough-scenes-device-init-bug.patch
|
||||
|
||||
Summary: Data Plane Development Kit core
|
||||
Group: System Environment/Libraries
|
||||
@ -222,6 +223,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko
|
||||
/usr/sbin/depmod
|
||||
|
||||
%changelog
|
||||
* Sat Dec 3 2022 wangzongchao <wangzongchao@huawei.com> - 19.11-25
|
||||
- fix the virtio hardthrough scenes device init bug
|
||||
|
||||
* Tue Nov 15 2022 jiangheng <jiangheng14@huawei.com> - 19.11-24
|
||||
- proc-info: build gazelle-proc-info for gazelle
|
||||
|
||||
|
||||
45
fix-virtio-hardthrough-scenes-device-init-bug.patch
Normal file
45
fix-virtio-hardthrough-scenes-device-init-bug.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From c168e40a0b80b02976ed1698339bc5182b2c0f39 Mon Sep 17 00:00:00 2001
|
||||
From: root <wangzongchao@huawei.com>
|
||||
Date: Sat, 3 Dec 2022 15:13:22 +0800
|
||||
Subject: [PATCH] fix virtio hardthrough scenes device init bug
|
||||
|
||||
---
|
||||
drivers/net/virtio/virtio_ethdev.c | 1 +
|
||||
drivers/net/virtio/virtio_pci.c | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
|
||||
index 89e4c23..b54abe5 100644
|
||||
--- a/drivers/net/virtio/virtio_ethdev.c
|
||||
+++ b/drivers/net/virtio/virtio_ethdev.c
|
||||
@@ -1331,6 +1331,7 @@ virtio_negotiate_features(struct virtio_hw *hw, uint64_t req_features)
|
||||
req_features);
|
||||
|
||||
/* Read device(host) feature bits */
|
||||
+ usleep(3000);
|
||||
host_features = VTPCI_OPS(hw)->get_features(hw);
|
||||
PMD_INIT_LOG(DEBUG, "host_features before negotiate = %" PRIx64,
|
||||
host_features);
|
||||
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
|
||||
index 4468e89..2fade8f 100644
|
||||
--- a/drivers/net/virtio/virtio_pci.c
|
||||
+++ b/drivers/net/virtio/virtio_pci.c
|
||||
@@ -2,6 +2,7 @@
|
||||
* Copyright(c) 2010-2014 Intel Corporation
|
||||
*/
|
||||
#include <stdint.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#ifdef RTE_EXEC_ENV_LINUX
|
||||
#include <dirent.h>
|
||||
@@ -472,6 +473,7 @@ vtpci_reset(struct virtio_hw *hw)
|
||||
{
|
||||
VTPCI_OPS(hw)->set_status(hw, VIRTIO_CONFIG_STATUS_RESET);
|
||||
/* flush status write */
|
||||
+ usleep(1000);
|
||||
VTPCI_OPS(hw)->get_status(hw);
|
||||
}
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user