Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread manish.mishra
On 23/11/22 9:57 pm, Peter Xu wrote: On Wed, Nov 23, 2022 at 09:28:14PM +0530, manish.mishra wrote: On 23/11/22 9:22 pm, Peter Xu wrote: On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: +int migration_channel_read_peek(QIOChannel *ioc, +const cha

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread Peter Xu
On Wed, Nov 23, 2022 at 09:28:14PM +0530, manish.mishra wrote: > > On 23/11/22 9:22 pm, Peter Xu wrote: > > On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: > > > +int migration_channel_read_peek(QIOChannel *ioc, > > > +const char *buf, > > > +

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread Daniel P . Berrangé
On Wed, Nov 23, 2022 at 09:34:35PM +0530, manish.mishra wrote: > > On 23/11/22 9:28 pm, Daniel P. Berrangé wrote: > > On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: > > > Current logic assumes that channel connections on the destination side are > > > always established in the same

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread manish.mishra
On 23/11/22 9:28 pm, Daniel P. Berrangé wrote: On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: Current logic assumes that channel connections on the destination side are always established in the same order as the source and the first one will always be the main channel followed

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread manish.mishra
On 23/11/22 9:22 pm, Peter Xu wrote: On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: +int migration_channel_read_peek(QIOChannel *ioc, +const char *buf, +const size_t buflen, +Error *

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread Daniel P . Berrangé
On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: > Current logic assumes that channel connections on the destination side are > always established in the same order as the source and the first one will > always be the main channel followed by the multifid or post-copy > preemption cha

Re: [PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread Peter Xu
On Wed, Nov 23, 2022 at 03:05:27PM +, manish.mishra wrote: > +int migration_channel_read_peek(QIOChannel *ioc, > +const char *buf, > +const size_t buflen, > +Error **errp) > +{ > + ssize_t len = 0;

[PATCH v4 2/2] migration: check magic value for deciding the mapping of channels

2022-11-23 Thread manish.mishra
Current logic assumes that channel connections on the destination side are always established in the same order as the source and the first one will always be the main channel followed by the multifid or post-copy preemption channel. This may not be always true, as even if a channel has a connectio