Subject: Re: Expose bond_xmit_hash function

From: Jay Vosburgh <[email-masked]>
Date: Wed, 15 Jan 2020 10:04:21 -0800

David Ahern <[email-masked]> wrote:

>On 1/15/20 9:48 AM, Jiri Pirko wrote:
>>>
>>> Right now, we have one of two options:
>>> 1. One-to-one copy/paste of that bond_xmit function to RDMA.
>>> 2. Add EXPORT_SYMBOL and call from RDMA.
>>>
>>> Do you have another solution to our undesire to do copy/paste in mind?
>> 
>> I presented it in this thread.

	Having the output of bond_xmit_hash would only allow matching
the egress slave in the RDMA code to the bonding selection if the RDMA
code also peeks into the bonding internal data structures to look at
bond->slave_arr.

	This is true whether it's EXPORTed or duplicated.

>Something similar is needed for xdp and not necessarily tied to a
>specific bond mode. Some time back I was using this as a prototype:
>
>https://github.com/dsahern/linux/commit/2714abc1e629613e3485b7aa860fa3096e273cb2
>
>It is incomplete, but shows the intent - exporting bond_egress_slave for
>use by other code to take a bond device and return an egress leg.

	This seems much less awful, but would it make bonding a
dependency on pretty much everything?

	-J

---
	-Jay Vosburgh, [email-masked]