safchain / ethtool

A simple ethtool "like" library for GO
Apache License 2.0
120 stars 69 forks source link

Setting GRO off #24

Open schmilmo opened 5 years ago

schmilmo commented 5 years ago

Hi,

I would like to use the library to disable GRO (generic receiver offload) I wasn't to understand if that is possible and how to do it.

Regards, Samuel

0x5a17ed commented 5 years ago

Should be possible through

t, _ := ethtool.NewEthtool()
_ := t.Change("enp5s0", map[string]bool{
    "rx-gro": false,
    "rx-gro-hw": false,
})

You can find a list of feature names under https://elixir.bootlin.com/linux/v5.1.9/source/net/core/ethtool.c#L61