X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_ethernet.h;h=2b9319b5590bbeeb52ef292cb0f89a8d7fff22f0;hb=999bf1e5f8fdfff9b15fab0d30a958ff59f0c734;hp=06dde7b8aed1027c067f1681ad67a952b2fb4b80;hpb=b349b55150ada21d3f973bf9a2571f7fd7312c4f;p=palacios.releases.git diff --git a/palacios/include/palacios/vmm_ethernet.h b/palacios/include/palacios/vmm_ethernet.h index 06dde7b..2b9319b 100644 --- a/palacios/include/palacios/vmm_ethernet.h +++ b/palacios/include/palacios/vmm_ethernet.h @@ -25,11 +25,29 @@ #define ETHERNET_PACKET_LEN (ETHERNET_HEADER_LEN + ETHERNET_MTU) #define ETH_ALEN 6 +#define MIN_MTU 68 +//#define MAX_MTU 65535 +#define MAX_MTU 9000 + +#define MAX_PACKET_LEN (ETHERNET_HEADER_LEN + MAX_MTU) + + +extern int v3_net_debug; #ifdef __V3VEE__ #include +#define V3_Net_Print(level, fmt, args...) \ + do { \ + if(level <= v3_net_debug) { \ + extern struct v3_os_hooks * os_hooks; \ + if ((os_hooks) && (os_hooks)->print) { \ + (os_hooks)->print((fmt), ##args); \ + } \ + } \ + } while (0) + struct nic_statistics { uint64_t tx_pkts; uint64_t tx_bytes; @@ -39,7 +57,8 @@ struct nic_statistics { uint64_t rx_bytes; uint64_t rx_dropped; - uint32_t interrupts; + uint32_t tx_interrupts; + uint32_t rx_interrupts; }; static inline int is_multicast_ethaddr(const uint8_t * addr)