[PATCH V3 1/2] virtio: use dev_to_virtio wrapper in virtio
Use dev_to_virtio wrapper in virtio to make code clearly. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- drivers/virtio/virtio.c | 19 +-- include/linux/virtio.h | 6 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 1e8659c..1346ae8 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -10,33 +10,32 @@ static DEFINE_IDA(virtio_index_ida); static ssize_t device_show(struct device *_d, struct device_attribute *attr, char *buf) { - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_d); return sprintf(buf, 0x%04x\n, dev-id.device); } static ssize_t vendor_show(struct device *_d, struct device_attribute *attr, char *buf) { - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_d); return sprintf(buf, 0x%04x\n, dev-id.vendor); } static ssize_t status_show(struct device *_d, struct device_attribute *attr, char *buf) { - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_d); return sprintf(buf, 0x%08x\n, dev-config-get_status(dev)); } static ssize_t modalias_show(struct device *_d, struct device_attribute *attr, char *buf) { - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); - + struct virtio_device *dev = dev_to_virtio(_d); return sprintf(buf, virtio:d%08Xv%08X\n, dev-id.device, dev-id.vendor); } static ssize_t features_show(struct device *_d, struct device_attribute *attr, char *buf) { - struct virtio_device *dev = container_of(_d, struct virtio_device, dev); + struct virtio_device *dev = dev_to_virtio(_d); unsigned int i; ssize_t len = 0; @@ -71,7 +70,7 @@ static inline int virtio_id_match(const struct virtio_device *dev, static int virtio_dev_match(struct device *_dv, struct device_driver *_dr) { unsigned int i; - struct virtio_device *dev = container_of(_dv,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_dv); const struct virtio_device_id *ids; ids = container_of(_dr, struct virtio_driver, driver)-id_table; @@ -83,7 +82,7 @@ static int virtio_dev_match(struct device *_dv, struct device_driver *_dr) static int virtio_uevent(struct device *_dv, struct kobj_uevent_env *env) { - struct virtio_device *dev = container_of(_dv,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_dv); return add_uevent_var(env, MODALIAS=virtio:d%08Xv%08X, dev-id.device, dev-id.vendor); @@ -111,7 +110,7 @@ EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); static int virtio_dev_probe(struct device *_d) { int err, i; - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_d); struct virtio_driver *drv = container_of(dev-dev.driver, struct virtio_driver, driver); u32 device_features; @@ -152,7 +151,7 @@ static int virtio_dev_probe(struct device *_d) static int virtio_dev_remove(struct device *_d) { - struct virtio_device *dev = container_of(_d,struct virtio_device,dev); + struct virtio_device *dev = dev_to_virtio(_d); struct virtio_driver *drv = container_of(dev-dev.driver, struct virtio_driver, driver); diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 25fa1a6..95b4463 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -79,7 +79,11 @@ struct virtio_device { void *priv; }; -#define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev) +static inline struct virtio_device *dev_to_virtio(struct device *_dev) +{ + return container_of(_dev, struct virtio_device, dev); +} + int register_virtio_device(struct virtio_device *dev); void unregister_virtio_device(struct virtio_device *dev); -- 1.8.0 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCH V3 2/2] virtio: add drv_to_virtio to make code clearly
Add drv_to_virtio wrapper to get virtio_driver from device_driver. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- drivers/virtio/virtio.c | 11 --- include/linux/virtio.h | 5 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 1346ae8..1c01ac3 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -73,7 +73,7 @@ static int virtio_dev_match(struct device *_dv, struct device_driver *_dr) struct virtio_device *dev = dev_to_virtio(_dv); const struct virtio_device_id *ids; - ids = container_of(_dr, struct virtio_driver, driver)-id_table; + ids = drv_to_virtio(_dr)-id_table; for (i = 0; ids[i].device; i++) if (virtio_id_match(dev, ids[i])) return 1; @@ -97,8 +97,7 @@ void virtio_check_driver_offered_feature(const struct virtio_device *vdev, unsigned int fbit) { unsigned int i; - struct virtio_driver *drv = container_of(vdev-dev.driver, -struct virtio_driver, driver); + struct virtio_driver *drv = drv_to_virtio(vdev-dev.driver); for (i = 0; i drv-feature_table_size; i++) if (drv-feature_table[i] == fbit) @@ -111,8 +110,7 @@ static int virtio_dev_probe(struct device *_d) { int err, i; struct virtio_device *dev = dev_to_virtio(_d); - struct virtio_driver *drv = container_of(dev-dev.driver, -struct virtio_driver, driver); + struct virtio_driver *drv = drv_to_virtio(dev-dev.driver); u32 device_features; /* We have a driver! */ @@ -152,8 +150,7 @@ static int virtio_dev_probe(struct device *_d) static int virtio_dev_remove(struct device *_d) { struct virtio_device *dev = dev_to_virtio(_d); - struct virtio_driver *drv = container_of(dev-dev.driver, -struct virtio_driver, driver); + struct virtio_driver *drv = drv_to_virtio(dev-dev.driver); drv-remove(dev); diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 95b4463..6f8f27d 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -113,6 +113,11 @@ struct virtio_driver { #endif }; +static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv) +{ + return container_of(drv, struct virtio_driver, driver); +} + int register_virtio_driver(struct virtio_driver *drv); void unregister_virtio_driver(struct virtio_driver *drv); #endif /* _LINUX_VIRTIO_H */ -- 1.8.0 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
CISTI'2013 Doctoral Symposium - CFP, Lisbon, June 19 - 23, 2013
*** CISTI'2013 DOCTORAL SYMPOSIUM 8th Iberian Conference on Information Systems and Technologies Lisbn, Portugal, June 19 - 23, 2013 http://www.aisti.eu/cisti2013/index.php?option=com_contentview=articleid=64Itemid=68lang=en *** INTRODUCTION The purpose of CISTI'2013s Doctoral Symposium (http://www.aisti.eu/cisti2013/index.php?option=com_contentview=articleid=64Itemid=68lang=en) is to provide graduate students a setting where they can, informally, expose and discuss their work, collecting valuable expert opinions and sharing new ideas, methods and applications. The Doctoral Symposium is an excellent opportunity for PhD students to present and discuss their work in a Workshop format. Each presentation will be evaluated by a panel composed by at least three Information Systems and Technologies experts. CONTRIBUTIONS SUBMISSION The Doctoral Symposium is opened to PhD students whose research area includes the themes proposed for this Conference. Submissions must include an extended abstract (maximum 4 pages), following the Conference style guide. All selected contributions will be handed out along with the Conference Proceedings, in CD with an ISBN. These contributions will be send for indexation by EBSCO, and EI-Compendex. Submissions must include the field, the PhD institution and the number of months devoted to the development of the work. Additionally, they should include in a clear and succinct manner: The problem approached and its significance or relevance The research objectives and related investigation topics A brief display of what is already known A proposed solution methodology for the problem Expected results IMPORTANT DATES Data limite para submissão de propostas: 15 de Fevereiro de 2013 Notificação de aceitação: 29 de Março de 2013 Data limite para apresentação das versões finais: 12 de Abril de 2013 Pagamento da inscrição, para garantir a inclusão da contribuição aceite nas actas da conferência: 12 de Abril de 2013 SCIENTIFIC AND ORGANIZING COMMITTEE Manuel Pérez Cota, Universidad de Vigo (Chair) Adolfo Lozano Tello, Universidad de Extremadura Alberto J. Bugarín Diz, Universidad de Santiago de Compostela Álvaro Rocha, Universidade Fernando Pessoa Ana Maria Ramalho Correia, Universidade Nova de Lisboa, ISEGI António Palma dos Reis, Universidade Técnica de Lisboa, ISEG Arturo Mendez Penín, Universidade de Vigo Carlos Ferrás Sexto, Universidad de Santiago de Compostela David Fonseca, Universidad Ramón Llul Ernesto Redondo, Universidad Politécnica de Cataluña Feliz Gouveia, Universidade Fernando Pessoa Francisco Restivo, Universidade Católica Portuguesa - Braga Guilhermina Miranda, Universidade de Lisboa Gonzalo Cuevas Agustín, Universidad Politécnica de Madrid Héctor Jorge García Neder, Universidad Tecnológica NacioNal João Álvaro Carvalho, Universidade do Minho João Barroso, Universidade de Trás-os-Montes e Alto Douro Jörg Thomaschewski, University of Applied Sciences of Emden-Leer José Antonio Calvo-Manzano Villalón, Universidad Politécnica de Madrid José Bulas Cruz, Universidade de Trás-os-Montes e Alto Douro José Tribolet, Universidade Técnica de Lisboa, IST Leandro Rodríguez Liñares, Universidade de Vigo Luís Paulo Reis, Universidade do Minho María José Lado Touriño, Universidade de Vigo Maria Manuela Cruz Cunha, Instituto Politécnico do Cávado e do Ave Marco Painho, Universidade Nova de Lisboa, ISEGI Mario Alberto Groppo, Universidad Tecnológica Nacional Nuno Ribeiro, Universidade Fernando Pessoa Pilar Mareca, Universidade Politécnica de Madrid Ramiro Gonçalves, Universidade de Trás-os-Montes e Alto Douro Tomas San Feliu Gilabert, Universidad Politécnica de Madrid Vicente Alcober, Universidad Politécnica de Madrid - CISTI'2013 Team http://www.aisti.eu/cisti2013 ais...@gmail.com --- ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
CISTI'2013 Doctoral Symposium - CFP, Lisbon, June 19 - 23, 2013
*** CISTI'2013 DOCTORAL SYMPOSIUM 8th Iberian Conference on Information Systems and Technologies Lisbn, Portugal, June 19 - 23, 2013 http://www.aisti.eu/cisti2013/index.php?option=com_contentview=articleid=64Itemid=68lang=en *** INTRODUCTION The purpose of CISTI'2013s Doctoral Symposium (http://www.aisti.eu/cisti2013/index.php?option=com_contentview=articleid=64Itemid=68lang=en) is to provide graduate students a setting where they can, informally, expose and discuss their work, collecting valuable expert opinions and sharing new ideas, methods and applications. The Doctoral Symposium is an excellent opportunity for PhD students to present and discuss their work in a Workshop format. Each presentation will be evaluated by a panel composed by at least three Information Systems and Technologies experts. CONTRIBUTIONS SUBMISSION The Doctoral Symposium is opened to PhD students whose research area includes the themes proposed for this Conference. Submissions must include an extended abstract (maximum 4 pages), following the Conference style guide. All selected contributions will be handed out along with the Conference Proceedings, in CD with an ISBN. These contributions will be send for indexation by EBSCO, and EI-Compendex. Submissions must include the field, the PhD institution and the number of months devoted to the development of the work. Additionally, they should include in a clear and succinct manner: The problem approached and its significance or relevance The research objectives and related investigation topics A brief display of what is already known A proposed solution methodology for the problem Expected results IMPORTANT DATES Data limite para submissão de propostas: 15 de Fevereiro de 2013 Notificação de aceitação: 29 de Março de 2013 Data limite para apresentação das versões finais: 12 de Abril de 2013 Pagamento da inscrição, para garantir a inclusão da contribuição aceite nas actas da conferência: 12 de Abril de 2013 SCIENTIFIC AND ORGANIZING COMMITTEE Manuel Pérez Cota, Universidad de Vigo (Chair) Adolfo Lozano Tello, Universidad de Extremadura Alberto J. Bugarín Diz, Universidad de Santiago de Compostela Álvaro Rocha, Universidade Fernando Pessoa Ana Maria Ramalho Correia, Universidade Nova de Lisboa, ISEGI António Palma dos Reis, Universidade Técnica de Lisboa, ISEG Arturo Mendez Penín, Universidade de Vigo Carlos Ferrás Sexto, Universidad de Santiago de Compostela David Fonseca, Universidad Ramón Llul Ernesto Redondo, Universidad Politécnica de Cataluña Feliz Gouveia, Universidade Fernando Pessoa Francisco Restivo, Universidade Católica Portuguesa - Braga Guilhermina Miranda, Universidade de Lisboa Gonzalo Cuevas Agustín, Universidad Politécnica de Madrid Héctor Jorge García Neder, Universidad Tecnológica NacioNal João Álvaro Carvalho, Universidade do Minho João Barroso, Universidade de Trás-os-Montes e Alto Douro Jörg Thomaschewski, University of Applied Sciences of Emden-Leer José Antonio Calvo-Manzano Villalón, Universidad Politécnica de Madrid José Bulas Cruz, Universidade de Trás-os-Montes e Alto Douro José Tribolet, Universidade Técnica de Lisboa, IST Leandro Rodríguez Liñares, Universidade de Vigo Luís Paulo Reis, Universidade do Minho María José Lado Touriño, Universidade de Vigo Maria Manuela Cruz Cunha, Instituto Politécnico do Cávado e do Ave Marco Painho, Universidade Nova de Lisboa, ISEGI Mario Alberto Groppo, Universidad Tecnológica Nacional Nuno Ribeiro, Universidade Fernando Pessoa Pilar Mareca, Universidade Politécnica de Madrid Ramiro Gonçalves, Universidade de Trás-os-Montes e Alto Douro Tomas San Feliu Gilabert, Universidad Politécnica de Madrid Vicente Alcober, Universidad Politécnica de Madrid - CISTI'2013 Team http://www.aisti.eu/cisti2013 ais...@gmail.com --- ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCH] Introduce rproc serial device specification.
Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- Please pick the virtio spec from https://github.com/rustyrussell/virtio-spec and update the spec with info for remote-proc. Hi Sjur, I didn't hear back from you on this.. Hi Amit Sorry for the delay. I've had this ready for a while waiting for go-ahead from our legal dept, and then it got stuck in my backlog. Anyway, here is a stab at describing the rproc serial device. Feedback is welcomed. Thanks, Sjur virtio-spec.lyx | 58 +++ 1 file changed, 58 insertions(+) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 83f2771..bbb5c75 100644 --- a/virtio-spec.lyx +++ b/virtio-spec.lyx @@ -9079,6 +9079,64 @@ For MMC devices (inquiry type 5) there would be some overlap between this \end_deeper \begin_layout Chapter* +Appendix J: Rproc Serial Device +\end_layout + +\begin_layout Standard +The Remoteproc Serial Device device is used when communicating with a remote + processor. + The remote processor may be a modem communicating over a shared memory + interface, or a CPU in an asymmetric multi-processing (AMP) configuration. + The Remoteproc Serial Device provides a simple device for data IO. + A device has one port and a single pair of virtqueues for input and output. + Empty buffers are placed in one virtqueue for receiving packets, and outgoing + packets are enqueued into another for transmission. +\end_layout + +\begin_layout Section* +Configuration +\end_layout + +\begin_layout Description +Subsystem +\begin_inset space ~ +\end_inset + +Device +\begin_inset space ~ +\end_inset + +ID 11 +\end_layout + +\begin_deeper +\begin_layout Description +Virtqueues 0:receiveq(port0). + 1:transmitq(port0), +\end_layout + +\begin_layout Section* +Device Initialization +\end_layout + +\begin_layout Enumerate +The receiveq for each port is populated with one or more receive buffers. +\end_layout + +\begin_layout Section* +Device Operation +\end_layout + +\begin_layout Enumerate +For output, a buffer containing the characters is placed in the port's transmitq. +\end_layout + +\begin_layout Enumerate +Inbound messages are placed in the receiveq and signalled by an interrupt. +\end_layout + +\end_deeper +\begin_layout Chapter* Appendix X: virtio-mmio \end_layout -- 1.7.9.5 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCHv6] virtio-spec: virtio network device multiqueue support
On Mon, Dec 10, 2012 at 10:18:32AM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program packet steering for unidirectional protocols. One trivial change: alter 8000h to 0x8000 for consistency in the text. Could I have a Signed-off-by so I can apply it please? Thanks, Rusty. Right away. -- MST ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCHv7] virtio-spec: virtio network device multiqueue support
Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program packet steering for unidirectional protocols. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes in v7: - 8000h - 0x8000 at Rusty's request Changes in v6: - rename RFS - multiqueue to avoid confusion with RFS in linux mention automatic receive steering as Rusty suggested Changes in v5: - Address Rusty's comments. Changes are only in the text, not the ideas. - Some minor formatting changes. Changes in v4: - address Jason's comments - have configuration specify the number of VQ pairs and not pairs - 1 Changes in v3: - rename multiqueue - rfs this is what we support - Be more explicit about what driver should do. - Simplify layout making VQs functionality depend on feature. - Remove unused commands, only leave in programming # of queues Changes in v2: Address Jason's comments on v2: - Changed STEERING_HOST to STEERING_RX_FOLLOWS_TX: this is both clearer and easier to support. It does not look like we need a separate steering command since host can just watch tx packets as they go. - Moved RX and TX steering sections near each other. - Add motivation for other changes in v2 Changes in v1 (from Jason's rfc): - reserved vq 3: this makes all rx vqs even and tx vqs odd, which looks nicer to me. - documented packet steering, added a generalized steering programming command. Current modes are single queue and host driven multiqueue, but I envision support for guest driven multiqueue in the future. - make default vqs unused when in mq mode - this wastes some memory but makes it more efficient to switch between modes as we can avoid this causing packet reordering. diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 83f2771..6c09180 100644 --- a/virtio-spec.lyx +++ b/virtio-spec.lyx @@ -59,6 +59,7 @@ \author -608949062 Rusty Russell,,, \author -385801441 Cornelia Huck cornelia.h...@de.ibm.com \author 1531152142 Paolo Bonzini,,, +\author 1986246365 Michael S. Tsirkin \end_header \begin_body @@ -4170,9 +4171,46 @@ ID 1 \end_layout \begin_layout Description -Virtqueues 0:receiveq. - 1:transmitq. - 2:controlq +Virtqueues 0:receiveq +\change_inserted 1986246365 1352742829 +0 +\change_unchanged +. + 1:transmitq +\change_inserted 1986246365 1352742832 +0 +\change_deleted 1986246365 1352742947 +. + +\change_inserted 1986246365 1352742952 +. + + 2N +\begin_inset Foot +status open + +\begin_layout Plain Layout + +\change_inserted 1986246365 1354531595 +N=0 if VIRTIO_NET_F_MQ is not negotiated, otherwise N is derived from +\emph on +max_virtqueue_pairs +\emph default + control +\emph on + +\emph default +field. + +\end_layout + +\end_inset + +: receivqN. + 2N+1: transmitqN. + 2N+ +\change_unchanged +2:controlq \begin_inset Foot status open @@ -4343,6 +4381,16 @@ VIRTIO_NET_F_CTRL_VLAN \begin_layout Description VIRTIO_NET_F_GUEST_ANNOUNCE(21) Guest can send gratuitous packets. +\change_inserted 1986246365 1352742767 + +\end_layout + +\begin_layout Description + +\change_inserted 1986246365 1352742808 +VIRTIO_NET_F_MQ(22) Device supports multiqueue with automatic receive steering. +\change_unchanged + \end_layout \end_deeper @@ -4355,11 +4403,45 @@ configuration \begin_inset space ~ \end_inset -layout Two configuration fields are currently defined. +layout +\change_deleted 1986246365 1352743300 +Two +\change_inserted 1986246365 1354531413 +Three +\change_unchanged + configuration fields are currently defined. The mac address field always exists (though is only valid if VIRTIO_NET_F_MAC is set), and the status field only exists if VIRTIO_NET_F_STATUS is set. Two read-only bits are currently defined for the status field: VIRTIO_NET_S_LIN K_UP and VIRTIO_NET_S_ANNOUNCE. + +\change_inserted 1986246365 1354531470 + The following read-only field, +\emph on +max_virtqueue_pairs +\emph default + only exists if VIRTIO_NET_F_MQ is set. + This field specifies the maximum number of each of transmit and receive + virtqueues (receiveq0..receiveq +\emph on +N +\emph default + and transmitq0..transmitq +\emph on +N +\emph default + respectively; +\emph on +N +\emph default += +\emph on +max_virtqueue_pairs - 1 +\emph default +) that can be configured once VIRTIO_NET_F_MQ is negotiated. + Legal values for this field are 1 to 0x8000. + +\change_unchanged \begin_inset listings inline false @@ -4392,6 +4474,17 @@ struct virtio_net_config { \begin_layout Plain Layout u16 status; +\change_inserted 1986246365 1354531427 + +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1986246365 1354531437 + +u16 max_virtqueue_pairs; +\change_unchanged + \end_layout \begin_layout Plain Layout @@ -4410,7 +4503,24 @@ Device Initialization \begin_layout Enumerate The initialization routine
Re: [PATCHv7] virtio-spec: virtio network device multiqueue support
Michael S. Tsirkin m...@redhat.com writes: Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program packet steering for unidirectional protocols. Signed-off-by: Michael S. Tsirkin m...@redhat.com Thanks, applied. Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH V3 2/2] virtio: add drv_to_virtio to make code clearly
Wanlong Gao gaowanl...@cn.fujitsu.com writes: Add drv_to_virtio wrapper to get virtio_driver from device_driver. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Thanks, both applied. Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCHv6] virtio-spec: virtio network device multiqueue support
On Friday, December 07, 2012 04:18:56 PM Michael S. Tsirkin wrote: Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program packet steering for unidirectional protocols. --- Changes in v6: - rename RFS - multiqueue to avoid confusion with RFS in linux mention automatic receive steering as Rusty suggested Changes in v5: - Address Rusty's comments. Changes are only in the text, not the ideas. - Some minor formatting changes. Changes in v4: - address Jason's comments - have configuration specify the number of VQ pairs and not pairs - 1 Changes in v3: - rename multiqueue - rfs this is what we support - Be more explicit about what driver should do. - Simplify layout making VQs functionality depend on feature. - Remove unused commands, only leave in programming # of queues Changes in v2: Address Jason's comments on v2: - Changed STEERING_HOST to STEERING_RX_FOLLOWS_TX: this is both clearer and easier to support. It does not look like we need a separate steering command since host can just watch tx packets as they go. - Moved RX and TX steering sections near each other. - Add motivation for other changes in v2 Changes in v1 (from Jason's rfc): - reserved vq 3: this makes all rx vqs even and tx vqs odd, which looks nicer to me. - documented packet steering, added a generalized steering programming command. Current modes are single queue and host driven multiqueue, but I envision support for guest driven multiqueue in the future. - make default vqs unused when in mq mode - this wastes some memory but makes it more efficient to switch between modes as we can avoid this causing packet reordering. Rusty, could you please take a look and comment soon? If this looks OK to everyone, we can proceed with finalizing the implementation. Would be nice to try and put it in 3.8. diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 83f2771..c5b32c4 100644 --- a/virtio-spec.lyx +++ b/virtio-spec.lyx @@ -59,6 +59,7 @@ \author -608949062 Rusty Russell,,, \author -385801441 Cornelia Huck cornelia.h...@de.ibm.com \author 1531152142 Paolo Bonzini,,, +\author 1986246365 Michael S. Tsirkin \end_header [...] + +\begin_layout Plain Layout + +\change_inserted 1986246365 1353594263 + +#define VIRTIO_NET_CTRL_MQ1 Should be 4 here. +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1986246365 1353594273 + + #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET0 +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1986246365 1353594273 + + #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN1 +\end_layout + [...] ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote: Amit Shah amit.s...@redhat.com writes: On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote: Amit Shah amit.s...@redhat.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Remove buffers from the out-queue when a port is removed. Rproc_serial communicates with remote processors that may crash and leave buffers in the out-queue. The virtio serial ports may have buffers in the out-queue as well, e.g. for non-blocking ports and the host didn't consume them yet. [Amit: Remove WARN_ON for generic ports case.] Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com Signed-off-by: Amit Shah amit.s...@redhat.com I already have this in my pending queue; I've promoted it to my virtio-next branch now. Rusty, I still see this series in your pending queue, not in virtio-next. Did anything change in the meantime? Hmm: 40e625ac50f40d87ddba93280d0a503425aa68e9? I'm sorry, I meant the remoteproc code, not this patch. Amit ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization