* [PATCH net v1 0/3] hinic:BugFixes
@ 2020-02-27 6:34 Luo bin
2020-02-27 6:34 ` [PATCH net v1 1/3] hinic: fix a irq affinity bug Luo bin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Luo bin @ 2020-02-27 6:34 UTC (permalink / raw)
To: davem; +Cc: linux-kernel, netdev, luoxianjun, Luo bin
the bug fixed in patch #2 has been present since the first commit.
the bugs fixed in patch #1 and patch #3 have been present since the
following commits:
patch #1: 352f58b0d9f2 ("net-next/hinic: Set Rxq irq to specific cpu for NUMA")
patch #3: 421e9526288b ("hinic: add rss support")
Luo bin (3):
hinic: fix a irq affinity bug
hinic: fix a bug of setting hw_ioctxt
hinic: fix a bug of rss configuration
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 1 +
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 +-
drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 +
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 1 +
drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 ++-
drivers/net/ethernet/huawei/hinic/hinic_rx.c | 5 ++---
6 files changed, 8 insertions(+), 5 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net v1 1/3] hinic: fix a irq affinity bug
2020-02-27 6:34 [PATCH net v1 0/3] hinic:BugFixes Luo bin
@ 2020-02-27 6:34 ` Luo bin
2020-02-27 6:34 ` [PATCH net v1 2/3] hinic: fix a bug of setting hw_ioctxt Luo bin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Luo bin @ 2020-02-27 6:34 UTC (permalink / raw)
To: davem; +Cc: linux-kernel, netdev, luoxianjun, Luo bin
can not use a local variable as an input parameter of
irq_set_affinity_hint
Signed-off-by: Luo bin <luobin9@huawei.com>
---
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 1 +
drivers/net/ethernet/huawei/hinic/hinic_rx.c | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h
index f4a339b10b10..79091e131418 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h
@@ -94,6 +94,7 @@ struct hinic_rq {
struct hinic_wq *wq;
+ struct cpumask affinity_mask;
u32 irq;
u16 msix_entry;
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
index 56ea6d692f1c..2695ad69fca6 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
@@ -475,7 +475,6 @@ static int rx_request_irq(struct hinic_rxq *rxq)
struct hinic_hwdev *hwdev = nic_dev->hwdev;
struct hinic_rq *rq = rxq->rq;
struct hinic_qp *qp;
- struct cpumask mask;
int err;
rx_add_napi(rxq);
@@ -492,8 +491,8 @@ static int rx_request_irq(struct hinic_rxq *rxq)
}
qp = container_of(rq, struct hinic_qp, rq);
- cpumask_set_cpu(qp->q_id % num_online_cpus(), &mask);
- return irq_set_affinity_hint(rq->irq, &mask);
+ cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
+ return irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
}
static void rx_free_irq(struct hinic_rxq *rxq)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net v1 2/3] hinic: fix a bug of setting hw_ioctxt
2020-02-27 6:34 [PATCH net v1 0/3] hinic:BugFixes Luo bin
2020-02-27 6:34 ` [PATCH net v1 1/3] hinic: fix a irq affinity bug Luo bin
@ 2020-02-27 6:34 ` Luo bin
2020-02-27 6:34 ` [PATCH net v1 3/3] hinic: fix a bug of rss configuration Luo bin
2020-02-27 19:08 ` [PATCH net v1 0/3] hinic:BugFixes David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Luo bin @ 2020-02-27 6:34 UTC (permalink / raw)
To: davem; +Cc: linux-kernel, netdev, luoxianjun, Luo bin
a reserved field is used to signify prime physical function index
in the latest firmware version, so we must assign a value to it
correctly
Signed-off-by: Luo bin <luobin9@huawei.com>
---
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 1 +
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 +-
drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
index 6f2cf569a283..79b3d53f2fbf 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
@@ -297,6 +297,7 @@ static int set_hw_ioctxt(struct hinic_hwdev *hwdev, unsigned int rq_depth,
}
hw_ioctxt.func_idx = HINIC_HWIF_FUNC_IDX(hwif);
+ hw_ioctxt.ppf_idx = HINIC_HWIF_PPF_IDX(hwif);
hw_ioctxt.set_cmdq_depth = HW_IOCTXT_SET_CMDQ_DEPTH_DEFAULT;
hw_ioctxt.cmdq_depth = 0;
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h
index b069045de416..66fd2340d447 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h
@@ -151,8 +151,8 @@ struct hinic_cmd_hw_ioctxt {
u8 lro_en;
u8 rsvd3;
+ u8 ppf_idx;
u8 rsvd4;
- u8 rsvd5;
u16 rq_depth;
u16 rx_buf_sz_idx;
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_if.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_if.h
index 517794509eb2..c7bb9ceca72c 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_if.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_if.h
@@ -137,6 +137,7 @@
#define HINIC_HWIF_FUNC_IDX(hwif) ((hwif)->attr.func_idx)
#define HINIC_HWIF_PCI_INTF(hwif) ((hwif)->attr.pci_intf_idx)
#define HINIC_HWIF_PF_IDX(hwif) ((hwif)->attr.pf_idx)
+#define HINIC_HWIF_PPF_IDX(hwif) ((hwif)->attr.ppf_idx)
#define HINIC_FUNC_TYPE(hwif) ((hwif)->attr.func_type)
#define HINIC_IS_PF(hwif) (HINIC_FUNC_TYPE(hwif) == HINIC_PF)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net v1 3/3] hinic: fix a bug of rss configuration
2020-02-27 6:34 [PATCH net v1 0/3] hinic:BugFixes Luo bin
2020-02-27 6:34 ` [PATCH net v1 1/3] hinic: fix a irq affinity bug Luo bin
2020-02-27 6:34 ` [PATCH net v1 2/3] hinic: fix a bug of setting hw_ioctxt Luo bin
@ 2020-02-27 6:34 ` Luo bin
2020-02-27 19:08 ` [PATCH net v1 0/3] hinic:BugFixes David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Luo bin @ 2020-02-27 6:34 UTC (permalink / raw)
To: davem; +Cc: linux-kernel, netdev, luoxianjun, Luo bin
should use real receive queue number to configure hw rss
indirect table rather than maximal queue number
Signed-off-by: Luo bin <luobin9@huawei.com>
---
drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 2411ad270c98..42d00b049c6e 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -356,7 +356,8 @@ static void hinic_enable_rss(struct hinic_dev *nic_dev)
if (!num_cpus)
num_cpus = num_online_cpus();
- nic_dev->num_qps = min_t(u16, nic_dev->max_qps, num_cpus);
+ nic_dev->num_qps = hinic_hwdev_num_qps(hwdev);
+ nic_dev->num_qps = min_t(u16, nic_dev->num_qps, num_cpus);
nic_dev->rss_limit = nic_dev->num_qps;
nic_dev->num_rss = nic_dev->num_qps;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net v1 0/3] hinic:BugFixes
2020-02-27 6:34 [PATCH net v1 0/3] hinic:BugFixes Luo bin
` (2 preceding siblings ...)
2020-02-27 6:34 ` [PATCH net v1 3/3] hinic: fix a bug of rss configuration Luo bin
@ 2020-02-27 19:08 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-02-27 19:08 UTC (permalink / raw)
To: luobin9; +Cc: linux-kernel, netdev, luoxianjun
From: Luo bin <luobin9@huawei.com>
Date: Thu, 27 Feb 2020 06:34:41 +0000
> the bug fixed in patch #2 has been present since the first commit.
> the bugs fixed in patch #1 and patch #3 have been present since the
> following commits:
> patch #1: 352f58b0d9f2 ("net-next/hinic: Set Rxq irq to specific cpu for NUMA")
> patch #3: 421e9526288b ("hinic: add rss support")
Series applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-27 19:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 6:34 [PATCH net v1 0/3] hinic:BugFixes Luo bin
2020-02-27 6:34 ` [PATCH net v1 1/3] hinic: fix a irq affinity bug Luo bin
2020-02-27 6:34 ` [PATCH net v1 2/3] hinic: fix a bug of setting hw_ioctxt Luo bin
2020-02-27 6:34 ` [PATCH net v1 3/3] hinic: fix a bug of rss configuration Luo bin
2020-02-27 19:08 ` [PATCH net v1 0/3] hinic:BugFixes David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.