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

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 07:44:04AM +, Xie, Huawei wrote: > On 1/19/2016 1:53 PM, Yuanhan Liu wrote: > > On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: > >> On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > >>> -static void > >>> +static int > >>> virtio_negotiate_features(struct virtio

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

2016-01-19 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: > On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > > -static void > > +static int > > virtio_negotiate_features(struct virtio_hw *hw) > > { > > uint64_t host_features; > > @@ -949,6 +949,22 @@ virtio_negotiate_features(struct virtio_hw *

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

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 02:48:39AM +, Xie, Huawei wrote: > On 1/19/2016 10:44 AM, Yuanhan Liu wrote: > > On Tue, Jan 19, 2016 at 01:51:30AM +, Xie, Huawei wrote: > >> On 1/19/2016 9:34 AM, Yuanhan Liu wrote: > >>> On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: > .On 1/15/

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

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 01:51:30AM +, Xie, Huawei wrote: > On 1/19/2016 9:34 AM, Yuanhan Liu wrote: > > On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: > >> .On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > >>> Modern (v1.0) virtio pci device defines several pci capabilities. > >>> Each

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

2016-01-19 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: > .On 1/15/2016 12:34 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

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

2016-01-19 Thread Xie, Huawei
On 1/19/2016 3:44 PM, Xie, Huawei wrote: > On 1/19/2016 1:53 PM, Yuanhan Liu wrote: >> On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: >>> On 1/15/2016 12:34 PM, Yuanhan Liu wrote: -static void +static int virtio_negotiate_features(struct virtio_hw *hw) {

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

2016-01-19 Thread Xie, Huawei
On 1/19/2016 1:53 PM, Yuanhan Liu wrote: > On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: >> On 1/15/2016 12:34 PM, Yuanhan Liu wrote: >>> -static void >>> +static int >>> virtio_negotiate_features(struct virtio_hw *hw) >>> { >>> uint64_t host_features; >>> @@ -949,6 +949,22 @@

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

2016-01-19 Thread Xie, Huawei
On 1/19/2016 10:44 AM, Yuanhan Liu wrote: > On Tue, Jan 19, 2016 at 01:51:30AM +, Xie, Huawei wrote: >> On 1/19/2016 9:34 AM, Yuanhan Liu wrote: >>> On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: .On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > Modern (v1.0) virtio pci device

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

2016-01-19 Thread Xie, Huawei
On 1/19/2016 9:34 AM, Yuanhan Liu wrote: > On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: >> .On 1/15/2016 12:34 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

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

2016-01-18 Thread Xie, Huawei
.On 1/15/2016 12:34 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. > [snip] > + > +static inline void > +io_write64_twopart(uint64_

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

2016-01-18 Thread Xie, Huawei
On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > -static void > +static int > virtio_negotiate_features(struct virtio_hw *hw) > { > uint64_t host_features; > @@ -949,6 +949,22 @@ virtio_negotiate_features(struct virtio_hw *hw) > hw->guest_features = vtpci_negotiate_features(hw, host_featur

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

2016-01-18 Thread Xie, Huawei
On 1/15/2016 12:34 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. > [snip] > > +static void * > +get_cfg_addr(struct rte_pci_de

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

2016-01-15 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 a cfg structure by: