FreeBSD kernel /amd64 XEN device code
xnb_softc Struct Reference
Collaboration diagram for xnb_softc:

Data Fields

device_t dev
 
struct ifmedia sc_media
 
struct ifnet * xnb_ifp
 
unsigned carrier
 
uint8_t mac [ETHER_ADDR_LEN]
 
int abi
 The netif protocol abi in effect. More...
 
char * bridge
 
evtchn_port_t evtchn
 
long handle
 
xen_intr_handle_t xen_intr_handle
 
domid_t otherend_id
 Cached value of the front-end's domain id. More...
 
uint8_t can_sg
 
uint8_t gso
 
uint8_t gso_prefix
 
uint8_t ip_csum
 
gnttab_copy_table rx_gnttab
 
gnttab_copy_table tx_gnttab
 
struct resource * pseudo_phys_res
 
int pseudo_phys_res_id
 
struct xnb_ring_config ring_configs [XNB_NUM_RING_TYPES]
 
vm_offset_t kva
 
uint64_t gnt_base_addr
 
xnb_flag_t flags
 
struct mtx rx_lock
 
struct mtx sc_lock
 
struct mtx tx_lock
 
int kva_size
 
char if_name [IFNAMSIZ]
 

Detailed Description

Per-instance configuration data.

Definition at line 389 of file netback.c.

Field Documentation

◆ abi

int xnb_softc::abi

The netif protocol abi in effect.

There are situations where the back and front ends can have a different, native abi (e.g. intel x86_64 and 32bit x86 domains on the same machine). The back-end always accommodates the front-end's native abi. That value is pulled from the XenStore and recorded here.

Definition at line 418 of file netback.c.

◆ bridge

char* xnb_softc::bridge

Name of the bridge to which this VIF is connected, if any This field is dynamically allocated by xenbus and must be free()ed when no longer needed

Definition at line 425 of file netback.c.

Referenced by xnb_collect_xenstore_info(), and xnb_disconnect().

◆ can_sg

uint8_t xnb_softc::can_sg

Undocumented frontend feature. Has something to do with scatter/gather IO

Definition at line 449 of file netback.c.

Referenced by xnb_collect_xenstore_info().

◆ carrier

unsigned xnb_softc::carrier

Our own private carrier state

Definition at line 402 of file netback.c.

Referenced by create_netdev(), xnb_connect(), xnb_shutdown(), and xnb_start_locked().

◆ dev

◆ evtchn

evtchn_port_t xnb_softc::evtchn

The interrupt driven even channel used to signal ring events.

Definition at line 428 of file netback.c.

Referenced by xnb_collect_xenstore_info(), and xnb_connect_comms().

◆ flags

xnb_flag_t xnb_softc::flags

Various configuration and state bit flags.

Definition at line 492 of file netback.c.

Referenced by xnb_connect(), xnb_connect_comms(), xnb_disconnect(), and xnb_shutdown().

◆ gnt_base_addr

uint64_t xnb_softc::gnt_base_addr

Pseudo-physical address corresponding to kva.

Definition at line 489 of file netback.c.

Referenced by xnb_alloc_communication_mem(), xnb_connect_ring(), and xnb_free_communication_mem().

◆ gso

uint8_t xnb_softc::gso

Undocumented frontend feature

Definition at line 451 of file netback.c.

Referenced by xnb_collect_xenstore_info().

◆ gso_prefix

uint8_t xnb_softc::gso_prefix

Undocumented frontend feature

Definition at line 453 of file netback.c.

Referenced by xnb_collect_xenstore_info().

◆ handle

long xnb_softc::handle

Xen device handle.

Definition at line 431 of file netback.c.

Referenced by create_netdev(), and xnb_collect_xenstore_info().

◆ if_name

char xnb_softc::if_name[IFNAMSIZ]

Name of the interface

Definition at line 507 of file netback.c.

Referenced by create_netdev().

◆ ip_csum

uint8_t xnb_softc::ip_csum

Can checksum TCP/UDP over IPv4

Definition at line 455 of file netback.c.

Referenced by xnb_collect_xenstore_info().

◆ kva

vm_offset_t xnb_softc::kva

Global pool of kva used for mapping remote domain ring and I/O transaction data.

Definition at line 486 of file netback.c.

Referenced by xnb_alloc_communication_mem(), xnb_connect_ring(), and xnb_free_communication_mem().

◆ kva_size

int xnb_softc::kva_size

The size of the global kva pool.

Definition at line 504 of file netback.c.

Referenced by xnb_alloc_communication_mem().

◆ mac

uint8_t xnb_softc::mac[ETHER_ADDR_LEN]

Device MAC Address

Definition at line 405 of file netback.c.

Referenced by create_netdev().

◆ otherend_id

domid_t xnb_softc::otherend_id

Cached value of the front-end's domain id.

This value is used at once for each mapped page in a transaction. We cache it to avoid incuring the cost of an ivar access every time this is needed.

Definition at line 443 of file netback.c.

Referenced by xnb_attach(), xnb_connect_comms(), xnb_connect_ring(), xnb_intr(), and xnb_start_locked().

◆ pseudo_phys_res

struct resource* xnb_softc::pseudo_phys_res

Resource representing allocated physical address space associated with our per-instance kva region.

Definition at line 474 of file netback.c.

Referenced by xnb_alloc_communication_mem(), and xnb_free_communication_mem().

◆ pseudo_phys_res_id

int xnb_softc::pseudo_phys_res_id

Resource id for allocated physical address space.

Definition at line 477 of file netback.c.

Referenced by xnb_alloc_communication_mem(), and xnb_free_communication_mem().

◆ ring_configs

struct xnb_ring_config xnb_softc::ring_configs[XNB_NUM_RING_TYPES]

Ring mapping and interrupt configuration data.

Definition at line 480 of file netback.c.

Referenced by xnb_alloc_communication_mem(), xnb_attach(), xnb_collect_xenstore_info(), xnb_connect_ring(), xnb_disconnect(), xnb_dump_rings(), xnb_intr(), and xnb_start_locked().

◆ rx_gnttab

gnttab_copy_table xnb_softc::rx_gnttab

Preallocated grant table copy descriptor for RX operations. Access must be protected by rx_lock

Definition at line 462 of file netback.c.

Referenced by xnb_start_locked().

◆ rx_lock

struct mtx xnb_softc::rx_lock

Mutex protecting per-instance data in the receive path.

Definition at line 495 of file netback.c.

Referenced by create_netdev(), xnb_detach(), xnb_disconnect(), and xnb_start().

◆ sc_lock

struct mtx xnb_softc::sc_lock

Mutex protecting per-instance data in the softc structure.

Definition at line 498 of file netback.c.

Referenced by create_netdev(), xnb_detach(), xnb_disconnect(), xnb_frontend_changed(), xnb_ifinit(), xnb_ifinit_locked(), xnb_ioctl(), xnb_shutdown(), and xnb_stop().

◆ sc_media

struct ifmedia xnb_softc::sc_media

Generic network media state

Definition at line 396 of file netback.c.

Referenced by create_netdev(), and xnb_ioctl().

◆ tx_gnttab

gnttab_copy_table xnb_softc::tx_gnttab

Preallocated grant table copy descriptor for TX operations. Access must be protected by tx_lock

Definition at line 468 of file netback.c.

Referenced by xnb_intr().

◆ tx_lock

struct mtx xnb_softc::tx_lock

Mutex protecting per-instance data in the transmit path.

Definition at line 501 of file netback.c.

Referenced by create_netdev(), xnb_detach(), xnb_disconnect(), and xnb_intr().

◆ xen_intr_handle

xen_intr_handle_t xnb_softc::xen_intr_handle

Handle to the communication ring event channel.

Definition at line 434 of file netback.c.

Referenced by xnb_connect_comms(), xnb_disconnect(), xnb_intr(), and xnb_start_locked().

◆ xnb_ifp

struct ifnet* xnb_softc::xnb_ifp

Media carrier info

Definition at line 399 of file netback.c.

Referenced by create_netdev(), xnb_ifinit_locked(), xnb_intr(), xnb_shutdown(), and xnb_stop().


The documentation for this struct was generated from the following file: