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)
Wed, Feb 28, 4:30 PM
Unknown Object (File)
Feb 23 2024, 7:35 AM
Unknown Object (File)
Feb 11 2024, 4:34 PM
Unknown Object (File)
Dec 20 2023, 4:40 AM
Unknown Object (File)
Dec 3 2023, 4:08 PM
Unknown Object (File)
Dec 3 2023, 4:07 PM
Unknown Object (File)
Dec 3 2023, 4:07 PM
Unknown Object (File)
Dec 3 2023, 4:07 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 31258
Build 28905: arc lint + arc unit

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

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

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.