Page MenuHomeFreeBSD

Switch cxgbe interface lookup to use fibX_lookup() from older fibX_lookup_nh_ext().
ClosedPublic

Authored by melifaro on May 23 2020, 1:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 5:02 PM
Unknown Object (File)
Tue, Dec 3, 12:03 AM
Unknown Object (File)
Nov 12 2024, 11:35 AM
Unknown Object (File)
Nov 7 2024, 9:07 PM
Unknown Object (File)
Oct 28 2024, 2:17 AM
Unknown Object (File)
Oct 9 2024, 9:15 AM
Unknown Object (File)
Oct 4 2024, 3:55 AM
Unknown Object (File)
Sep 8 2024, 11:13 AM
Subscribers

Details

Summary

fibX_lookup_nh_ represents pre-epoch generation of fib api,
providing less guarantees over pointer validness and requiring
on-stack data copying.

NOTE: probably epoch coverage should be extended over entire c4iw_connect() to provide better guarantees over interface removal in-flight.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Include tom changes as well.

melifaro retitled this revision from Switch cxgbe interface lookup to use fibX_lookup() from older fibX_lookup_nh_ext(). to Switch cxgbe interface lookup to use fibX_lookup() from older fibX_lookup_nh_ext()..May 23 2020, 2:12 PM
melifaro edited the summary of this revision. (Show Details)

I will try this and let you know how it went by June 10.

In D24975#555169, @np wrote:

I will try this and let you know how it went by June 10.

That would be awesome!

np requested changes to this revision.Jun 15 2020, 7:32 PM

Seems like t4_listen is missing an include.

  • t4_listen.o ---

/root/ws/head/sys/dev/cxgbe/tom/t4_listen.c:1071:9: error: incomplete definition of type 'struct nhop_object'

if (nh->nh_ifp != ifp)
    ~~^

/root/ws/head/sys/net/route.h:53:9: note: forward declaration of 'struct nhop_object'

struct  nhop_object *ro_nh;
        ^

/root/ws/head/sys/dev/cxgbe/tom/t4_listen.c:1073:9: error: incomplete definition of type 'struct nhop_object'

if (nh->nh_flags & NHF_GATEWAY)
    ~~^

/root/ws/head/sys/net/route.h:53:9: note: forward declaration of 'struct nhop_object'

struct  nhop_object *ro_nh;
This revision now requires changes to proceed.Jun 15 2020, 7:32 PM
sys/dev/cxgbe/tom/t4_listen.c
1087 ↗(On Diff #72166)

This should be gw4_sa or it won't compile:
t4_listen.o ---
/root/ws/head/sys/dev/cxgbe/tom/t4_listen.c:1088:54: error: no member named 'sin_addr' in 'struct sockaddr'

((struct sockaddr_in *)dst)->sin_addr = nh->gw_sa.sin_addr;
                                        ~~~~~~~~~ ^

1 error generated.

sys/dev/cxgbe/iw_cxgbe/cm.c
2640 ↗(On Diff #72166)

cm.o ---
et is undefined.

/root/ws/head/sys/dev/cxgbe/iw_cxgbe/cm.c:2640:18: error: use of undeclared identifier 'et'

NET_EPOCH_ENTER(et);
                ^

/root/ws/head/sys/dev/cxgbe/iw_cxgbe/cm.c:2644:17: error: use of undeclared identifier 'et'

NET_EPOCH_EXIT(et);
               ^

This change works once the compilation issues are fixed.

This revision was not accepted when it landed; it landed in state Needs Revision.Jun 22 2020, 7:35 AM
This revision was automatically updated to reflect the committed changes.