eBPF helper function for attribute search in the netlink message
There are few network applications relying on Netlink subsystem to get notifications for net-device attribute changes like MTU, Speed, Oper-Status, Name, slave, slave info, etc. The Netlink subsystem notifies the application on every attribute change regardless of what is needed for the application. The attribute search support in EBPF filter helps to filter the Netlink packets based on the specific set of attributes that are needed for the application.
The classical BPF supports attribute search but that doesn't support MAPS. The extended BPF supports MAPS, but the attribute search is not enabled. Hence this patch enables the support for attribute search in EBPF.
This patch adds the support for following helper function. FN(skb_get_nlattr), FN(skb_get_nlattr_nest)
skb_get_nlattr: Find a specific attribute in a stream of attributes
skb_get_nlattr_nest: Find a specific attribute in a stream of nested attributes
is this upstream patch? if not, can you upstream this patch first?
is this upstream patch? if not, can you upstream this patch first?
We have already upstreamed this to the Linux community. But it is taking time to merge. https://www.spinics.net/lists/netdev/msg627990.html
I will address your comments and resubmit the patch agagin.
i looked the thread, the question is reasonable, we will need to wait till that one gets signed off.
Fixed the alignment issue and added the descriptive summary.
The PR 6131 provides the library support on how to use these attributes. https://github.com/Azure/sonic-buildimage/pull/6131
@Kalimuthu-Velappan , @lguohan , @paulmenzel - this one has been quiet for a few days - can we get it moving towards merge pls?
@lguohan - I'm not sure I understand your comment saying "i looked the thread, the question is reasonable, we will need to wait till that one gets signed off" - which thread and which question are you talking about please?
Could you please rebase it on the master branch? Currently already committed changes are present in the commit list.
retest this please
/easycla