From 7d561c713f0263874fd098bfefed4978c8a8fcd8 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Fri, 1 May 2020 21:55:50 -0700 Subject: [PATCH] Update userspace utils --- utils/mqnic-dump.c | 6 ++++++ utils/mqnic.c | 1 + utils/mqnic.h | 1 + 3 files changed, 8 insertions(+) diff --git a/utils/mqnic-dump.c b/utils/mqnic-dump.c index 77faab4f2..f22a4f765 100644 --- a/utils/mqnic-dump.c +++ b/utils/mqnic-dump.c @@ -142,6 +142,7 @@ int main(int argc, char *argv[]) struct mqnic_if *dev_interface = &dev->interfaces[interface]; printf("IF ID: 0x%08x\n", dev_interface->if_id); + printf("IF features: 0x%08x\n", dev_interface->if_features); printf("Event queue count: %d\n", dev_interface->event_queue_count); printf("Event queue offset: 0x%08x\n", dev_interface->event_queue_offset); @@ -167,12 +168,17 @@ int main(int argc, char *argv[]) struct mqnic_port *dev_port = &dev_interface->ports[port]; printf("Port ID: 0x%08x\n", dev_port->port_id); + printf("Port features: 0x%08x\n", dev_port->port_features); + printf("Port MTU: %d\n", dev_port->port_mtu); printf("Sched count: %d\n", dev_port->sched_count); printf("Sched offset: 0x%08x\n", dev_port->sched_offset); printf("Sched stride: 0x%08x\n", dev_port->sched_stride); printf("Sched type: 0x%08x\n", dev_port->sched_type); + printf("TX MTU: %d\n", mqnic_reg_read32(dev_port->regs, MQNIC_PORT_REG_TX_MTU)); + printf("RX MTU: %d\n", mqnic_reg_read32(dev_port->regs, MQNIC_PORT_REG_RX_MTU)); + if (dev->phc_count > 0) { printf("TDMA control: 0x%08x\n", mqnic_reg_read32(dev_port->regs, MQNIC_PORT_REG_TDMA_CTRL)); diff --git a/utils/mqnic.c b/utils/mqnic.c index 2b57d14a9..835c73f7c 100644 --- a/utils/mqnic.c +++ b/utils/mqnic.c @@ -166,6 +166,7 @@ struct mqnic *mqnic_open(const char *dev_name) port->port_id = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_PORT_ID); port->port_features = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_PORT_FEATURES); + port->port_mtu = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_PORT_MTU); port->sched_count = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_SCHED_COUNT); port->sched_offset = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_SCHED_OFFSET); diff --git a/utils/mqnic.h b/utils/mqnic.h index 7e50d3c38..870365b36 100644 --- a/utils/mqnic.h +++ b/utils/mqnic.h @@ -61,6 +61,7 @@ struct mqnic_port { uint32_t port_id; uint32_t port_features; + uint32_t port_mtu; uint32_t sched_count; uint32_t sched_offset;