|
iPXE
|
Hyper-V network virtual service client. More...
Go to the source code of this file.
Data Structures | |
| struct | netvsc_header |
| NetVSC message header. More... | |
| NetVSC initialisation message. More... | |
| struct | netvsc_init_completion |
| NetVSC initialisation completion. More... | |
| NetVSC NDIS version message. More... | |
| NetVSC establish data buffer message. More... | |
| struct | netvsc_rx_buffer_section |
| NetVSC receive data buffer section. More... | |
| struct | netvsc_rx_establish_buffer_completion |
| NetVSC establish receive data buffer completion. More... | |
| struct | netvsc_tx_establish_buffer_completion |
| NetVSC establish transmit data buffer completion. More... | |
| NetVSC revoke data buffer message. More... | |
| NetVSC RNDIS message. More... | |
| struct | netvsc_ring |
| A NetVSC descriptor ring. More... | |
| struct | netvsc_buffer |
| A NetVSC data buffer. More... | |
| struct | netvsc_device |
| A NetVSC device. More... | |
Macros | |
| #define | NETVSC_MTU 512 |
| Maximum supported NetVSC message length. | |
| #define | NETVSC_MAX_WAIT_MS 1000 |
| Maximum time to wait for a transaction to complete. | |
| #define | NETVSC_TX_NUM_DESC 32 |
| Number of transmit ring entries. | |
| #define | NETVSC_RX_BUF_PAGESET 0xbead |
| RX data buffer page set ID. | |
| #define | NETVSC_RX_BUF_LEN ( 16 * PAGE_SIZE ) |
| RX data buffer length. | |
| #define | NETVSC_BASE_XID 0x18ae0000UL |
| Base transaction ID. | |
| #define | NETVSC_INIT_MSG 1 |
| NetVSC initialisation message. | |
| #define | NETVSC_VERSION_1 2 /* sic */ |
| Oldest known NetVSC protocol version. | |
| #define | NETVSC_INIT_CMPLT 2 |
| NetVSC initialisation completion. | |
| #define | NETVSC_NDIS_VERSION_MSG 100 |
| NetVSC NDIS version message. | |
| #define | NETVSC_NDIS_MAJOR 6 |
| NetVSC NDIS major version. | |
| #define | NETVSC_NDIS_MINOR 1 |
| NetVSC NDIS minor version. | |
| #define | NETVSC_RX_ESTABLISH_MSG 101 |
| NetVSC establish receive data buffer message. | |
| #define | NETVSC_RX_ESTABLISH_CMPLT 102 |
| NetVSC establish receive data buffer completion. | |
| #define | NETVSC_RX_REVOKE_MSG 103 |
| NetVSC revoke receive data buffer message. | |
| #define | NETVSC_TX_ESTABLISH_MSG 104 |
| NetVSC establish transmit data buffer message. | |
| #define | NETVSC_TX_ESTABLISH_CMPLT 105 |
| NetVSC establish transmit data buffer completion. | |
| #define | NETVSC_TX_REVOKE_MSG 106 |
| NetVSC revoke transmit data buffer message. | |
| #define | NETVSC_RNDIS_MSG 107 |
| NetVSC RNDIS message. | |
| #define | NETVSC_RNDIS_DATA 0 |
| RNDIS data channel (for RNDIS_PACKET_MSG only) | |
| #define | NETVSC_RNDIS_CONTROL 1 |
| RNDIS control channel (for all other RNDIS messages) | |
| #define | NETVSC_RNDIS_NO_BUFFER 0xffffffffUL |
| "No buffer used" index | |
Enumerations | |
| enum | netvsc_xrid { NETVSC_TX_BASE_XRID = 0 , NETVSC_INIT_XRID = ( NETVSC_TX_BASE_XRID + NETVSC_TX_NUM_DESC ) , NETVSC_NDIS_VERSION_XRID , NETVSC_RX_ESTABLISH_XRID , NETVSC_RX_REVOKE_XRID } |
| Relative transaction IDs. More... | |
| enum | netvsc_status { NETVSC_NONE = 0 , NETVSC_OK = 1 , NETVSC_FAIL = 2 , NETVSC_TOO_NEW = 3 , NETVSC_TOO_OLD = 4 , NETVSC_BAD_PACKET = 5 , NETVSC_BUSY = 6 , NETVSC_UNSUPPORTED = 7 } |
| NetVSC status codes. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| struct netvsc_header | __attribute__ ((packed)) |
| static | __attribute__ ((always_inline)) void netvsc_init_ring(struct netvsc_ring *ring |
| Initialise descriptor ring. | |
Variables | |
| uint32_t | type |
| Type. | |
| struct netvsc_header | header |
| Message header. | |
| uint32_t | min |
| Minimum supported protocol version. | |
| uint32_t | max = max |
| Maximum supported protocol version. | |
| uint8_t | reserved [20] |
| Reserved. | |
| uint32_t | version |
| Protocol version. | |
| uint32_t | max_mdl_len |
| Maximum memory descriptor list length. | |
| uint32_t | status |
| Status. | |
| uint32_t | major |
| Major version. | |
| uint32_t | minor |
| Minor version. | |
| uint32_t | gpadl |
| GPADL ID. | |
| uint16_t | pageset |
| Page set ID. | |
| uint32_t | start |
| Starting offset. | |
| uint32_t | len |
| Subsection length. | |
| uint32_t | count |
| Number of subsections. | |
| uint32_t | end |
| Ending offset. | |
| struct netvsc_rx_buffer_section | section [1] |
| Section descriptors. | |
| uint32_t | channel |
| RNDIS channel. | |
| uint32_t | buffer |
| Buffer index (or NETVSC_RNDIS_NO_BUFFER) | |
| struct netvsc_ring | __attribute__ |
| static unsigned int struct io_buffer ** | iobufs = iobufs |
| static unsigned int struct io_buffer uint8_t * | ids |
| static uint16_t struct vmbus_xfer_pages_operations * | op = op |
| static uint16_t struct vmbus_xfer_pages_operations uint8_t | establish_type = establish_type |
| static uint16_t struct vmbus_xfer_pages_operations uint8_t uint8_t | establish_xrid = establish_xrid |
| static uint16_t struct vmbus_xfer_pages_operations uint8_t uint8_t uint8_t | revoke_type = revoke_type |
| static uint16_t struct vmbus_xfer_pages_operations uint8_t uint8_t uint8_t uint8_t | revoke_xrid = revoke_xrid |
Hyper-V network virtual service client.
Definition in file netvsc.h.
| #define NETVSC_MTU 512 |
Maximum supported NetVSC message length.
Definition at line 13 of file netvsc.h.
Referenced by netvsc_open().
| #define NETVSC_MAX_WAIT_MS 1000 |
Maximum time to wait for a transaction to complete.
This is a policy decision.
Definition at line 19 of file netvsc.h.
Referenced by netvsc_control().
| #define NETVSC_TX_NUM_DESC 32 |
Number of transmit ring entries.
Must be a power of two. This is a policy decision. This value must be sufficiently small to guarantee that we never run out of space in the VMBus outbound ring buffer.
Definition at line 27 of file netvsc.h.
Referenced by netvsc_probe(), and netvsc_recv_completion().
| #define NETVSC_RX_BUF_PAGESET 0xbead |
RX data buffer page set ID.
This is a policy decision.
Definition at line 33 of file netvsc.h.
Referenced by netvsc_probe().
| #define NETVSC_RX_BUF_LEN ( 16 * PAGE_SIZE ) |
RX data buffer length.
This is a policy decision.
Definition at line 39 of file netvsc.h.
Referenced by netvsc_probe().
| #define NETVSC_BASE_XID 0x18ae0000UL |
Base transaction ID.
This is a policy decision.
Definition at line 45 of file netvsc.h.
Referenced by netvsc_cancel_transmit(), netvsc_control(), netvsc_recv_completion(), and netvsc_transmit().
| #define NETVSC_INIT_MSG 1 |
NetVSC initialisation message.
Definition at line 80 of file netvsc.h.
Referenced by netvsc_initialise().
| #define NETVSC_VERSION_1 2 /* sic */ |
Oldest known NetVSC protocol version.
Definition at line 95 of file netvsc.h.
Referenced by netvsc_initialise().
| #define NETVSC_INIT_CMPLT 2 |
NetVSC initialisation completion.
Definition at line 98 of file netvsc.h.
Referenced by netvsc_initialised().
| #define NETVSC_NDIS_VERSION_MSG 100 |
NetVSC NDIS version message.
Definition at line 115 of file netvsc.h.
Referenced by netvsc_ndis_version().
| #define NETVSC_NDIS_MAJOR 6 |
NetVSC NDIS major version.
Definition at line 130 of file netvsc.h.
Referenced by netvsc_ndis_version().
| #define NETVSC_NDIS_MINOR 1 |
NetVSC NDIS minor version.
Definition at line 133 of file netvsc.h.
Referenced by netvsc_ndis_version().
| #define NETVSC_RX_ESTABLISH_MSG 101 |
NetVSC establish receive data buffer message.
Definition at line 136 of file netvsc.h.
Referenced by netvsc_probe().
| #define NETVSC_RX_ESTABLISH_CMPLT 102 |
NetVSC establish receive data buffer completion.
Definition at line 139 of file netvsc.h.
Referenced by netvsc_rx_established_buffer().
| #define NETVSC_RX_REVOKE_MSG 103 |
NetVSC revoke receive data buffer message.
Definition at line 142 of file netvsc.h.
Referenced by netvsc_probe().
| #define NETVSC_TX_ESTABLISH_MSG 104 |
| #define NETVSC_TX_ESTABLISH_CMPLT 105 |
| #define NETVSC_TX_REVOKE_MSG 106 |
| #define NETVSC_RNDIS_MSG 107 |
NetVSC RNDIS message.
Definition at line 210 of file netvsc.h.
Referenced by netvsc_recv_data(), and netvsc_transmit().
| #define NETVSC_RNDIS_DATA 0 |
RNDIS data channel (for RNDIS_PACKET_MSG only)
Definition at line 227 of file netvsc.h.
Referenced by netvsc_transmit().
| #define NETVSC_RNDIS_CONTROL 1 |
RNDIS control channel (for all other RNDIS messages)
Definition at line 230 of file netvsc.h.
Referenced by netvsc_transmit().
| #define NETVSC_RNDIS_NO_BUFFER 0xffffffffUL |
| enum netvsc_xrid |
Relative transaction IDs.
Definition at line 48 of file netvsc.h.
| enum netvsc_status |
NetVSC status codes.
| Enumerator | |
|---|---|
| NETVSC_NONE | |
| NETVSC_OK | |
| NETVSC_FAIL | |
| NETVSC_TOO_NEW | |
| NETVSC_TOO_OLD | |
| NETVSC_BAD_PACKET | |
| NETVSC_BUSY | |
| NETVSC_UNSUPPORTED | |
Definition at line 62 of file netvsc.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise descriptor ring.
Check if NetVSC device is obsolete.
Initialise data buffer.
Check whether or not descriptor ring is empty.
Check whether or not descriptor ring is full.
| ring | Descriptor ring |
| count | Maximum number of used descriptors |
| iobufs | I/O buffers |
| ids | Buffer IDs |
| ring | Descriptor ring |
| is_full | Ring is full |
| ring | Descriptor ring |
| is_empty | Ring is empty |
| buffer | Data buffer |
| pageset | Page set ID |
| op | Page set operations |
| establish_type | Establish data buffer message type |
| establish_xrid | Establish data buffer relative transaction ID |
| revoke_type | Revoke data buffer message type |
| revoke_type | Revoke data buffer relative transaction ID |
| len | Required length |
| netvsc | NetVSC device |
| is_obsolete | NetVSC device is obsolete |
Check if NetVSC device is obsolete (i.e. was opened before the most recent Hyper-V reset).
Definition at line 272 of file netvsc.h.
References assert, count, netvsc_ring::count, netvsc_ring::id_cons, and netvsc_ring::id_prod.
| struct netvsc_header header |
| uint8_t major |
Major version.
Major version number.
Definition at line 3 of file netvsc.h.
Referenced by aoe_open(), aoe_parse_uri(), aoedev_open(), ar9300_comp_hdr_unpack(), and ar9300_eeprom_restore_internal().
| uint8_t minor |
Minor version.
Minor version number.
Definition at line 5 of file netvsc.h.
Referenced by aoe_open(), aoe_parse_uri(), aoedev_open(), ar9300_comp_hdr_unpack(), ar9300_eeprom_restore_internal(), and falcon_probe_nic_variant().
| uint32_t gpadl |
GPADL ID.
Definition at line 3 of file netvsc.h.
Referenced by netvsc_create_buffer(), vmbus_establish_gpadl(), vmbus_gpadl_is_obsolete(), vmbus_gpadl_teardown(), and vmbus_open().
| uint16_t pageset |
| buffer len |
Subsection length.
Buffer length.
Section length.
| unsigned int count |
| uint32_t end |
Ending offset.
Definition at line 7 of file netvsc.h.
Referenced by aes_setkey(), aoe_parse_uri(), apply_syslogs_settings(), arbel_map_vpm(), asn1_shrink(), bzimage_parse_cmdline(), cpio_parse_cmdline(), DEFINE_XEN_GUEST_HANDLE(), dns_encode(), eepro_transmit(), efi_aoe_path(), efi_block_exec(), efi_fcp_path(), efi_file_path_claim(), efi_ib_srp_path(), efi_ifr_end_op(), efi_ifr_package(), efi_image_path(), efi_iscsi_path(), efi_locate_device(), efi_netdev_path(), efi_path_len(), efi_path_terminate(), efi_paths(), efi_uri_path(), efi_usb_path(), efipci_ioremap(), elf_segment(), expand_settings(), fbcon_handle_sgr(), fdt_end(), fdt_parse(), FILE_LICENCE(), format_decimal(), format_hex(), hermon_map_vpm(), hide_region(), ib_srp_parse_integer(), ieee80211_ie_bound(), ieee80211_next_ie(), inet6_aton(), initrd_reshuffle(), initrd_squash_high(), initrd_swap_any(), int15_sync(), ipair_key(), ipair_rx_pair(), ipair_rx_pubkey(), ipair_rx_session(), ipair_tag(), ipv6_check_options(), iscsi_handle_maxburstlength_value(), pci_find_next(), peerblk_deliver(), peerblk_retrieval_rx(), peerdist_discovery_reply_values(), peerdist_info_block(), pem_asn1(), prep_segment(), relocate(), rsa_decrypt(), sec80211_detect_ie(), sec80211_find_rsn(), sis190_rx_fill(), skge_ramset(), sky2_ramset(), slam_parse_multicast_address(), strsep(), tcp_rx_opts(), tftp_process_blksize(), tftp_process_tsize(), tftp_rx_oack(), tkip_michael(), uhci_async_schedule(), uhci_enqueue(), uhci_periodic_schedule(), uheap_find(), usb_is_within_config(), usbio_open(), usbio_path(), and vsnprintf().
| struct netvsc_rx_buffer_section section[1] |
| uint8_t channel |
RNDIS channel.
Channel number.
Definition at line 3 of file netvsc.h.
Referenced by __setting(), ar5008_hw_process_ini(), ar9003_hw_process_ini(), ath5k_get_chan_pcal_surrounding_piers(), ath5k_get_max_ctl_power(), ath5k_get_rate_pcal_data(), ath5k_hw_chan_has_spur_noise(), ath5k_hw_channel(), ath5k_hw_commit_eeprom_settings(), ath5k_hw_disable_pspoll(), ath5k_hw_phy_calibrate(), ath5k_hw_reset(), ath5k_hw_rf2425_channel(), ath5k_hw_rf5110_calibrate(), ath5k_hw_rf5110_chan2athchan(), ath5k_hw_rf5110_channel(), ath5k_hw_rf5111_chan2athchan(), ath5k_hw_rf5111_channel(), ath5k_hw_rf5112_channel(), ath5k_hw_rf511x_calibrate(), ath5k_hw_rfregs_init(), ath5k_hw_set_txpower_limit(), ath5k_hw_tweak_initval_settings(), ath5k_hw_txpower(), ath5k_hw_write_ofdm_timings(), ath5k_setup_channel_powertable(), ath5k_unregister_leds(), ath9k_cmn_get_curchannel(), ath9k_hw_channel_change(), ath9k_hw_set_txpowerlimit(), ath_radio_disable(), ath_set_channel(), ath_update_survey_nf(), grf5101_rf_set_channel(), guestrpc_close(), guestrpc_command(), guestrpc_command_data(), guestrpc_command_len(), guestrpc_open(), guestrpc_reply_data(), guestrpc_reply_finish(), guestrpc_reply_len(), linda_ib_epb_mod_reg(), linda_set_serdes_param(), max2820_rf_set_channel(), net80211_change_channel(), png_pixels_pass(), qib7322_ahb_mod_reg_all(), rtl8225_rf_set_tx_power(), rtl8225z2_rf_set_tx_power(), sa2400_rf_set_channel(), vmbus_probe_channels(), and vmbus_reset_channels().
| buffer pages op = op |
Definition at line 327 of file netvsc.h.
Referenced by acpi_describe(), alloc_usb_bus(), ata_command(), bigint_ladder_raw(), bigint_multiply_one(), block_capacity(), block_read(), block_read_capacity(), block_write(), bofm_init(), cipher_cost(), dhcpv6_fetch(), dma_init(), dma_op_alloc(), dma_op_map(), dma_op_set_mask(), dma_op_umalloc(), edd_describe(), efi_describe(), efi_ifr_false_op(), efi_ifr_op(), efi_ifr_true_op(), efi_pxe_fake(), efipci_dma_map(), efipci_dma_set_mask(), FILE_LICENCE(), gpios_init(), ib_create_conn(), ib_create_cq(), ib_create_madx(), ib_create_path(), ib_create_qp(), ib_create_service_madx(), identify_device(), init_widget(), int13con_rw(), intelxl_context(), intelxl_context_dump(), intelxl_context_line(), intf_close(), intf_get_dest_op_no_passthru_untyped(), intf_poke(), job_progress(), mdio_init(), ndp_prefix_fetch(), netdev_fetch(), netdev_init(), netdev_store(), nii_get_station_address(), nii_initialise_flags(), nii_io(), nii_issue(), nii_issue_cpb(), nii_issue_cpb_db(), nii_issue_db(), nii_map(), nii_poll(), nii_set_rx_filters(), nii_set_station_address(), nii_transmit(), peerdisc_init(), peerdisc_stat(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI(), PROVIDE_DMAAPI_INLINE(), resolv_done(), rndis_init(), scsi_command(), scsi_response(), settings_init(), sky2_rx_add(), vmbus_open(), weierstrass_add_raw(), weierstrass_exec(), weierstrass_verify_raw(), xfer_alloc_iob(), xfer_buffer(), xfer_deliver(), xfer_vredirect(), xfer_window(), and xsigo_discover().