Skip to content

freebsd add basic ethernet frames support#4252

Open
devnexen wants to merge 1 commit intorust-lang:mainfrom
devnexen:fbsd_ethernet
Open

freebsd add basic ethernet frames support#4252
devnexen wants to merge 1 commit intorust-lang:mainfrom
devnexen:fbsd_ethernet

Conversation

@devnexen
Copy link
Contributor

@rustbot
Copy link
Collaborator

rustbot commented Jan 24, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit but this looks good to me. @asomers could you take a look?

}
}

// FIXME(msrv): `derive` on packed structs cannot be used below 1.67
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds to me like a compelling reason to raise the main branch's MSRV. Why is it currently set to 1.63?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.63 is what Debian stable currently ships so it is a pretty common baseline in the ecosystem. In a few months Trixie will be released 1.83 (or higher) so we will probably be able to do another bump (not that high, but at least above 1.63).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stumbled across this again because considering a MSRV bump: what exactly happened at 1.67? Derive on packed structs seems to work all the way down to 1.0 https://rust.godbolt.org/z/qqPsT46zr.

Derive on packed structs without Copy is a newer feature as of 1.69, but everything we have is Copy anyway

}

pub {const} fn ETHER_IS_MULTICAST(addr: *mut u_char) -> bool {
(*addr.wrapping_add(0)) & 0x01 != 0x00
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that Clippy doesn't complain about the uselessness of wrapping_add(0).

@tgross35
Copy link
Contributor

@rustbot author could you remove wrapping_add(0)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants