From 9f6f4168b433c7e44308e7a8cfd3d7c8c6c5fc9b Mon Sep 17 00:00:00 2001 From: Ravi Pokala Date: Tue, 13 Oct 2020 20:41:51 +0000 Subject: [PATCH] Allow IP over IB to work with multiple FIBs. Call M_SETFIB() to make sure the IPoIB packet is directed to the correct interface-specific FIB. This was sufficient to allow general-purpose routing using the default FIB, and a separate FIB for routing between IPoIB on ib0 and IPoEthernet on mce0. Reviewed by: hselasky Obtained from: Anmol Kumar MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D25239 --- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c index 575938cb8cf0..09db0d78f24d 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1617,6 +1617,8 @@ ipoib_demux(struct ifnet *ifp, struct mbuf *m, u_short proto) m_freem(m); return; } + /* Direct packet to correct FIB based on interface config */ + M_SETFIB(m, ifp->if_fib); /* * Dispatch frame to upper layer. */