search for: mdev_count

Displaying 10 results from an estimated 10 matches for "mdev_count".

Did you mean: dev_count
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...obj, >>> +??????????????????? struct device *dev, char *buf) >>> +{ >>> +??? struct pci_dev *pdev = to_pci_dev(dev); >>> +??? struct ifcvf_adapter *adapter = pci_get_drvdata(pdev); >>> + >>> +??? return sprintf(buf, "%d\n", adapter->mdev_count); >>> +} >>> + >>> +MDEV_TYPE_ATTR_RO(available_instances); >>> + >>> +static ssize_t type_show(struct kobject *kobj, >>> +??????????? struct device *dev, char *buf) >>> +{ >>> +??? return sprintf(buf, "%s\n", "n...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...; > + > +static ssize_t available_instances_show(struct kobject *kobj, > + struct device *dev, char *buf) > +{ > + struct pci_dev *pdev = to_pci_dev(dev); > + struct ifcvf_adapter *adapter = pci_get_drvdata(pdev); > + > + return sprintf(buf, "%d\n", adapter->mdev_count); > +} > + > +MDEV_TYPE_ATTR_RO(available_instances); > + > +static ssize_t type_show(struct kobject *kobj, > + struct device *dev, char *buf) > +{ > + return sprintf(buf, "%s\n", "net"); > +} > + > +MDEV_TYPE_ATTR_RO(type); > + > + >...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...ble_instances_show(struct kobject *kobj, > + struct device *dev, char *buf) > +{ > + struct pci_dev *pdev; > + struct ifcvf_adapter *adapter; > + > + pdev = to_pci_dev(dev); > + adapter = pci_get_drvdata(pdev); > + > + return sprintf(buf, "%d\n", adapter->mdev_count); > +} > + > +MDEV_TYPE_ATTR_RO(available_instances); > + > +static ssize_t type_show(struct kobject *kobj, > + struct device *dev, char *buf) > +{ > + return sprintf(buf, "%s\n", "net"); > +} > + > +MDEV_TYPE_ATTR_RO(type); > + > + >...
2019 Nov 25
0
[RFC V4 2/2] This commit introduced IFC operations for vdpa
...class_id(mdev,MDEV_VIRTIO_CLASS_ID_VIRTIO); > + > + if (!strcmp(kobj->name, "ifcvf-vhost_mdev")) > + mdev_virtio_set_class_id(mdev,MDEV_VIRTIO_CLASS_ID_VHOST); > + > + mdev_set_drvdata(mdev, adapter); > + mdev_set_iommu_device(mdev_dev(mdev), dev); > + adapter->mdev_count--; > + To avoid confusion, it's better to call mdev_set_iommu_device() only for the case of vhost. For virtio, it doesn't depends on that to work. Thanks
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg; > + struct ifcvf_net_config *net_cfg; > + struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > + struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > +}; > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; > + int mdev_count; > + int vectors; > + struct ifcvf_hw vf; > +}; > + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); > +int ifcvf_start_hw(struct ifcvf_hw *hw); > +void ifcvf_stop_hw(struct ifcvf_hw *hw); > +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid); > +u8 ifcv...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg; > + struct ifcvf_net_config *net_cfg; > + struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > + struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > +}; > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; > + int mdev_count; > + int vectors; > + struct ifcvf_hw vf; > +}; > + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); > +int ifcvf_start_hw(struct ifcvf_hw *hw); > +void ifcvf_stop_hw(struct ifcvf_hw *hw); > +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid); > +u8 ifcv...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg; > + struct ifcvf_net_config *net_cfg; > + struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > + struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > +}; > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; > + int mdev_count; > + int vectors; > + struct ifcvf_hw vf; > +}; > + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); > +int ifcvf_start_hw(struct ifcvf_hw *hw); > +void ifcvf_stop_hw(struct ifcvf_hw *hw); > +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid); > +u8 ifcv...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...+ struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > + struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > +}; It's better to add comments to explain each field. > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; > + int mdev_count; > + int vectors; > + struct ifcvf_hw vf; > +}; > + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); > +int ifcvf_start_hw(struct ifcvf_hw *hw); > +void ifcvf_stop_hw(struct ifcvf_hw *hw); > +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid); > +u8 ifcv...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...ct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) The extra one means the config interrupt? > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; Not used in the patch, move to next one? > + int mdev_count; Not used. > + struct list_head dma_maps; This is not used. Thanks > + int vectors; > + struct ifcvf_hw vf; > +}; > + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); > +u64 ifcvf_get_features(struct ifcvf_hw *hw); > +int ifcvf_start_hw(struct ifcvf_h...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...gt;>> +??? struct??? device *dev; >>> +??? struct??? mutex mdev_lock; >> >> >> Not used in the patch, move to next one? > Sure, these not used ones will be moved to small patches where they > are used in v1 patchset. >> >> >>> +??? int??? mdev_count; >> >> >> Not used. >> >> >>> +??? struct??? list_head dma_maps; >> >> >> This is not used. >> >> Thanks >> >> >>> +??? int??? vectors; >>> +??? struct??? ifcvf_hw vf; >>> +}; >>> +...