1. 15 Jan, 2020 4 commits
    • 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
    • Shrikrishna Khare's avatar
      fbcode_builder: getdeps: fboss: rename OpenBCM to OpenNSA · 0449e7e4
      Shrikrishna Khare authored
      Summary:
      Broadcom provides this library and they decided to rename it from OpenBCM to
      OpenNSA. Thus, rename corresponding fbcode_builder code.
      
      Reviewed By: wez
      
      Differential Revision: D19396687
      
      fbshipit-source-id: 8233dbf4de9342b5a0e54ae275d6c73d43abe6d0
      0449e7e4
    • Yedidya Feldblum's avatar
      Cut unused AsyncSocketException::SASL_HANDSHAKE_TIMEOUT · 777263f8
      Yedidya Feldblum authored
      Summary: [Folly] Cut unused `AsyncSocketException::SASL_HANDSHAKE_TIMEOUT`.
      
      Reviewed By: vitaut
      
      Differential Revision: D19343864
      
      fbshipit-source-id: ed4374bc2b376ff71e592323ed8c37290700e870
      777263f8
    • Konstantin Tsoy's avatar
      Add recvmmsg · be83edaf
      Konstantin Tsoy authored
      Summary: Add recvmmsg
      
      Differential Revision: D18927890
      
      fbshipit-source-id: de500dd1c266f21fbfc39c2972df787da50c7a80
      be83edaf
  2. 14 Jan, 2020 3 commits
  3. 13 Jan, 2020 7 commits
    • Phil Willoughby's avatar
      add FOLLY_ATTR_NO_UNIQUE_ADDRESS · 4ed21909
      Phil Willoughby authored
      Summary:
      Add `FOLLY_NO_UNIQUE_ADDRESS ` to expose C++20's `[[no_unique_address]]` where available.
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: pixelb
      
      Differential Revision: D19375089
      
      fbshipit-source-id: 9a83ae791002e02df5b93b61f20209e5f467a959
      4ed21909
    • Igor Sugak's avatar
      disable VDSO getcpu optimization in MSAN build mode · e1af1b05
      Igor Sugak authored
      Reviewed By: yfeldblum
      
      Differential Revision: D19359860
      
      fbshipit-source-id: b084d8cd603238e76d61de1eed3f233cf5b7fb27
      e1af1b05
    • Igor Sugak's avatar
      disable VDSO clock_gettime optimization in MSAN build mode · 800e1f62
      Igor Sugak authored
      Reviewed By: yfeldblum
      
      Differential Revision: D19359673
      
      fbshipit-source-id: 610ae77e205038267e0e331a04486eef0329c165
      800e1f62
    • Felix Handte's avatar
      IOBuf: Add goodSize() Allocation-Sizing Method · a113000d
      Felix Handte authored
      Summary:
      For long-lived IOBufs, it can be useful to know whether their memory footprint
      can be usefully shrunk. This diff exposes a method that lets users see the
      smallest capacity an IOBuf could have while wrapping a particularly sized
      object.
      
      Without this, they have to do hacky math.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18440359
      
      fbshipit-source-id: 1324700b58f0b2762cb3347b907ca5e04ebecb99
      a113000d
    • Gabriel Russo's avatar
      Remove unused initializer from abstract DefaultKeepAliveExecutor · 3c712d67
      Gabriel Russo authored
      Summary: This constructor would never be called since the class is abstract (the method `add` from `Executor` is not implemented). This causes a warning which fails builds because of `-Werror`.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D19345492
      
      fbshipit-source-id: 20f185e0903a03acbde2e55e5a575e20deb5ad2a
      3c712d67
    • Gabriel Russo's avatar
      Rename variable to remove shadow warning on FiberManagerInternal.h · 0ded2678
      Gabriel Russo authored
      Summary: This variable shadows the field `options_`, so rename it to get rid of the warning `constructor parameter 'options_' shadows the field 'options_' of 'FiberManager'` (which is turned into an error because of `-Werror`). This happens on clang 8.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D19331755
      
      fbshipit-source-id: 3615cf9b6c7516775f1dc198a08bc784a52c0fb4
      0ded2678
    • Dan Melnic's avatar
      Add non persistent events overflow tests · 50135cdf
      Dan Melnic authored
      Summary: Add non persistent events overflow tests
      
      Reviewed By: danobi, kevin-vigor
      
      Differential Revision: D19349804
      
      fbshipit-source-id: 360d1f41d074b3d1af5f163213dadfc35f28c353
      50135cdf
  4. 11 Jan, 2020 2 commits
    • Igor Sugak's avatar
      default initialize Synchronized test data · dec61fcb
      Igor Sugak authored
      Reviewed By: yfeldblum
      
      Differential Revision: D19357723
      
      fbshipit-source-id: d099419271f74b013a276079723250ce842e2b24
      dec61fcb
    • Yedidya Feldblum's avatar
      Fix evaluation-order assumption in futures varidic collect · 087f5273
      Yedidya Feldblum authored
      Summary: [Folly] Fix evaluation-order assumption in futures varidic collect - argument evaluation order is unspecified so it must not be relied on when side-effects must occur in a specific order.
      
      Reviewed By: lewissbaker
      
      Differential Revision: D19347873
      
      fbshipit-source-id: db4326d995a241619f96ff2bacdf5a5fa2332091
      087f5273
  5. 10 Jan, 2020 4 commits
  6. 09 Jan, 2020 6 commits
    • generatedunixname89002005287564's avatar
      Remove dead includes in folly/stats · 4e7473be
      generatedunixname89002005287564 authored
      Reviewed By: yfeldblum
      
      Differential Revision: D19328769
      
      fbshipit-source-id: 5d929eaa3bf4e2d0a63b8f1d95a613fee68525b4
      4e7473be
    • Dan Melnic's avatar
      Fix mem leak when running in overflow mode · 0923f2bd
      Dan Melnic authored
      Summary: Fix mem leak when running in overflow mode
      
      Reviewed By: danobi
      
      Differential Revision: D19333236
      
      fbshipit-source-id: f8a93113d095cb227808c9c8e5704112c7f5c4fb
      0923f2bd
    • Eric Niebler's avatar
      Remove folly's ColdClass, which was of dubious utility · 26f1c45b
      Eric Niebler authored
      Summary: `folly::cold_detail::ColdClass` was marking things (like `folly::Unexpected`) cold, but at the cost of inhibiting the inliner from doing its job. This is leading to bad codegen, which offsets any small wins we mind get for the `cold` attribute.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D19324159
      
      fbshipit-source-id: 7ed431b6c9d6e963c3bf438c707fa6cf6a38bf9d
      26f1c45b
    • Wez Furlong's avatar
      getdeps: dyndeps: gracefully handle empty files · c125c65e
      Wez Furlong authored
      Summary:
      Don't error out if we can't read the ELF/MACH-O header; just treat
      it is not an object.
      
      Reviewed By: chadaustin, simpkins
      
      Differential Revision: D19253434
      
      fbshipit-source-id: c5ecc7f0bc7a20e2611b7e2ff754355155f095da
      c125c65e
    • Gabriel Russo's avatar
      Remove static from for_each_impl · 821088c5
      Gabriel Russo authored
      Reviewed By: yfeldblum
      
      Differential Revision: D19312260
      
      fbshipit-source-id: 9751f70ac83d801cbc8708741e608f73cad8a464
      821088c5
    • Nick Terrell's avatar
      Remove compression counters · 870cfabf
      Nick Terrell authored
      Summary:
      We haven't found them super useful, so lets delete them and replace them with USDTs.
      
      The problems with the counters are:
      * We only have the aggregated results. We can't look at a particular process, stack trace, etc.
      * The speed reported isn't accurate.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18319361
      
      fbshipit-source-id: 778213fb63eae90cc7900b075e054c021ecf561e
      870cfabf
  7. 08 Jan, 2020 3 commits
    • Dan Melnic's avatar
      Add IP_BIND_ADDRESS_NO_PORT AsyncSocket support. Add the ability to set the... · f9eaa745
      Dan Melnic authored
      Add IP_BIND_ADDRESS_NO_PORT AsyncSocket support. Add the ability to set the socket options pre and post bind()
      
      Summary:
      Add IP_BIND_ADDRESS_NO_PORT AsyncSocket support. Add the ability to set the socket options pre and post bind()
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: danobi
      
      Differential Revision: D19315183
      
      fbshipit-source-id: a8dc330c1f585766a00ba7724dcd9f7a6e64bbfb
      f9eaa745
    • Eric Hammerle's avatar
      Fix leak when calling AsyncSSLSocket::cancelConnect() · 3289d2ed
      Eric Hammerle authored
      Summary: AsyncSSLSocket::connect() creates a new instance of AsyncSSLSocketConnector referred with a raw pointer and passes it to AsyncSocket::connect(). AsyncSSLSocket assumed a callback irrespective of connection success or failure so that this raw pointer will be properly disposed off.  However currently, if a connect attempt is cancelled the parent class may end up clearing the connect callback without invoking a connection error, thereby causing a leak. Since the cancelConnect() function also cancels the callback, the raw pointer should be cleaned up during cancellation.
      
      Reviewed By: knekritz
      
      Differential Revision: D18365027
      
      fbshipit-source-id: 2cc171fc1a026b771dcb0bdd7c45b7ee450b97f7
      3289d2ed
    • Yedidya Feldblum's avatar
      atomic_ref · 80d0f4b4
      Yedidya Feldblum authored
      Summary: [Folly] `folly::atomic_ref`, a partial backport of `std::atomic_ref` from C++20.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D18413170
      
      fbshipit-source-id: dddaabd69d2119ee695c75b214ca1c0204edfe6b
      80d0f4b4
  8. 07 Jan, 2020 3 commits
  9. 06 Jan, 2020 5 commits
  10. 05 Jan, 2020 1 commit
    • Igor Sugak's avatar
      fix implicit-integer-truncation UBSAN error in CompressionTest.cpp · d7f0e320
      Igor Sugak authored
      Summary:
      UndefinedBehaviorSanitizer: implicit-integer-truncation folly/compression/test/CompressionTest.cpp:111:34
      ```
      Note, this is not an undefined behavior, but usually is unintentional. In this case it's intentional, add an explicit static_cast to the destination type.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D19281230
      
      fbshipit-source-id: 5374028e551b96e757fbb9f63af2cbbd8ee100e6
      d7f0e320
  11. 04 Jan, 2020 1 commit
  12. 03 Jan, 2020 1 commit
    • Dan Melnic's avatar
      Use function ptr instead of std::function · 1ec49a66
      Dan Melnic authored
      Summary:
      Use function ptr instead of std::function
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: yfeldblum, kevin-vigor
      
      Differential Revision: D19277936
      
      fbshipit-source-id: 59c2c79ed07690ffe69461e6a90dbf8b297e51fa
      1ec49a66