Skip to content

Commit

Permalink
remove trailing whitespaces
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Nguyen <[email protected]>
  • Loading branch information
dreamliner787-9 committed Nov 6, 2024
1 parent 06058d1 commit 4472e4a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
18 changes: 9 additions & 9 deletions examples/net/board/odroidc4/buildroot_config
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ BR2_PACKAGE_QT6_ARCH_SUPPORTS=y
# BR2_PACKAGE_BRLTTY is not set

#
# cc-tool needs a toolchain w/ C++, threads, wchar, gcc >= 4.9
# cc-tool needs a toolchain w/ C++, threads, wchar, gcc >= 4.9
#
# BR2_PACKAGE_CDRKIT is not set
BR2_PACKAGE_CPUBURN_ARM_ARCH_SUPPORTS=y
Expand Down Expand Up @@ -3270,35 +3270,35 @@ BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS=y
#

#
# Please note:
# Please note:
#

#
# - Buildroot does *not* generate binary packages,
# - Buildroot does *not* generate binary packages,
#

#
# - Buildroot does *not* install any package database.
# - Buildroot does *not* install any package database.
#

#
# *
# *
#

#
# It is up to you to provide those by yourself if you
# It is up to you to provide those by yourself if you
#

#
# want to use any of those package managers.
# want to use any of those package managers.
#

#
# *
# *
#

#
# See the manual:
# See the manual:
#

#
Expand Down
4 changes: 2 additions & 2 deletions examples/net/board/odroidc4/overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

secure-monitor {
status = "disabled";
};
};

bus@ff800000 {
// enable/disable console serial for debugging
// enable/disable console serial for debugging
serial@3000 {
status = "disabled";
};
Expand Down
2 changes: 1 addition & 1 deletion examples/net/echo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SYSTEM_FILE := ${ECHO_SERVER_PATCH}/board/$(MICROKIT_BOARD)/echo_server.system
IMAGE_FILE := loader.img
REPORT_FILE := report.txt

vpath %.c ${SDDF} ${LIBVMM} ${ECHO_SERVER}
vpath %.c ${SDDF} ${LIBVMM} ${ECHO_SERVER}

IMAGES := vmm_ethernet.elf lwip.elf benchmark.elf idle.elf network_virt_rx.elf\
network_virt_tx.elf copy.elf timer_driver.elf uart_driver.elf serial_virt_tx.elf
Expand Down
6 changes: 3 additions & 3 deletions examples/net/src/vmm_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ bool uio_net_from_vmm_rx_signal(size_t vcpu_id, uintptr_t addr, size_t fsr, seL4
{
microkit_notify(VIRT_NET_RX_CH);
return true;
}
}

void init(void) {
LOG_VMM("starting %s at \"%s\"\n", "ethernet driver vm", microkit_name);
Expand Down Expand Up @@ -147,7 +147,7 @@ void init(void) {
VIRTIO_CONSOLE_IRQ,
&serial_rxq, &serial_txq,
SERIAL_VIRT_TX_CH);

/* Initialise UIO IRQ for TX and RX path */
if (!virq_register(GUEST_VCPU_ID, UIO_NET_TX_IRQ, uio_net_to_vmm_ack, NULL)) {
LOG_VMM_ERR("Failed to register TX interrupt\n");
Expand All @@ -167,7 +167,7 @@ void init(void) {
vmm_info_passing->rx_paddr = eth_rx_buffer_data_region_paddr;
vmm_info_passing->tx_paddrs[0] = eth_tx_cli0_buffer_data_region_paddr;
vmm_info_passing->tx_paddrs[1] = eth_tx_cli1_buffer_data_region_paddr;

LOG_VMM("rx data physadd is 0x%p\n", vmm_info_passing->rx_paddr);
LOG_VMM("tx cli0 data physadd is 0x%p\n", vmm_info_passing->tx_paddrs[0]);
LOG_VMM("tx cli1 data physadd is 0x%p\n", vmm_info_passing->tx_paddrs[1]);
Expand Down
2 changes: 1 addition & 1 deletion tools/linux/net/board/odroidc4/net_driver_init
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
NET_INF='eth0'

# The sleep command is needed because the full eth uplink actually take place some time later
# after the `ip link set "$NET_INF" up` finish
# after the `ip link set "$NET_INF" up` finish
ip link show && ip link set "$NET_INF" up && sleep 8 && \

# Turn off HW offloading to prevent Linux from joining 2 TCP segments together which messes with LWIP badly
Expand Down
14 changes: 7 additions & 7 deletions tools/linux/uio_drivers/net/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define NET_DATA_REGION_BYTES NET_DATA_REGION_SIZE

/* IMPORTANT: This driver currently assumes the network interface
has an "Ethernet-like" MTU, you should change this if your net inf is
has an "Ethernet-like" MTU, you should change this if your net inf is
different. */
char frame[ETH_FRAME_LEN];

Expand Down Expand Up @@ -72,7 +72,7 @@ char *sddf_net_rx_outgoing_irq_fault_vaddr;
/* Polling FD to wait for events from the TX/RX UIO FD */
int epoll_fd;

/* UIO FDs to access the physical addresses of the sDDF data segment
/* UIO FDs to access the physical addresses of the sDDF data segment
so we can deduct it from the offset in control queue to access the data */
int uio_sddf_vmm_net_info_passing_fd;
vmm_net_info_t *vmm_info_passing;
Expand Down Expand Up @@ -128,7 +128,7 @@ int create_epoll(void) {
exit(EXIT_FAILURE);
}
return epoll_fd;
}
}

void bind_fd_to_epoll(int fd, int epollfd) {
struct epoll_event sock_event;
Expand Down Expand Up @@ -181,17 +181,17 @@ void tx_process(void) {
if (net_dequeue_active(&tx_queue, &tx_buffer) != 0) {
LOG_NET_ERR("couldn't dequeue active TX buffer, sddf err is %d, quitting.\n");
exit(EXIT_FAILURE);
}
}

// Workout which client it is from, so we can get the offset in data region
uintptr_t dma_tx_addr = tx_buffer.io_or_offset;
uintptr_t tx_data_offset;
int tx_client;
bool tx_data_paddr_found = false;
for (int i = 0; i < NUM_NETWORK_CLIENTS; i++) {
if (dma_tx_addr >= vmm_info_passing->tx_paddrs[i] &&
if (dma_tx_addr >= vmm_info_passing->tx_paddrs[i] &&
dma_tx_addr < (vmm_info_passing->tx_paddrs[i] + NET_DATA_REGION_BYTES)) {

tx_data_offset = dma_tx_addr - vmm_info_passing->tx_paddrs[i];
tx_client = i;
tx_data_paddr_found = true;
Expand Down Expand Up @@ -266,7 +266,7 @@ void rx_process(void) {
exit(EXIT_FAILURE);
}

// Convert DMA addr from virtualiser to offset then mem copy
// Convert DMA addr from virtualiser to offset then mem copy
uintptr_t offset = buffer.io_or_offset - vmm_info_passing->rx_paddr;
char *buf_in_sddf_rx_data = (char *) ((uintptr_t) rx_data_drv + offset);
for (uint64_t i = 0; i < num_bytes; i++) {
Expand Down

0 comments on commit 4472e4a

Please sign in to comment.