We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9dc3b3 commit d5f9981Copy full SHA for d5f9981
src/drivers/net/virtio/mod.rs
@@ -54,9 +54,12 @@ pub struct RxQueues {
54
55
impl RxQueues {
56
pub fn new(vqs: Vec<VirtQueue>, dev_cfg: &NetDevCfg) -> Self {
57
- // See Virtio specification v1.1 - 5.1.6.3.1
+ // See Virtio specification v1.1 - 5.1.6.3.1 and 5.1.4.2
58
//
59
- let packet_size = if dev_cfg.features.contains(virtio::net::F::MRG_RXBUF) {
+ #[allow(clippy::decimal_literal_representation)]
60
+ let packet_size = if dev_cfg.features.contains(virtio::net::F::MTU) {
61
+ 65550
62
+ } else if dev_cfg.features.contains(virtio::net::F::MRG_RXBUF) {
63
1514
64
} else {
65
dev_cfg.raw.as_ptr().mtu().read().to_ne().into()
0 commit comments