On 4/12/22 7:22 AM, Nikolay Aleksandrov wrote: > Hi, > This patch-set adds support to specify filtering conditions for a bulk > delete (flush) operation. This version uses a new nlmsghdr delete flag > called NLM_F_BULK in combination with a new ndo_fdb_del_bulk op which is > used to signal that the driver supports bulk deletes (that avoids > pushing common mac address checks to ndo_fdb_del implementations and > also has a different prototype and parsed attribute expectations, more > info in patch 03). The new delete flag can be used for any RTM_DEL* > type, implementations just need to be careful with older kernels which > are doing non-strict attribute parses. Here I use the fact that mac overall it looks fine to me. The rollout of BULK delete for other commands will be slow so we need a way to reject the BULK flag if the handler does not support it. One thought is to add another flag to rtnl_link_flags (e.g., RTNL_FLAG_BULK_DEL_SUPPORTED) and pass that flag in for handlers that handle bulk delete and reject it for others in core rtnetlink code.