Skip to content

improve the logic of fallback from netlink to ioctl

Michal Kubecek netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2refactor interface between ioctl and netlink codeethtool.c netlink/extapi.h netlink/monitor.c +2 more+93 -470 replies
2/2netlink: use genetlink ops information to decide about fallbacknetlink/netlink.c netlink/netlink.h netlink/parser.c +1 more+129 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH ethtool 0/2] improve the logic of fallback from netlink to ioctl

At the moment, ethtool falls back to ioctl implementation whenever either in response to request type not implemented in kernel or netlink interface is unavailable or netlink request fails with EOPNOTSUPP error code. This is not perfect as EOPNOTSUPP can have different meanings and we only want to fall back if it is caused by kernel lacking netlink implementation of the request. In other cases, we would needlessly repeat the same failure trying both netlink and ioctl.

These two patches improve the logic to avoid such duplicate failures and improve handling of cases where fallback to ioctl is impossible for other reasons (e.g. wildcard device name or no ioctl handler).

Michal Kubecek (2):
refactor interface between ioctl and netlink code
netlink: use genetlink ops information to decide about fallback

 ethtool.c          |  51 +++---------
 netlink/extapi.h   |  14 ++--
 netlink/monitor.c  |  15 +++-
 netlink/netlink.c  | 193 ++++++++++++++++++++++++++++++++++++++-------
 netlink/netlink.h  |   6 ++
 netlink/parser.c   |   7 ++
 netlink/settings.c |   7 ++
 7 files changed, 220 insertions(+), 73 deletions(-)
Signature · 1 line
2.26.2