Please note - you may want to validate whether the options used affect your setup.
Create a new service file.
nano /etc/systemd/system/disable-offloading.service
Paste the required information/command in the newly created service file - please change eth0 to your desired adapter.
[Unit]
Description=Disable NIC offloading
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -K eth0 gso off gro off tso off tx off rx off rxvlan off txvlan off sg off
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
Load the new service file and enable on reboot.
systemctl daemon-reexec && systemctl daemon-reload && systemctl enable disable-offloading.service
FYI, you're better off handling this in
/etc/systemd/network/10-eth0.link, not as a Service Unit. This will work for systemd version > 256.Or, alternatively, on Debian-based systems, using
/etc/network/interfaces: