[PATCH net-next v3 4/4] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-11 Thread Andra Paraschiv
ged. Changelog v2 -> v3 * Update bitwise check logic to not compare result to the flag value. v1 -> v2 * Use bitwise operator to check the vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if"

[PATCH net-next v3 0/4] vsock: Add flags field in the vsock address

2020-12-11 Thread Andra Paraschiv
twise operators to setup and check the vsock flag. * Set the vsock flag on the receive path in the vsock transport assignment logic. * Merge the checks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.com/ ---

[PATCH net-next v3 1/4] vm_sockets: Add flags field in the vsock address data structure

2020-12-11 Thread Andra Paraschiv
> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sock

[PATCH net-next v3 3/4] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-11 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v2 -> v3 * No changes. v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-by: Andra Paraschiv Revi

[PATCH net-next v3 2/4] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-11 Thread Andra Paraschiv
lag is set in the connect and listen paths. v1 -> v2 * New patch in v2, it was split from the first patch in the series. * Remove the default value for the vsock flags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv --- in

[PATCH net-next v4 1/5] vm_sockets: Add flags field in the vsock address data structure

2020-12-14 Thread Andra Paraschiv
> v3 * Add "svm_flags" as a new field, not reusing "svm_reserved1". v1 -> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets

[PATCH net-next v4 4/5] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-14 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v3 -> v4 * No changes. v2 -> v3 * No changes. v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-

[PATCH net-next v4 5/5] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-14 Thread Andra Paraschiv
he vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if" block. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- net/vmw_vsock/af_vsock.c | 9 +++-- 1 file changed, 7 insertions(+), 2 d

[PATCH net-next v4 0/5] vsock: Add flags field in the vsock address

2020-12-14 Thread Andra Paraschiv
on the receive path in the vsock transport assignment logic. * Merge the checks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.com/ --- Andra Paraschiv (5): vm_sockets: Add flags field in the vsock

[PATCH net-next v4 3/5] vsock_addr: Check for supported flag values

2020-12-14 Thread Andra Paraschiv
Check if the provided flags value from the vsock address data structure includes the supported flags in the corresponding kernel version. The first byte of the "svm_zero" field is used as "svm_flags", so add the flags check instead. Changelog v3 -> v4 * New patch in v4

[PATCH net-next v4 2/5] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-14 Thread Andra Paraschiv
field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets.h | 20 1 file changed, 20 insertions(+) diff --git a/include/uapi/linux/vm_sockets.h b/include/

[PATCH net-next v1 0/3] vsock: Add flag field in the vsock address

2020-12-01 Thread Andra Paraschiv
or the latest version of the patch series: * https://github.com/andraprs/linux/tree/vsock-flag-sibling-comm-v1 --- Andra Paraschiv (3): vm_sockets: Include flag field in the vsock address data structure virtio_transport_common: Set sibling VMs flag on the receive path af_vsock: Assign the vs

[PATCH net-next v1 1/3] vm_sockets: Include flag field in the vsock address data structure

2020-12-01 Thread Andra Paraschiv
instead. This flag can be set when initializing the vsock address variable used for the connect() call. Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sockets.h b

[PATCH net-next v1 2/3] virtio_transport_common: Set sibling VMs flag on the receive path

2020-12-01 Thread Andra Paraschiv
use case. Set the vsock flag of the remote address to the one targeted for sibling VMs communication if the following conditions are met: * The source CID of the packet is higher than VMADDR_CID_HOST. * The destination CID of the packet is higher than VMADDR_CID_HOST. Signed-off-by: Andra Paraschiv

[PATCH net-next v1 3/3] af_vsock: Assign the vsock transport considering the vsock address flag

2020-12-01 Thread Andra Paraschiv
sibling VMs use case, all the vsock packets need to be forwarded to the host, so always assign the guest->host transport if the vsock flag is set. For the other use cases, the vsock transport assignment logic is not changed. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c |

[PATCH net-next v2 1/4] vm_sockets: Include flags field in the vsock address data structure

2020-12-04 Thread Andra Paraschiv
-> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/

[PATCH net-next v2 0/4] vsock: Add flags field in the vsock address

2020-12-04 Thread Andra Paraschiv
ecks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.com/ --- Andra Paraschiv (4): vm_sockets: Include flags field in the vsock address data structure vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag af_vsock:

[PATCH net-next v2 2/4] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-04 Thread Andra Paraschiv
the first patch in the series. * Remove the default value for the vsock flags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a

[PATCH net-next v2 3/4] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-04 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c | 12 +++

[PATCH net-next v2 4/4] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-04 Thread Andra Paraschiv
tor to check the vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if" block. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)