Skip to content

Commit

Permalink
refactor net uio driver and improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Nguyen <[email protected]>
  • Loading branch information
dreamliner787-9 committed Oct 30, 2024
1 parent c4a3bd6 commit 9c67a44
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 144 deletions.
23 changes: 23 additions & 0 deletions tools/linux/include/uio/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@

typedef struct {
/* Any info that the VMM wants to give us go in here */

/* We need these as the network virtualisers give us physical addresses
in the data region, so we need the base to get the offsets to actually
read the data. */
uint64_t rx_paddr;
uint64_t tx_paddrs[NUM_NETWORK_CLIENTS];
} vmm_net_info_t;

/* These are where the UIO shared memory regions and IRQs live */
#define UIO_PATH_SDDF_NET_CONTROL_AND_DATA_QUEUES "/dev/uio0"

/* This is how the VMM notify us of notifications from virt TX and RX.
Once IRQ is enabled by writing to a UIO FD from these, a read on the same
FD will block until the VMM does a virq_inject on the associated IRQ number
in device tree. */
#define UIO_PATH_SDDF_NET_INCOMING_TX_IRQ "/dev/uio1"
#define UIO_PATH_SDDF_NET_INCOMING_RX_IRQ "/dev/uio2"

/* Data passing between the VMM and guest. Currently it is used for passing the
physical addresses of the data regions */
#define UIO_PATH_SDDF_NET_SHARED_DATA "/dev/uio3"

/* This is how the guest can signal back to VMM, the physical address of these
UIO regions are unmapped, so a fault is generated */
#define UIO_PATH_SDDF_NET_TX_FAULT_TO_VMM "/dev/uio4"
#define UIO_PATH_SDDF_NET_RX_FAULT_TO_VMM "/dev/uio5"
Loading

0 comments on commit 9c67a44

Please sign in to comment.