Skip to content

Commit f4979b4

Browse files
committed
Merge branch 'hinic-BugFixes'
Luo bin says: ==================== hinic: BugFixes 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: 352f58b ("net-next/hinic: Set Rxq irq to specific cpu for NUMA") patch #3: 421e952 ("hinic: add rss support") ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents a2f2ef4 + 386d471 commit f4979b4

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ static int set_hw_ioctxt(struct hinic_hwdev *hwdev, unsigned int rq_depth,
297297
}
298298

299299
hw_ioctxt.func_idx = HINIC_HWIF_FUNC_IDX(hwif);
300+
hw_ioctxt.ppf_idx = HINIC_HWIF_PPF_IDX(hwif);
300301

301302
hw_ioctxt.set_cmdq_depth = HW_IOCTXT_SET_CMDQ_DEPTH_DEFAULT;
302303
hw_ioctxt.cmdq_depth = 0;

drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ struct hinic_cmd_hw_ioctxt {
151151

152152
u8 lro_en;
153153
u8 rsvd3;
154+
u8 ppf_idx;
154155
u8 rsvd4;
155-
u8 rsvd5;
156156

157157
u16 rq_depth;
158158
u16 rx_buf_sz_idx;

drivers/net/ethernet/huawei/hinic/hinic_hw_if.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
#define HINIC_HWIF_FUNC_IDX(hwif) ((hwif)->attr.func_idx)
138138
#define HINIC_HWIF_PCI_INTF(hwif) ((hwif)->attr.pci_intf_idx)
139139
#define HINIC_HWIF_PF_IDX(hwif) ((hwif)->attr.pf_idx)
140+
#define HINIC_HWIF_PPF_IDX(hwif) ((hwif)->attr.ppf_idx)
140141

141142
#define HINIC_FUNC_TYPE(hwif) ((hwif)->attr.func_type)
142143
#define HINIC_IS_PF(hwif) (HINIC_FUNC_TYPE(hwif) == HINIC_PF)

drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ struct hinic_rq {
9494

9595
struct hinic_wq *wq;
9696

97+
struct cpumask affinity_mask;
9798
u32 irq;
9899
u16 msix_entry;
99100

drivers/net/ethernet/huawei/hinic/hinic_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ static void hinic_enable_rss(struct hinic_dev *nic_dev)
356356
if (!num_cpus)
357357
num_cpus = num_online_cpus();
358358

359-
nic_dev->num_qps = min_t(u16, nic_dev->max_qps, num_cpus);
359+
nic_dev->num_qps = hinic_hwdev_num_qps(hwdev);
360+
nic_dev->num_qps = min_t(u16, nic_dev->num_qps, num_cpus);
360361

361362
nic_dev->rss_limit = nic_dev->num_qps;
362363
nic_dev->num_rss = nic_dev->num_qps;

drivers/net/ethernet/huawei/hinic/hinic_rx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ static int rx_request_irq(struct hinic_rxq *rxq)
475475
struct hinic_hwdev *hwdev = nic_dev->hwdev;
476476
struct hinic_rq *rq = rxq->rq;
477477
struct hinic_qp *qp;
478-
struct cpumask mask;
479478
int err;
480479

481480
rx_add_napi(rxq);
@@ -492,8 +491,8 @@ static int rx_request_irq(struct hinic_rxq *rxq)
492491
}
493492

494493
qp = container_of(rq, struct hinic_qp, rq);
495-
cpumask_set_cpu(qp->q_id % num_online_cpus(), &mask);
496-
return irq_set_affinity_hint(rq->irq, &mask);
494+
cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
495+
return irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
497496
}
498497

499498
static void rx_free_irq(struct hinic_rxq *rxq)

0 commit comments

Comments
 (0)