-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core/dhcp: Lease time support #148
base: master
Are you sure you want to change the base?
Conversation
last_byte = Signal() | ||
|
||
self.comb += [ | ||
# @Florent: Is this necessary? Can we assume last_be is 0b1000 For non-last words? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@enjoy-digital See comment
d24c507
to
e80bc7e
Compare
@enjoy-digital This works now and is ready for review. Since the DHCP module can now be self-contained I removed the exposed signals in the core generator. |
e80bc7e
to
c5cd221
Compare
@enjoy-digital Just pinging you so it doesn't fly under the radar. I would like it if this can get merged since I really prefer to use the upstream liteeth instead of a mass of custom PR :). |
@rowanG077: Thanks for the PR and sorry for the delay. I'll try to plan some time to look at this very soon. |
core/dhcp.py: Add lease time support
@enjoy-digital I hate to bother you with this but this and other PRs have been waiting for a while. This means we currently diverge quite a bit from upstream liteeth and I don't really want that. If you want me to put this PR in a different form or walk you through the changes I can do so as well. |
Hi @rowanG077, sorry for the delay, lots of different priorities to handle but I'll try to do a closer review soon to avoid blocking things. |
This PR adds DHCP lease time support. To do that a DHCP OPTIONS parser is implemented.
At first I tried to do it fully in the 32-bit datapath. But it's simply too much. Header can be at any position, Multiple options per 32-bit packet are possible, padding which increases variety even more... If LiteX had some kind of function support It would be possible but I simply don't know how to express that.
So in the end I decided to just bite the bullet and do options parsing with 8-bit width.
Another problem that is fixed now is that
MESSAGETYPE
option no longer is assumed to be first option. The spec does not say it must be the first option so this could be very problematic for some Liteeth DHCP server combinations.I did already add gateway and netmask parsing but they aren't wired up.
TODOs:
start
,timeout
anddone
signals