diff --git a/sys/net/ifdi_if.m b/sys/net/ifdi_if.m --- a/sys/net/ifdi_if.m +++ b/sys/net/ifdi_if.m @@ -126,6 +126,18 @@ return (ENOTSUP); } + static int + null_get_rss_key(if_ctx_t _ctx __unused, struct ifrsskey *_key __unused) + { + return (EOPNOTSUPP); + } + + static int + null_get_rss_hash(if_ctx_t _ctx __unused, struct ifrsshash *_hash __unused) + { + return (EOPNOTSUPP); + } + static int null_vf_status(if_ctx_t _ctx __unused, struct if_vf_status **_status __unused) @@ -349,6 +361,20 @@ # optional methods # +# +# Report the programmed RSS key and hash selections under the context lock. +# Unsupported queries return EOPNOTSUPP; unavailable state returns an error. +# +METHOD int get_rss_key { + if_ctx_t _ctx; + struct ifrsskey *_key; +} DEFAULT null_get_rss_key; + +METHOD int get_rss_hash { + if_ctx_t _ctx; + struct ifrsshash *_hash; +} DEFAULT null_get_rss_hash; + METHOD int i2c_req { if_ctx_t _ctx; struct ifi2creq *_req; diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4976,6 +4976,16 @@ if_vlancap(ifp); break; } + case SIOCGIFRSSKEY: + CTX_LOCK(ctx); + err = IFDI_GET_RSS_KEY(ctx, (struct ifrsskey *)data); + CTX_UNLOCK(ctx); + break; + case SIOCGIFRSSHASH: + CTX_LOCK(ctx); + err = IFDI_GET_RSS_HASH(ctx, (struct ifrsshash *)data); + CTX_UNLOCK(ctx); + break; case SIOCGPRIVATE_0: case SIOCSDRVSPEC: case SIOCGDRVSPEC: