Skip to content

Create nic-offloading-fix.sh #310

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

Closed
wants to merge 19 commits into from
Closed

Conversation

rcastley
Copy link
Contributor

@rcastley rcastley commented May 11, 2025

🛑 New scripts must first be submitted to ProxmoxVED for testing.
PRs for new scripts that skip this process will be closed.


✍️ Description

Helper script based on the fix found at - https://gist.github.com/crypt0rr/60aaabd4a5c29a256b4f276122765237.

There is a known issue with Intel NIC e1000e hanging. More details - https://www.reddit.com/r/Proxmox/comments/1drs89s/intel_nic_e1000e_hardware_unit_hang/

This Helper Script has been created to help resolve the issue using the solutions found on GitHub etc. This is not my fix I have just created a Helper Script around the solution that will hopefully help many others.

🔗 Related PR / Issue

Link: N/A

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

📋 Additional Information (optional)

@rcastley rcastley requested a review from a team as a code owner May 11, 2025 14:47
@andrebrait
Copy link

If the bug is specific to e1000e, how about perhaps filtering on interfaces that use that?

Added rx/tx tuning settings
@rcastley
Copy link
Contributor Author

Updated to only filter on e1000e interfaces, thank you 👍🏻

@MickLesk
Copy link
Member

I cant test it, but we can improve the Script himself. We have an core.func in VED Repo for all colors, spinners, msgs, ... that can you source in, and remove echos and co.

@rcastley
Copy link
Contributor Author

@MickLesk Thank you ... if you could point to an example script that would be awesome ... I am a few weeks into Proxmox and learning as I go ... thank you for your input.

@andrebrait
Copy link

andrebrait commented May 13, 2025

Suggestion to make this perhaps even more "bullet-proof": instead of generating one systemd service per interface currently installed, how about generate a single systemd service that checks for every interface using the e1000e driver and disables the offloads for them?

That way, even if you (un)install a e1000e interface in the future, you'll still have the offloads properly disabled. And logging stuff on the systemd service and indicating statuses with the return codes for it should work well and be easy to manage/monitor as well.

Or perhaps make that an option/alternative to this approach.

EDIT: although in this case it gets harder to make the script this user-friendly and have confirmation prompts and all that.

Copy link
Member

@MickLesk MickLesk left a comment

Choose a reason for hiding this comment

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

short comments about sourcing the core.func for colors, variables, msg's ...

@rcastley
Copy link
Contributor Author

@MickLesk @andrebrait Thank you for your detailed feedback ... I will work on your suggestion and detailed help 👍🏻

@andrebrait
Copy link

FYI I made this gist based off your MR. Perhaps there are some ideas you might use there: https://gist.github.com/andrebrait/52b22d99f6bdad25cd3f4e1cecd69c15

@rcastley
Copy link
Contributor Author

image

@MickLesk
Copy link
Member

ping @community-scripts/contributor if it ready to merge

@rcastley

This comment was marked as off-topic.

@rcastley rcastley requested a review from MickLesk May 14, 2025 15:35
@barthoefs
Copy link

Hello,

I tested the script and got this error:

× disable-nic-offload-enp0s25.service - Disable NIC offloading for Intel e1000e interface enp0s25
     Loaded: loaded (/etc/systemd/system/disable-nic-offload-enp0s25.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2025-05-19 08:38:37 CEST; 44s ago
   Main PID: 12341 (code=exited, status=1/FAILURE)
        CPU: 24ms

May 19 08:38:37 proxmox1 systemd[1]: Starting disable-nic-offload-enp0s25.service - Disable NIC offloading for Intel e1000e interface enp0s25...
May 19 08:38:37 proxmox1 ethtool[12341]: netlink error: cannot modify an unsupported parameter (offset 44)
May 19 08:38:37 proxmox1 ethtool[12341]: netlink error: Invalid argument
May 19 08:38:37 proxmox1 systemd[1]: disable-nic-offload-enp0s25.service: Main process exited, code=exited, status=1/FAILURE
May 19 08:38:37 proxmox1 systemd[1]: disable-nic-offload-enp0s25.service: Failed with result 'exit-code'.
May 19 08:38:37 proxmox1 systemd[1]: Failed to start disable-nic-offload-enp0s25.service - Disable NIC offloading for Intel e1000e interface enp0s25.

What to fix?

@barthoefs
Copy link

@rcastley

After some testing it seems the issue is with this:

root@proxmox1:~# /sbin/ethtool -C enp0s25 rx-usecs 3
root@proxmox1:~# /sbin/ethtool -C enp0s25 tx-usecs 3
netlink error: cannot modify an unsupported parameter (offset 36)
netlink error: Invalid argument
root@proxmox1:~# /sbin/ethtool -C enp0s25 rx-usecs 3 tx-usecs 3
netlink error: cannot modify an unsupported parameter (offset 44)
netlink error: Invalid argument

The tx-usecs parameter seems to be not supported?

root@proxmox1:~# /sbin/ethtool -c enp0s25 
Coalesce parameters for enp0s25:
Adaptive RX: n/a  TX: n/a
stats-block-usecs: n/a
sample-interval: n/a
pkt-rate-low: n/a
pkt-rate-high: n/a

rx-usecs: 3
rx-frames: n/a
rx-usecs-irq: n/a
rx-frames-irq: n/a

tx-usecs: n/a
tx-frames: n/a
tx-usecs-irq: n/a
tx-frames-irq: n/a

rx-usecs-low: n/a
rx-frame-low: n/a
tx-usecs-low: n/a
tx-frame-low: n/a

rx-usecs-high: n/a
rx-frame-high: n/a
tx-usecs-high: n/a
tx-frame-high: n/a

CQE mode RX: n/a  TX: n/a

@andrebrait
Copy link

The script probably needs a step to check which, if any, parameters are supported for each detected interface

@rcastley
Copy link
Contributor Author

@barthoefs Thank you for testing and providing feedback ... I am looking into this and will either fix or remove this feature.

@rcastley rcastley requested a review from a team as a code owner May 25, 2025 18:55
@rcastley
Copy link
Contributor Author

Should I move this script under misc instead of tools/pve as the autolabeler is not configured for additions to this directory?

@MickLesk
Copy link
Member

Clean your PR please ^^

Tools/PVE is the correct path, i can move it everywhere after merge

@rcastley
Copy link
Contributor Author

I have no clue how to clean a PR so I am going to create a new PR with the 2 files that are required for this and then raise a separate PR for the typo fix for the autolabeler ... hope that is OK?

@rcastley rcastley closed this May 25, 2025
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.

6 participants