* [dpdk-dev] [PATCH 0/3] bnxt patchset
@ 2017-06-09 4:24 Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 1/3] net/bnxt: move PMD specific functions Ajit Khaparde
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Ajit Khaparde @ 2017-06-09 4:24 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
This patchset against dpdk-next-net addresses some issues found during
integration testing. The first patch cleans moves some PMD specific code
out of bnxt_ethdev.c and bnxt.h, while the second patch updates some HWRM
definitions in hsi_struct_def_dpdk.h and the last patch fixes an issue
with link status reporting.
Please apply.
--
net/bnxt: move PMD specific functions
net/bnxt: update HWRM defines
net/bnxt: fix incorrect reporting of link status
drivers/net/bnxt/bnxt.h | 26 --------------------------
drivers/net/bnxt/bnxt_ethdev.c | 18 ------------------
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
drivers/net/bnxt/hsi_struct_def_dpdk.h | 7 +++++--
drivers/net/bnxt/rte_pmd_bnxt.c | 18 ++++++++++++++++++
drivers/net/bnxt/rte_pmd_bnxt.h | 26 ++++++++++++++++++++++++++
6 files changed, 51 insertions(+), 48 deletions(-)
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 1/3] net/bnxt: move PMD specific functions
2017-06-09 4:24 [dpdk-dev] [PATCH 0/3] bnxt patchset Ajit Khaparde
@ 2017-06-09 4:24 ` Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 2/3] net/bnxt: update HWRM defines Ajit Khaparde
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Ajit Khaparde @ 2017-06-09 4:24 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
Move PMD specific functions in the appropriate rte_pmd_bnxt.c file
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 26 --------------------------
drivers/net/bnxt/bnxt_ethdev.c | 18 ------------------
drivers/net/bnxt/rte_pmd_bnxt.c | 18 ++++++++++++++++++
drivers/net/bnxt/rte_pmd_bnxt.h | 26 ++++++++++++++++++++++++++
4 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 54428ba..1538aa5 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -250,32 +250,6 @@ struct bnxt {
uint8_t num_leds;
};
-/*
- * Response sent back to the caller after callback
- */
-enum rte_pmd_bnxt_mb_event_rsp {
- RTE_PMD_BNXT_MB_EVENT_NOOP_ACK, /**< skip mbox request and ACK */
- RTE_PMD_BNXT_MB_EVENT_NOOP_NACK, /**< skip mbox request and NACK */
- RTE_PMD_BNXT_MB_EVENT_PROCEED, /**< proceed with mbox request */
- RTE_PMD_BNXT_MB_EVENT_MAX /**< max value of this enum */
-};
-
-/* mailbox message types */
-#define BNXT_VF_RESET 0x01 /* VF requests reset */
-#define BNXT_VF_SET_MAC_ADDR 0x02 /* VF requests PF to set MAC addr */
-#define BNXT_VF_SET_VLAN 0x03 /* VF requests PF to set VLAN */
-#define BNXT_VF_SET_MTU 0x04 /* VF requests PF to set MTU */
-#define BNXT_VF_SET_MRU 0x05 /* VF requests PF to set MRU */
-
-/*
- * Data sent to the caller when the callback is executed.
- */
-struct rte_pmd_bnxt_mb_event_param {
- uint16_t vf_id; /* Virtual Function number */
- int retval; /* return value */
- void *msg; /* pointer to message */
-};
-
int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete);
int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f9bedf7..79e800b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1899,24 +1899,6 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev) {
return rc;
}
-int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
-{
- struct rte_pmd_bnxt_mb_event_param cb_param;
-
- cb_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
- cb_param.vf_id = vf_id;
- cb_param.msg = msg;
-
- _rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
- &cb_param);
-
- /* Default to approve */
- if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
- cb_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
-
- return cb_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false;
-}
-
static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_pci_device *pci_dev)
{
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 0542034..faeb6f4 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -48,6 +48,24 @@
#include "rte_pmd_bnxt.h"
#include "hsi_struct_def_dpdk.h"
+int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
+{
+ struct rte_pmd_bnxt_mb_event_param cb_param;
+
+ cb_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
+ cb_param.vf_id = vf_id;
+ cb_param.msg = msg;
+
+ _rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+ &cb_param);
+
+ /* Default to approve */
+ if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
+ cb_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
+
+ return cb_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false;
+}
+
int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)
{
struct rte_eth_dev *eth_dev;
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index db9ce77..964aa97 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -36,6 +36,32 @@
#include <rte_ethdev.h>
+/*
+ * Response sent back to the caller after callback
+ */
+enum rte_pmd_bnxt_mb_event_rsp {
+ RTE_PMD_BNXT_MB_EVENT_NOOP_ACK, /**< skip mbox request and ACK */
+ RTE_PMD_BNXT_MB_EVENT_NOOP_NACK, /**< skip mbox request and NACK */
+ RTE_PMD_BNXT_MB_EVENT_PROCEED, /**< proceed with mbox request */
+ RTE_PMD_BNXT_MB_EVENT_MAX /**< max value of this enum */
+};
+
+/* mailbox message types */
+#define BNXT_VF_RESET 0x01 /* VF requests reset */
+#define BNXT_VF_SET_MAC_ADDR 0x02 /* VF requests PF to set MAC addr */
+#define BNXT_VF_SET_VLAN 0x03 /* VF requests PF to set VLAN */
+#define BNXT_VF_SET_MTU 0x04 /* VF requests PF to set MTU */
+#define BNXT_VF_SET_MRU 0x05 /* VF requests PF to set MRU */
+
+/*
+ * Data sent to the caller when the callback is executed.
+ */
+struct rte_pmd_bnxt_mb_event_param {
+ uint16_t vf_id; /* Virtual Function number */
+ int retval; /* return value */
+ void *msg; /* pointer to message */
+};
+
/**
* Enable/Disable VF MAC anti spoof
*
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 2/3] net/bnxt: update HWRM defines
2017-06-09 4:24 [dpdk-dev] [PATCH 0/3] bnxt patchset Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 1/3] net/bnxt: move PMD specific functions Ajit Khaparde
@ 2017-06-09 4:24 ` Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 3/3] net/bnxt: fix incorrect reporting of link status Ajit Khaparde
2017-06-09 11:35 ` [dpdk-dev] [PATCH 0/3] bnxt patchset Ferruh Yigit
3 siblings, 0 replies; 6+ messages in thread
From: Ajit Khaparde @ 2017-06-09 4:24 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
Some HWRM defines are missing from hsi_struct_def_dpdk.h
This patch adds them.
Also remove duplicate HWRM_RING_GRP_ALLOC entry.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/hsi_struct_def_dpdk.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
index 17a912f..e082d33 100644
--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
@@ -108,12 +108,13 @@
#define HWRM_VNIC_RSS_QCFG (UINT32_C(0x47))
#define HWRM_VNIC_PLCMODES_CFG (UINT32_C(0x48))
#define HWRM_VNIC_PLCMODES_QCFG (UINT32_C(0x49))
+#define HWRM_VNIC_QCAPS (UINT32_C(0x4a))
#define HWRM_RING_ALLOC (UINT32_C(0x50))
#define HWRM_RING_FREE (UINT32_C(0x51))
-#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAM (UINT32_C(0x53))
+#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS (UINT32_C(0x52))
+#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS (UINT32_C(0x53))
#define HWRM_RING_RESET (UINT32_C(0x5e))
#define HWRM_RING_GRP_ALLOC (UINT32_C(0x60))
-#define HWRM_RING_GRP_ALLOC (UINT32_C(0x60))
#define HWRM_RING_GRP_FREE (UINT32_C(0x61))
#define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC (UINT32_C(0x70))
#define HWRM_VNIC_RSS_COS_LB_CTX_FREE (UINT32_C(0x71))
@@ -135,6 +136,8 @@
#define HWRM_STAT_CTX_FREE (UINT32_C(0xb1))
#define HWRM_STAT_CTX_QUERY (UINT32_C(0xb2))
#define HWRM_STAT_CTX_CLR_STATS (UINT32_C(0xb3))
+#define HWRM_FW_RESET (UINT32_C(0xc0))
+#define HWRM_FW_QSTATUS (UINT32_C(0xc1))
#define HWRM_EXEC_FWD_RESP (UINT32_C(0xd0))
#define HWRM_REJECT_FWD_RESP (UINT32_C(0xd1))
#define HWRM_FWD_RESP (UINT32_C(0xd2))
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 3/3] net/bnxt: fix incorrect reporting of link status
2017-06-09 4:24 [dpdk-dev] [PATCH 0/3] bnxt patchset Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 1/3] net/bnxt: move PMD specific functions Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 2/3] net/bnxt: update HWRM defines Ajit Khaparde
@ 2017-06-09 4:24 ` Ajit Khaparde
2017-06-09 11:35 ` [dpdk-dev] [PATCH 0/3] bnxt patchset Ferruh Yigit
3 siblings, 0 replies; 6+ messages in thread
From: Ajit Khaparde @ 2017-06-09 4:24 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Stephen Hurd
This patch fixes incorrect reporting of link status
1) When link is down, set speed to zero. Otherwise a wrong non-zero speed
will be displayed.
2) DAC cables can detect there is a signal, but it necessarily does not
mean link is up. Code perviously treated this as link up.
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6d98d5a..f45b883 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -630,7 +630,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
HWRM_CHECK_RESULT;
link_info->phy_link_status = resp->link;
- if (link_info->phy_link_status != HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK) {
+ if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) {
link_info->link_up = 1;
link_info->link_speed = rte_le_to_cpu_16(resp->link_speed);
} else {
@@ -1831,7 +1831,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
link->link_speed =
bnxt_parse_hw_link_speed(link_info->link_speed);
else
- link->link_speed = ETH_LINK_SPEED_10M;
+ link->link_speed = ETH_SPEED_NUM_NONE;
link->link_duplex = bnxt_parse_hw_link_duplex(link_info->duplex);
link->link_status = link_info->link_up;
link->link_autoneg = link_info->auto_mode ==
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] bnxt patchset
2017-06-09 4:24 [dpdk-dev] [PATCH 0/3] bnxt patchset Ajit Khaparde
` (2 preceding siblings ...)
2017-06-09 4:24 ` [dpdk-dev] [PATCH 3/3] net/bnxt: fix incorrect reporting of link status Ajit Khaparde
@ 2017-06-09 11:35 ` Ferruh Yigit
3 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2017-06-09 11:35 UTC (permalink / raw)
To: Ajit Khaparde, dev
On 6/9/2017 5:24 AM, Ajit Khaparde wrote:
> This patchset against dpdk-next-net addresses some issues found during
> integration testing. The first patch cleans moves some PMD specific code
> out of bnxt_ethdev.c and bnxt.h, while the second patch updates some HWRM
> definitions in hsi_struct_def_dpdk.h and the last patch fixes an issue
> with link status reporting.
>
> Please apply.
>
> --
> net/bnxt: move PMD specific functions
> net/bnxt: update HWRM defines
> net/bnxt: fix incorrect reporting of link status
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 0/3] bnxt patchset
@ 2018-04-19 23:57 Ajit Khaparde
0 siblings, 0 replies; 6+ messages in thread
From: Ajit Khaparde @ 2018-04-19 23:57 UTC (permalink / raw)
To: dev
Please apply.
Ajit Khaparde (3):
net/bnxt: cache address of doorbell to subsequent access
net/bnxt: check vnic_id before issuing set_rx_mask
net/bnxt: initialize mbuf data_off
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_cpr.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 19 ++++++++++++++-----
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
drivers/net/bnxt/bnxt_ring.c | 17 +++++------------
drivers/net/bnxt/bnxt_rxr.c | 2 ++
6 files changed, 26 insertions(+), 18 deletions(-)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-19 23:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-09 4:24 [dpdk-dev] [PATCH 0/3] bnxt patchset Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 1/3] net/bnxt: move PMD specific functions Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 2/3] net/bnxt: update HWRM defines Ajit Khaparde
2017-06-09 4:24 ` [dpdk-dev] [PATCH 3/3] net/bnxt: fix incorrect reporting of link status Ajit Khaparde
2017-06-09 11:35 ` [dpdk-dev] [PATCH 0/3] bnxt patchset Ferruh Yigit
2018-04-19 23:57 Ajit Khaparde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).