mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
RDMA/core: Pass port to counter bind/unbind operations
This will be useful for the next patches in the series since port number is needed for optional counters binding and unbinding. Note that this change is needed since when the operation is done qp->port isn't necessarily initialized yet and can't be used. Signed-off-by: Patrisious Haddad <phaddad@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Link: https://patch.msgid.link/b6f6797844acbd517358e8d2a270ea9b3e6ecba1.1741875070.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
committed by
Leon Romanovsky
parent
da3711074f
commit
88ae02feda
@@ -2644,12 +2644,13 @@ struct ib_device_ops {
|
||||
* @counter - The counter to be bound. If counter->id is zero then
|
||||
* the driver needs to allocate a new counter and set counter->id
|
||||
*/
|
||||
int (*counter_bind_qp)(struct rdma_counter *counter, struct ib_qp *qp);
|
||||
int (*counter_bind_qp)(struct rdma_counter *counter, struct ib_qp *qp,
|
||||
u32 port);
|
||||
/**
|
||||
* counter_unbind_qp - Unbind the qp from the dynamically-allocated
|
||||
* counter and bind it onto the default one
|
||||
*/
|
||||
int (*counter_unbind_qp)(struct ib_qp *qp);
|
||||
int (*counter_unbind_qp)(struct ib_qp *qp, u32 port);
|
||||
/**
|
||||
* counter_dealloc -De-allocate the hw counter
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,7 @@ int rdma_counter_set_auto_mode(struct ib_device *dev, u32 port,
|
||||
bool bind_opcnt,
|
||||
struct netlink_ext_ack *extack);
|
||||
int rdma_counter_bind_qp_auto(struct ib_qp *qp, u32 port);
|
||||
int rdma_counter_unbind_qp(struct ib_qp *qp, bool force);
|
||||
int rdma_counter_unbind_qp(struct ib_qp *qp, u32 port, bool force);
|
||||
|
||||
int rdma_counter_query_stats(struct rdma_counter *counter);
|
||||
u64 rdma_counter_get_hwstat_value(struct ib_device *dev, u32 port, u32 index);
|
||||
|
||||
Reference in New Issue
Block a user