• Shrikrishna Khare's avatar
    OpenNSA: Don't use opennsl, switch to bcm-only API · 8dc11efb
    Shrikrishna Khare authored
    Summary:
    With the release of OpenNSA (https://github.com/Broadcom-Network-Switching-Software/OpenNSA), we can stop using opennsal altogether!
    
    This diff was created using following steps:
    
    cd fboss/agent
    find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/opennsl_spl_//g' {} \;
    find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/opennsl/bcm/g' {} \;
    find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/OPENNSL/BCM/g' {} \;
    find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/OpenNSL/Bcm/g' {} \; # for symbols like snmpBcmTransmittedPkts2048to4095Octets
    
    Furthermore:
    
    - In all TARGETS under fboss/agent replace wrapped_opennsl_symbols with wrapped_bcm_symbols.
    - hg mv agent/facebook/test/OpenNSLInterface.h agent/facebook/test/BcmInterface.h
    - BcmEgress.cpp remove operator== overload for opennsl API altogether, and remove operator== BCM API version from inside unnamed namespace, and put it in fboss namespace.
    - BcmCinter.h and BcmCinter.cpp now have some duplicate definitions as opennsl_ got renamed to bcm_. Delete one of the definitions "as appropriate".
    - Similarly, remove duplicate definitions in FakeSdk.h and FakeSdk.cpp
    - Similarly, remove duplicate definitions in SdkTracer.cpp (remove definitions calling CALL_WRAPPERS_RV_NO_CINTER). And lastly, remove CALL_WRAPPERS_RV_NO_CINTER itself.
    - arc lint
    - Remove OpennslCompatTests.cpp
    - Fix ./agent/hw/bcm/tests/facebook/BcmEgressTest.cpp to have #include
      "fboss/agent/facebook/test/MockOpenNSL.h" instead of MockBcm.h
    
    TODO:
    - This patch retains the directory structure (facebook/ subdirectory), which will be fixed in subsequent patches.
    - Remove opennsl references from TARGETS file, additional cleanup etc.
    - Remove all oss directories...
    
    Differential Revision: D16401189
    
    fbshipit-source-id: 607b6c0f97ffcacf3707f6b7a4c9454cc0b24476
    8dc11efb
fboss 467 Bytes