Accepting request 490996 from home:ndas:branches:network
- sync mailbox definitions with Linux PF driver(bsc#1035993) [+0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch] - sync mailbox definitions with Linux PF driver(bsc#1035993) [+0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch] OBS-URL: https://build.opensuse.org/request/show/490996 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=47
This commit is contained in:
parent
24d384e762
commit
b62efd3af8
@ -0,0 +1,81 @@
|
||||
From 2d5a4b62ff2d7b79ca937a5c88654deecf4aa986 Mon Sep 17 00:00:00 2001
|
||||
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
|
||||
Date: Mon, 20 Mar 2017 19:40:40 +0530
|
||||
Subject: [PATCH] net/thunderx: sync mailbox definitions with Linux PF driver
|
||||
|
||||
- bgx_link_status mbox definition was changed in Linux
|
||||
commit 1cc702591bae ("net: thunderx: Add ethtool support")
|
||||
- NIC_MBOX_MSG_RES_BIT related changes were never part of Linux PF driver
|
||||
|
||||
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
|
||||
---
|
||||
drivers/net/thunderx/base/nicvf_mbox.c | 7 ++-----
|
||||
drivers/net/thunderx/base/nicvf_mbox.h | 11 +++--------
|
||||
2 files changed, 5 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
|
||||
index 3b7b8a518..8b3477d5f 100644
|
||||
--- a/drivers/net/thunderx/base/nicvf_mbox.c
|
||||
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
|
||||
@@ -62,9 +62,6 @@ static const char *mbox_message[NIC_MBOX_MSG_MAX] = {
|
||||
[NIC_MBOX_MSG_RESET_STAT_COUNTER] = "NIC_MBOX_MSG_RESET_STAT_COUNTER",
|
||||
[NIC_MBOX_MSG_CFG_DONE] = "NIC_MBOX_MSG_CFG_DONE",
|
||||
[NIC_MBOX_MSG_SHUTDOWN] = "NIC_MBOX_MSG_SHUTDOWN",
|
||||
- [NIC_MBOX_MSG_RES_BIT] = "NIC_MBOX_MSG_RES_BIT",
|
||||
- [NIC_MBOX_MSG_RSS_SIZE_RES_BIT] = "NIC_MBOX_MSG_RSS_SIZE",
|
||||
- [NIC_MBOX_MSG_ALLOC_SQS_RES_BIT] = "NIC_MBOX_MSG_ALLOC_SQS",
|
||||
};
|
||||
|
||||
static inline const char * __attribute__((unused))
|
||||
@@ -176,7 +173,7 @@ nicvf_handle_mbx_intr(struct nicvf *nic)
|
||||
case NIC_MBOX_MSG_NACK:
|
||||
nic->pf_nacked = true;
|
||||
break;
|
||||
- case NIC_MBOX_MSG_RSS_SIZE_RES_BIT:
|
||||
+ case NIC_MBOX_MSG_RSS_SIZE:
|
||||
nic->rss_info.rss_size = mbx.rss_size.ind_tbl_size;
|
||||
nic->pf_acked = true;
|
||||
break;
|
||||
@@ -186,7 +183,7 @@ nicvf_handle_mbx_intr(struct nicvf *nic)
|
||||
nic->speed = mbx.link_status.speed;
|
||||
nic->pf_acked = true;
|
||||
break;
|
||||
- case NIC_MBOX_MSG_ALLOC_SQS_RES_BIT:
|
||||
+ case NIC_MBOX_MSG_ALLOC_SQS:
|
||||
assert_primary(nic);
|
||||
if (mbx.sqs_alloc.qs_count != nic->sqs_count) {
|
||||
nicvf_log_error("Received %" PRIu8 "/%" PRIu8
|
||||
diff --git a/drivers/net/thunderx/base/nicvf_mbox.h b/drivers/net/thunderx/base/nicvf_mbox.h
|
||||
index 084f3a769..8675fe8fb 100644
|
||||
--- a/drivers/net/thunderx/base/nicvf_mbox.h
|
||||
+++ b/drivers/net/thunderx/base/nicvf_mbox.h
|
||||
@@ -68,16 +68,10 @@
|
||||
#define NIC_MBOX_MSG_ALLOC_SQS 0x12 /* Allocate secondary Qset */
|
||||
#define NIC_MBOX_MSG_LOOPBACK 0x16 /* Set interface in loopback */
|
||||
#define NIC_MBOX_MSG_RESET_STAT_COUNTER 0x17 /* Reset statistics counters */
|
||||
-#define NIC_MBOX_MSG_CFG_DONE 0x7E /* VF configuration done */
|
||||
-#define NIC_MBOX_MSG_SHUTDOWN 0x7F /* VF is being shutdown */
|
||||
-#define NIC_MBOX_MSG_RES_BIT 0x80 /* Reset bit from PF */
|
||||
+#define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */
|
||||
+#define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */
|
||||
#define NIC_MBOX_MSG_MAX 0x100 /* Maximum number of messages */
|
||||
|
||||
-#define NIC_MBOX_MSG_RSS_SIZE_RES_BIT \
|
||||
- (NIC_MBOX_MSG_RSS_SIZE | NIC_MBOX_MSG_RES_BIT)
|
||||
-#define NIC_MBOX_MSG_ALLOC_SQS_RES_BIT \
|
||||
- (NIC_MBOX_MSG_ALLOC_SQS | NIC_MBOX_MSG_RES_BIT)
|
||||
-
|
||||
/* Get vNIC VF configuration */
|
||||
struct nic_cfg_msg {
|
||||
uint8_t msg;
|
||||
@@ -157,6 +151,7 @@ struct rss_cfg_msg {
|
||||
/* Physical interface link status */
|
||||
struct bgx_link_status {
|
||||
uint8_t msg;
|
||||
+ uint8_t mac_type;
|
||||
uint8_t link_up;
|
||||
uint8_t duplex;
|
||||
uint32_t speed;
|
||||
--
|
||||
2.12.2
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
||||
|
||||
- sync mailbox definitions with Linux PF driver(bsc#1035993)
|
||||
[+0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 18 11:35:19 CEST 2017 - ndas@suse.de
|
||||
|
||||
|
@ -60,6 +60,7 @@ Source1: preamble
|
||||
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
||||
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||
Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc6
|
||||
@ -147,6 +148,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%patch1 -p1 -z .enic
|
||||
%patch2 -p1 -z .kni1
|
||||
%patch3 -p1 -z .kni2
|
||||
%patch4 -p1 -z .thunderx
|
||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
||||
|
||||
- sync mailbox definitions with Linux PF driver(bsc#1035993)
|
||||
[+0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 18 11:35:19 CEST 2017 - ndas@suse.de
|
||||
|
||||
|
@ -58,6 +58,7 @@ Source1: preamble
|
||||
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
||||
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||
Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc6
|
||||
@ -145,6 +146,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%patch1 -p1 -z .enic
|
||||
%patch2 -p1 -z .kni1
|
||||
%patch3 -p1 -z .kni2
|
||||
%patch4 -p1 -z .thunderx
|
||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user