Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just like the mptcp_subflow bpf_iter used to implement the MPTCP BPF packet scheduler, another bpf_iter is also needed, named mptcp_address, to traverse all address entries on userspace_pm_local_addr_list of an MPTCP socket for implementing the MPTCP BPF path manager. In kernel space, we walk this list like this: list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) kfunc(entry); With the mptcp_address bpf_iter, bpf_for_each() can be used to do the same thing in BPF program: bpf_for_each(mptcp_address, entry, msk) kfunc(entry); This bpf_iter should be invoked under holding the msk pm lock, so use lockdep_assert_held() to assert the lock is holding. Signed-off-by: Geliang Tang <[email protected]>
- Loading branch information