From 91c755b6b0d5d19989009e15ac7a94be503b782e Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Mon, 21 Dec 2020 12:03:39 +0100 Subject: [PATCH] Add missing rx stats to pcnet driver (#124) * Add missing rx stats to pcnet driver * Update changelog --- CHANGELOG.md | 3 +++ src/kernel/net/pcnet.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9abec7..ba8b5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## Unreleased + +- Add missing RX stats to PCNET driver ([#124](https://github.com/vinc/moros/pull/124)) +- Fix PCNET BCNT computation ([#122](https://github.com/vinc/moros/pull/122)) - Disable `rand_chacha` with `debug_assertions` ([#120](https://github.com/vinc/moros/pull/120)) - Migrate from TravisCI to GitHub Actions ([#131](https://github.com/vinc/moros/pull/131)) diff --git a/src/kernel/net/pcnet.rs b/src/kernel/net/pcnet.rs index fff2376..bfbc096 100644 --- a/src/kernel/net/pcnet.rs +++ b/src/kernel/net/pcnet.rs @@ -344,6 +344,7 @@ impl<'a> Device<'a> for PCNET { } if packet.len() > 0 { + self.stats.rx_add(packet.len() as u64); if self.debug_mode { //print!("Size: {} bytes\n", packet.len()); user::hex::print_hex(&packet);