summaryrefslogtreecommitdiffstats
path: root/net/ife
diff options
context:
space:
mode:
authorAndra Paraschiv <andraprs@amazon.com>2020-12-14 18:11:22 +0200
committerJakub Kicinski <kuba@kernel.org>2020-12-14 19:33:39 -0800
commit7f816984f439dfe24da25032254cb10512900346 (patch)
tree6d3e957b647ce7f82ddb4674477176f41887c66b /net/ife
parent1b5f2ab98e7f99f1a83960b17c5596012a7c5e88 (diff)
downloadlinux-stable-7f816984f439dfe24da25032254cb10512900346.tar.gz
linux-stable-7f816984f439dfe24da25032254cb10512900346.tar.bz2
linux-stable-7f816984f439dfe24da25032254cb10512900346.zip
af_vsock: Assign the vsock transport considering the vsock address flags
The vsock flags field can be set in the connect path (user space app) and the (listen) receive path (kernel space logic). When the vsock transport is assigned, the remote CID is used to distinguish between types of connection. Use the vsock flags value (in addition to the CID) from the remote address to decide which vsock transport to assign. For the sibling VMs use case, all the vsock packets need to be forwarded to the host, so always assign the guest->host transport if the VMADDR_FLAG_TO_HOST flag is set. For the other use cases, the vsock transport assignment logic is not changed. Changelog v3 -> v4 * Update the "remote_flags" local variable type to reflect the change of the "svm_flags" field to be 1 byte in size. 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" block. Signed-off-by: Andra Paraschiv <andraprs@amazon.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ife')
0 files changed, 0 insertions, 0 deletions