[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
Sigh... I have just send out v3 ... On Thu, Jan 14, 2016 at 07:50:00AM +, Xie, Huawei wrote: > On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > > +static inline void > > +modern_write64_twopart(uint64_t val, uint32_t *lo, uint32_t *hi) > > +{ > > + modern_write32((uint32_t)val, lo); > > + modern

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 08:08:28AM +, Xie, Huawei wrote: > On 1/14/2016 3:58 PM, Yuanhan Liu wrote: > > On Thu, Jan 14, 2016 at 07:51:08AM +, Xie, Huawei wrote: > >> On 1/14/2016 3:49 PM, Yuanhan Liu wrote: > >>> On Thu, Jan 14, 2016 at 07:47:17AM +, Xie, Huawei wrote: > On 1/12/20

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 07:51:08AM +, Xie, Huawei wrote: > On 1/14/2016 3:49 PM, Yuanhan Liu wrote: > > On Thu, Jan 14, 2016 at 07:47:17AM +, Xie, Huawei wrote: > >> On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > >>> Modern (v1.0) virtio pci device defines several pci capabilities. > >> [snip]

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 07:47:17AM +, Xie, Huawei wrote: > On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > > Modern (v1.0) virtio pci device defines several pci capabilities. > [snip] > > +static void > > +modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue > > *vq) > > +{ > > +

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Xie, Huawei
On 1/14/2016 4:21 PM, Yuanhan Liu wrote: > On Thu, Jan 14, 2016 at 08:08:28AM +, Xie, Huawei wrote: >> On 1/14/2016 3:58 PM, Yuanhan Liu wrote: >>> On Thu, Jan 14, 2016 at 07:51:08AM +, Xie, Huawei wrote: On 1/14/2016 3:49 PM, Yuanhan Liu wrote: > On Thu, Jan 14, 2016 at 07:47:17AM

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Xie, Huawei
On 1/14/2016 3:58 PM, Yuanhan Liu wrote: > On Thu, Jan 14, 2016 at 07:51:08AM +, Xie, Huawei wrote: >> On 1/14/2016 3:49 PM, Yuanhan Liu wrote: >>> On Thu, Jan 14, 2016 at 07:47:17AM +, Xie, Huawei wrote: On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > Modern (v1.0) virtio pci device de

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Xie, Huawei
On 1/14/2016 3:49 PM, Yuanhan Liu wrote: > On Thu, Jan 14, 2016 at 07:47:17AM +, Xie, Huawei wrote: >> On 1/12/2016 2:58 PM, Yuanhan Liu wrote: >>> Modern (v1.0) virtio pci device defines several pci capabilities. >> [snip] >>> +static void >>> +modern_notify_queue(struct virtio_hw *hw __rte_un

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Xie, Huawei
On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > Modern (v1.0) virtio pci device defines several pci capabilities. > Each cap has a configure structure corresponding to it, and the > cap.bar and cap.offset fields tell us where to find it. > > Firstly, we map the pci resources by rte_eal_pci_map_device().

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Xie, Huawei
On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > Modern (v1.0) virtio pci device defines several pci capabilities. [snip] > +static void > +modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq) > +{ > + modern_write16(1, vq->notify_addr); > +} Does virtio 1.0 only supports MMI

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-13 Thread Yuanhan Liu
On Wed, Jan 13, 2016 at 12:31:43PM +0900, Tetsuya Mukawa wrote: > On 2016/01/12 15:59, Yuanhan Liu wrote: > > +static int > > +virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) > > +{ > > + uint8_t pos; > > + struct virtio_pci_cap cap; > > + int ret; > > + > > + if (rte_eal

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-13 Thread Tetsuya Mukawa
On 2016/01/12 15:59, Yuanhan Liu wrote: > +static int > +virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) > +{ > + uint8_t pos; > + struct virtio_pci_cap cap; > + int ret; > + > + if (rte_eal_pci_map_device(dev) < 0) { > + PMD_INIT_LOG(DEBUG, "failed to

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-12 Thread Yuanhan Liu
Modern (v1.0) virtio pci device defines several pci capabilities. Each cap has a configure structure corresponding to it, and the cap.bar and cap.offset fields tell us where to find it. Firstly, we map the pci resources by rte_eal_pci_map_device(). We then could easily locate to a cfg structure by