vdpa/ifc: support multi-queue
Enable VHOST_USER_PROTOCOL_F_MQ feature. Expose IFCVF_MQ_OFFSET register to enable multi-queue. Signed-off-by: Andy Pei <andy.pei@intel.com> Signed-off-by: Huang Wei <wei.huang@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
This commit is contained in:
parent
5c806b9478
commit
b6b19e23e4
@ -90,6 +90,15 @@ next:
|
||||
if (!hw->lm_cfg)
|
||||
WARNINGOUT("HW support live migration not support!\n");
|
||||
|
||||
/* For some hardware implementation, for example:
|
||||
* the BAR 4 of PF is NULL, while BAR 4 of VF is not.
|
||||
* This code makes sure hw->mq_cfg is a valid address.
|
||||
*/
|
||||
if (hw->mem_resource[4].addr)
|
||||
hw->mq_cfg = hw->mem_resource[4].addr + IFCVF_MQ_OFFSET;
|
||||
else
|
||||
hw->mq_cfg = NULL;
|
||||
|
||||
if (hw->common_cfg == NULL || hw->notify_base == NULL ||
|
||||
hw->isr == NULL || hw->dev_cfg == NULL) {
|
||||
DEBUGOUT("capability incomplete\n");
|
||||
|
@ -50,6 +50,7 @@
|
||||
|
||||
#define IFCVF_LM_CFG_SIZE 0x40
|
||||
#define IFCVF_LM_RING_STATE_OFFSET 0x20
|
||||
#define IFCVF_MQ_OFFSET 0x28
|
||||
|
||||
#define IFCVF_LM_LOGGING_CTRL 0x0
|
||||
|
||||
@ -149,6 +150,7 @@ struct ifcvf_hw {
|
||||
u16 *notify_base;
|
||||
u16 *notify_addr[IFCVF_MAX_QUEUES * 2];
|
||||
u8 *lm_cfg;
|
||||
u8 *mq_cfg;
|
||||
struct vring_info vring[IFCVF_MAX_QUEUES * 2];
|
||||
u8 nr_vring;
|
||||
int device_type;
|
||||
|
@ -1248,6 +1248,7 @@ ifcvf_get_vdpa_features(struct rte_vdpa_device *vdev, uint64_t *features)
|
||||
1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \
|
||||
1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \
|
||||
1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD | \
|
||||
1ULL << VHOST_USER_PROTOCOL_F_MQ | \
|
||||
1ULL << VHOST_USER_PROTOCOL_F_STATUS)
|
||||
|
||||
#define VDPA_BLK_PROTOCOL_FEATURES \
|
||||
|
Loading…
x
Reference in New Issue
Block a user