Lines Matching +full:tx +full:- +full:port +full:- +full:mapping
1 /* SPDX-License-Identifier: MIT */
5 * Unified network-device I/O interface for Xen guest OSes.
7 * Copyright (c) 2003-2004, Keir Fraser
38 * feature 'feature-rx-notify' via xenbus. Otherwise the backend will assume
43 * "feature-split-event-channels" is introduced to separate guest TX
48 * channels for TX and RX, advertise them to backend as
49 * "event-channel-tx" and "event-channel-rx" respectively. If frontend
50 * doesn't want to use this feature, it just writes "event-channel"
56 * If supported, the backend will write the key "multi-queue-max-queues" to
60 * key "multi-queue-num-queues", set to the number they wish to use, which
62 * in "multi-queue-max-queues".
65 * "feature-split-event-channels" may optionally be used when using
69 * number of tx and rx rings.
71 * For frontends requesting just one queue, the usual event-channel and
72 * ring-ref keys are written as before, simplifying the backend processing
74 * multi-queue feature, and one that does, but requested only one queue.
77 * event-channel (or event-channel-{tx,rx}) and {tx,rx}-ring-ref keys,
78 * instead writing those keys under sub-keys having the name "queue-N" where
81 * event channels must write the following set of queue-related keys:
83 * /local/domain/1/device/vif/0/multi-queue-num-queues = "2"
84 * /local/domain/1/device/vif/0/queue-0 = ""
85 * /local/domain/1/device/vif/0/queue-0/tx-ring-ref = "<ring-ref-tx0>"
86 * /local/domain/1/device/vif/0/queue-0/rx-ring-ref = "<ring-ref-rx0>"
87 * /local/domain/1/device/vif/0/queue-0/event-channel-tx = "<evtchn-tx0>"
88 * /local/domain/1/device/vif/0/queue-0/event-channel-rx = "<evtchn-rx0>"
89 * /local/domain/1/device/vif/0/queue-1 = ""
90 * /local/domain/1/device/vif/0/queue-1/tx-ring-ref = "<ring-ref-tx1>"
91 * /local/domain/1/device/vif/0/queue-1/rx-ring-ref = "<ring-ref-rx1"
92 * /local/domain/1/device/vif/0/queue-1/event-channel-tx = "<evtchn-tx1>"
93 * /local/domain/1/device/vif/0/queue-1/event-channel-rx = "<evtchn-rx1>"
100 * Mapping of packets to queues is considered to be a function of the
108 * "feature-no-csum-offload" should be used to turn IPv4 TCP/UDP checksum
110 * "feature-ipv6-csum-offload" should be used to turn IPv6 TCP/UDP checksum
115 * "feature-gso-tcpv4" and "feature-gso-tcpv6" advertise the capability to
122 * "feature-multicast-control" and "feature-dynamic-multicast-control"
125 * it may set "request-multicast-control". If the backend only advertises
126 * "feature-multicast-control" then "request-multicast-control" must be set
130 * "feature-dynamic-multicast-control" then "request-multicast-control"
132 * watch the value and re-sample on watch events.
134 * If the sampled value of "request-multicast-control" is set then the
139 * containing XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL} extra-info fragments as
142 * "request-multicast-control" is not set, however the filter should only
157 * significant amount of out-of-band data to be passed from frontend to
163 * /local/domain/X/backend/vif/<domid>/<vif>/feature-ctrl-ring = "1"
167 * /local/domain/<domid>/device/vif/<vif>/ctrl-ring-ref = <gref>
168 * /local/domain/<domid>/device/vif/<vif>/event-channel-ctrl = <port>
171 * implement the control ring and <port> is an event channel to be used
214 * sub-array of 'Array' containing bytes X thru Y inclusive, and '+' is
236 * Packet[20..21] (source port) +
237 * Packet[22..23] (destination port)
263 * Packet[40..41] (source port) +
264 * Packet[42..43] (destination port)
287 * (Buffer[] and Key[] are treated as shift-registers where the MSB of
288 * Buffer/Key[0] is considered 'left-most' and the LSB of Buffer/Key[N-1]
289 * is the 'right-most').
293 * If (left-most bit of Buffer[] is 1)
294 * Value ^= left-most 32 bits of Key[]
311 /* Pre-load prefix with the first 8 bytes of the key */ in xen_netif_toeplitz_hash()
329 * 'prefix' has now been left-shifted by 8, so in xen_netif_toeplitz_hash()
348 * +-----+-----+-----+-----+-----+-----+-----+-----+
350 * +-----+-----+-----+-----+-----+-----+-----+-----+
352 * +-----+-----+-----+-----+-----------------------+
385 * +-----+-----+-----+-----+-----+-----+-----+-----+
387 * +-----+-----+-----+-----+-----+-----+-----+-----+
389 * +-----+-----+-----+-----+
427 * +-----+-----+-----+-----+-----+-----+-----+-----+
429 * +-----+-----+-----+-----+-----+-----+-----+-----+
454 * --------------------------------------
467 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
469 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - The algorithm is not
471 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
478 * ----------------------------------
492 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not supported
493 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
500 * ----------------------------------
507 * former only calculated for non-TCP packets.
518 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
520 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - One or more flag
523 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
532 * --------------------------------
547 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
549 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - Key size is invalid
550 * XEN_NETIF_CTRL_STATUS_BUFFER_OVERFLOW - Key size is larger
553 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
563 * The grant reference may be read-only and must remain valid until
567 * -----------------------------------------
569 * This is sent by the frontend to query the maximum size of mapping
582 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not supported
583 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
584 * data = maximum number of entries allowed in the mapping table
585 * (if operation was successful) or zero if a mapping table is
586 * not supported (i.e. hash mapping is done only by modular
590 * -------------------------------------
592 * This is sent by the frontend to set the actual size of the mapping
601 * data[0] = number of entries in mapping table
607 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
609 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - Table size is invalid
610 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
613 * NOTE: Setting data[0] to 0 means that hash mapping should be done
617 * ------------------------------------
619 * This is sent by the frontend to set the content of the table mapping
628 * data[0] = grant reference of page containing the mapping (sub-)table
630 * data[1] = size of (sub-)table in entries
631 * data[2] = offset, in entries, of sub-table within overall table
635 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
637 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - Table size or content
639 * XEN_NETIF_CTRL_STATUS_BUFFER_OVERFLOW - Table size is larger
642 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
648 * +-----+-----+-----+-----+-----+-----+-----+-----+
649 * | mapping[0] | mapping[1] |
650 * +-----+-----+-----+-----+-----+-----+-----+-----+
654 * +-----+-----+-----+-----+-----+-----+-----+-----+
655 * | mapping[N-2] | mapping[N-1] |
656 * +-----+-----+-----+-----+-----+-----+-----+-----+
659 * message and each mapping must specifies a queue between 0 and
660 * "multi-queue-num-queues" (see above).
661 * The backend may support a mapping table larger than can be
662 * mapped by a single grant reference. Thus sub-tables within a
664 * with differing offset values. Specifying a new sub-table does not
666 * The grant reference may be read-only and must remain valid until
670 * -----------------------------------------
684 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
686 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - The queue index is
688 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
689 * data = maximum number of entries allowed in the gref mapping table
693 * ------------------------------------
702 * data[1] = grant reference of page containing the mapping list
708 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
710 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - Operation failed
711 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
721 * ------------------------------------
730 * data[1] = grant reference of page containing the mapping list
736 * status = XEN_NETIF_CTRL_STATUS_NOT_SUPPORTED - Operation not
738 * XEN_NETIF_CTRL_STATUS_INVALID_PARAMETER - Operation failed
739 * XEN_NETIF_CTRL_STATUS_SUCCESS - Operation successful
760 * This is the 'wire' format for transmit (frontend -> backend) packets:
762 * Fragment 1: netif_tx_request_t - flags = NETTXF_*
764 * [Extra 1: netif_extra_info_t] - (only if fragment 1 flags include
767 * [Extra N: netif_extra_info_t] - (only if extra N-1 flags include
770 * Fragment N: netif_tx_request_t - (only if fragment N-1 flags include
771 * NETTXF_more_data - flags on preceding
779 * (backend -> frontend) packets. Specifically, in a multi-fragment
786 * tx request data (netif_tx_request_t)
787 * ------------------------------------
790 * +-----+-----+-----+-----+-----+-----+-----+-----+
792 * +-----+-----+-----+-----+-----+-----+-----+-----+
794 * +-----+-----+-----+-----+
802 * tx response (netif_tx_response_t)
803 * ---------------------------------
806 * +-----+-----+-----+-----+-----+-----+-----+-----+
808 * +-----+-----+-----+-----+-----+-----+-----+-----+
810 * +-----+-----+-----+-----+
818 * This is the 'wire' format for receive (backend -> frontend) packets:
820 * Fragment 1: netif_rx_request_t - flags = NETRXF_*
822 * [Extra 1: netif_extra_info_t] - (only if fragment 1 flags include
825 * [Extra N: netif_extra_info_t] - (only if extra N-1 flags include
828 * Fragment N: netif_rx_request_t - (only if fragment N-1 flags include
829 * NETRXF_more_data - flags on preceding
837 * (frontend -> backend) packets. Specifically, in a multi-fragment
844 * -------------------------------
847 * +-----+-----+-----+-----+-----+-----+-----+-----+
849 * +-----+-----+-----+-----+-----+-----+-----+-----+
855 * ---------------------------------
858 * +-----+-----+-----+-----+-----+-----+-----+-----+
860 * +-----+-----+-----+-----+-----+-----+-----+-----+
865 * status: -ve: NETIF_RSP_*; +ve: Rx'ed pkt size.
880 * The struct therefore needs to fit into either a tx or rx slot and
891 * -------------------------------
896 * +-----+-----+-----+-----+-----+-----+-----+-----+
898 * +-----+-----+-----+-----+-----+-----+-----+-----+
899 * | padding for tx |
900 * +-----+-----+-----+-----+
904 * padding for tx: present only in the tx case due to 8 octet limit
911 * +-----+-----+-----+-----+-----+-----+-----+-----+
913 * +-----+-----+-----+-----+-----+-----+-----+-----+
929 * +-----+-----+-----+-----+-----+-----+-----+-----+
931 * +-----+-----+-----+-----+-----+-----+-----+-----+
945 * +-----+-----+-----+-----+-----+-----+-----+-----+
946 * |type |flags|htype| alg |LSB ---- value ---- MSB|
947 * +-----+-----+-----+-----+-----+-----+-----+-----+
951 * htype: Hash type (one of _XEN_NETIF_CTRL_HASH_TYPE_* - see above)
953 * XEN_NETIF_CTRL_HASH_TYPE_ALGORITHM_* - see above)
984 #define XEN_NETIF_EXTRA_TYPE_NONE (0) /* Never used - invalid */
1075 #define NETIF_RSP_DROPPED -2
1076 #define NETIF_RSP_ERROR -1
1086 * c-file-style: "BSD"
1087 * c-basic-offset: 4
1088 * tab-width: 4
1089 * indent-tabs-mode: nil