~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/vmw_vsock/vmci_transport_notify.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * VMware vSockets Driver
  4  *
  5  * Copyright (C) 2009-2013 VMware, Inc. All rights reserved.
  6  */
  7 
  8 #ifndef __VMCI_TRANSPORT_NOTIFY_H__
  9 #define __VMCI_TRANSPORT_NOTIFY_H__
 10 
 11 #include <linux/types.h>
 12 #include <linux/vmw_vmci_defs.h>
 13 #include <linux/vmw_vmci_api.h>
 14 
 15 #include "vmci_transport.h"
 16 
 17 /* Comment this out to compare with old protocol. */
 18 #define VSOCK_OPTIMIZATION_WAITING_NOTIFY 1
 19 #if defined(VSOCK_OPTIMIZATION_WAITING_NOTIFY)
 20 /* Comment this out to remove flow control for "new" protocol */
 21 #define VSOCK_OPTIMIZATION_FLOW_CONTROL 1
 22 #endif
 23 
 24 #define VMCI_TRANSPORT_MAX_DGRAM_RESENDS       10
 25 
 26 struct vmci_transport_recv_notify_data {
 27         u64 consume_head;
 28         u64 produce_tail;
 29         bool notify_on_block;
 30 };
 31 
 32 struct vmci_transport_send_notify_data {
 33         u64 consume_head;
 34         u64 produce_tail;
 35 };
 36 
 37 /* Socket notification callbacks. */
 38 struct vmci_transport_notify_ops {
 39         void (*socket_init) (struct sock *sk);
 40         void (*socket_destruct) (struct vsock_sock *vsk);
 41         int (*poll_in) (struct sock *sk, size_t target,
 42                           bool *data_ready_now);
 43         int (*poll_out) (struct sock *sk, size_t target,
 44                            bool *space_avail_now);
 45         void (*handle_notify_pkt) (struct sock *sk,
 46                                    struct vmci_transport_packet *pkt,
 47                                    bool bottom_half, struct sockaddr_vm *dst,
 48                                    struct sockaddr_vm *src,
 49                                    bool *pkt_processed);
 50         int (*recv_init) (struct sock *sk, size_t target,
 51                           struct vmci_transport_recv_notify_data *data);
 52         int (*recv_pre_block) (struct sock *sk, size_t target,
 53                                struct vmci_transport_recv_notify_data *data);
 54         int (*recv_pre_dequeue) (struct sock *sk, size_t target,
 55                                  struct vmci_transport_recv_notify_data *data);
 56         int (*recv_post_dequeue) (struct sock *sk, size_t target,
 57                                   ssize_t copied, bool data_read,
 58                                   struct vmci_transport_recv_notify_data *data);
 59         int (*send_init) (struct sock *sk,
 60                           struct vmci_transport_send_notify_data *data);
 61         int (*send_pre_block) (struct sock *sk,
 62                                struct vmci_transport_send_notify_data *data);
 63         int (*send_pre_enqueue) (struct sock *sk,
 64                                  struct vmci_transport_send_notify_data *data);
 65         int (*send_post_enqueue) (struct sock *sk, ssize_t written,
 66                                   struct vmci_transport_send_notify_data *data);
 67         void (*process_request) (struct sock *sk);
 68         void (*process_negotiate) (struct sock *sk);
 69 };
 70 
 71 extern const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops;
 72 extern const
 73 struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops;
 74 
 75 #endif /* __VMCI_TRANSPORT_NOTIFY_H__ */
 76 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php