Re: [PATCH net-next v3 03/10] net/sched: cls_flower: prepare fl_{set,dump}_key_flags() for ENC_FLAGS

From: Jakub Kicinski
Date: Thu Jul 11 2024 - 21:54:14 EST


On Tue, 9 Jul 2024 16:38:17 +0000 Asbjørn Sloth Tønnesen wrote:
> + if (NL_REQ_ATTR_CHECK(extack, NULL, tb, fl_mask)) {

Does this work with nest as NULL?

tb here is corresponding to attrs from tca[TCA_OPTIONS], so IIRC we need
to pass tca[TCA_OPTIONS] as nest here. Otherwise the decoder will look
for attribute with ID fl_mask at the root level, and the root attrs are
from the TCA_ enum.

Looks like Donald covered flower in Documentation/netlink/specs/tc.yaml
so you should be able to try to hit this using the Python ynl CLI:
https://docs.kernel.org/next/userspace-api/netlink/intro-specs.html#simple-cli
But to be honest I'm not 100% sure if the YNL reverse parser works with
TC and its "sub-message" polymorphism ;)
--
pw-bot: cr