git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hinic: allocate IO memory with socket id
[dpdk.git]
/
drivers
/
net
/
hinic
/
hinic_pmd_tx.c
diff --git
a/drivers/net/hinic/hinic_pmd_tx.c
b/drivers/net/hinic/hinic_pmd_tx.c
index
985540a
..
64ec2c1
100644
(file)
--- a/
drivers/net/hinic/hinic_pmd_tx.c
+++ b/
drivers/net/hinic/hinic_pmd_tx.c
@@
-1216,7
+1216,8
@@
int hinic_setup_tx_resources(struct hinic_txq *txq)
u64 tx_info_sz;
tx_info_sz = txq->q_depth * sizeof(*txq->tx_info);
u64 tx_info_sz;
tx_info_sz = txq->q_depth * sizeof(*txq->tx_info);
- txq->tx_info = kzalloc_aligned(tx_info_sz, GFP_KERNEL);
+ txq->tx_info = rte_zmalloc_socket("tx_info", tx_info_sz,
+ RTE_CACHE_LINE_SIZE, txq->socket_id);
if (!txq->tx_info)
return -ENOMEM;
if (!txq->tx_info)
return -ENOMEM;
@@
-1228,11
+1229,12
@@
void hinic_free_tx_resources(struct hinic_txq *txq)
if (txq->tx_info == NULL)
return;
if (txq->tx_info == NULL)
return;
-
k
free(txq->tx_info);
+
rte_
free(txq->tx_info);
txq->tx_info = NULL;
}
txq->tx_info = NULL;
}
-int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id, u16 sq_depth)
+int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id,
+ u16 sq_depth, unsigned int socket_id)
{
int err;
struct hinic_nic_io *nic_io = hwdev->nic_io;
{
int err;
struct hinic_nic_io *nic_io = hwdev->nic_io;
@@
-1246,7
+1248,8
@@
int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id, u16 sq_depth)
/* alloc wq */
err = hinic_wq_allocate(nic_io->hwdev, &nic_io->sq_wq[q_id],
/* alloc wq */
err = hinic_wq_allocate(nic_io->hwdev, &nic_io->sq_wq[q_id],
- HINIC_SQ_WQEBB_SHIFT, nic_io->sq_depth);
+ HINIC_SQ_WQEBB_SHIFT, nic_io->sq_depth,
+ socket_id);
if (err) {
PMD_DRV_LOG(ERR, "Failed to allocate WQ for SQ");
return err;
if (err) {
PMD_DRV_LOG(ERR, "Failed to allocate WQ for SQ");
return err;