Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-05 Thread Viresh Kumar
On 01-04-21, 14:43, Alex Bennée wrote: > > +/* Parse clients [:] entries one by > > one */ > > Then this would be: > > **dev = g_strsplit(cp[i], ":", 2); There can be any number of client devices present for a bus, not just 2. -- viresh

Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-04 Thread Viresh Kumar
On 02-04-21, 10:55, Jie Deng wrote: > > On 2021/4/1 20:12, Viresh Kumar wrote: > > + > > +/* vhost-user-i2c definitions */ > > + > > +#define MAX_I2C_VDEV(1 << 7) > > +#define MAX_I2C_ADAPTER 16 > > Generally speaking, 16 is big enough for most cases. But compa

Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-01 Thread Jie Deng
On 2021/4/1 20:12, Viresh Kumar wrote: + +/* vhost-user-i2c definitions */ + +#define MAX_I2C_VDEV(1 << 7) +#define MAX_I2C_ADAPTER 16 Generally speaking, 16 is big enough for most cases. But comparing with static configuration, I think it is better if we

Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-01 Thread Alex Bennée
Viresh Kumar writes: > This adds the vhost-user backend driver to support virtio based I2C and > SMBUS devices. > > vhost-user-i2c --help > > Signed-off-by: Viresh Kumar > + > +static VI2cAdapter *vi2c_create_adapter(int32_t bus, uint16_t client_addr[], > +

[PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-01 Thread Viresh Kumar
This adds the vhost-user backend driver to support virtio based I2C and SMBUS devices. vhost-user-i2c --help Signed-off-by: Viresh Kumar --- tools/meson.build| 8 + tools/vhost-user-i2c/50-qemu-i2c.json.in | 5 + tools/vhost-user-i2c/main.c | 809 +++