Commit Graph

1562 Commits

Author SHA1 Message Date
Tamir Duberstein 76e95f6afd
Generalize pthread TLS to any trivial type (#27009)
* Avoid copy constructor

```
src/core/lib/gpr/log_linux.cc:78:33: error: copying variable of type 'grpc_core::PthreadTlsImpl<long>' invokes deleted constructor
  static GPR_THREAD_LOCAL(long) tid = 0;
                                ^     ~
./src/core/lib/gpr/tls.h:64:3: note: 'PthreadTlsImpl' has been explicitly marked deleted here
  PthreadTlsImpl(const PthreadTlsImpl&) = delete;
  ^
1 error generated.
```

* Generalize pthread TLS to any trivial type

Use multiple pthread keys for types larger than a machine word.

Implement generic timer TLS optimization on all platforms.
2021-08-30 11:32:47 -07:00
Craig Tiller 1ce8bd7067
Observable primitive for promises (#27082)
* promise sequences

* Activities for promises

* Observable primitive - single writer/multiple reader

* Automated change: Fix sanity tests

* dedup some code

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-27 14:56:48 -07:00
Craig Tiller 12cd59426b
Latch synchronization primitive (#27080)
* promise sequences

* Activities for promises

* Latch synchronization primitive

* Wakeups between actors in the same activity

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-27 12:43:28 -07:00
Ta-Wei Tu ab57f03b30
Reland: Import binder transport tests (#27138)
* Import binder transport tests

* Fix copybara import errors

* Add testonly labels
2021-08-26 15:33:37 +08:00
Ashitha Santhosh 1ff1f8fd83
SDK authorization filter. (#26468)
* SDK authorization filter.
2021-08-25 21:00:35 -07:00
Craig Tiller 90c4a2a5eb
Revert "Import binder transport tests (#26970)" (#27126)
This reverts commit 006464c57d.
2021-08-25 09:56:22 -07:00
Ta-Wei Tu 006464c57d
Import binder transport tests (#26970)
This PR imports unit tests and end-to-end tests of binder transport from the internal repository. No further changes will be made to internal repository.
2021-08-25 17:56:35 +08:00
Craig Tiller 5cdaec9a4f
Promise Activities (#26921)
* promise sequences

* Activities for promises

* Automated change: Fix sanity tests

* review feedback

* review feedback

* review feedback

* review feedback

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-24 22:21:58 -07:00
Craig Tiller 6a06f0cd4a
promise sequences (#27058) 2021-08-23 17:39:12 -07:00
Craig Tiller 46afdf9989
Add test and mitigation for clang 11 compiler bug (#27073)
* Add test and mitigation for clang 11 compiler bug

* document

* document

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-22 22:35:51 -07:00
Craig Tiller f292f001ee
Promise join combinator (#26918)
* Add construct/destruct helper functions

Will be used in upcoming promise implementation

* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Helper code for promises to deal with status types generically

* Library to talk about things that make promises

* build

* Join combinator for promise library

* Changes to sync required for promise activities

* sanitized

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Update basic_join.h

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-19 21:06:38 -07:00
Craig Tiller 724ad871d4
Promise loop (#26913)
* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Library to talk about things that make promises

* Promises loop construct

* build

* Changes to sync required for promise activities

* sanitized

* add comments

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-18 10:36:14 -07:00
Craig Tiller aacd32c721
Promise library context management helpers (#26912)
* Promise library context management helpers

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* missing file

* Automated change: Fix sanity tests

* compatibility

* build

* Automated change: Fix sanity tests

* propagate

* Automated change: Fix sanity tests

* merge with head

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-17 09:48:06 -07:00
Craig Tiller 4744aceb68
Promises race (#26915)
* Poll type for promises library

* Promises race construct

* Changes to sync required for promise activities

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-17 09:27:40 -07:00
Craig Tiller cad2255d8c
First stab at config framework (#27014)
* First stab at config framework

* Automated change: Fix sanity tests

* add test for threaded initialization

* better test

* clang format

* better filenames

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-16 19:46:59 -07:00
Craig Tiller 7ea742f3d5
Promise if construct (#26914)
* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Library to talk about things that make promises

* Promises if construct

* build

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-16 12:08:38 -07:00
Craig Tiller 8ed20ae479
Promise map operator (#26917)
* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Promise helpers, and basic type erasure

* Promise map operator - change return type via a function

* build

* Changes to sync required for promise activities

* sanitized

* Automated change: Fix sanity tests

* fixes

* fixes

* Automated change: Fix sanity tests

* fix build

* review feedback

* Automated change: Fix sanity tests

* comment

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-13 17:15:43 -07:00
Craig Tiller 152b79144c
Extract HPACK Encoder Hash Map to a separate file (#26973)
* comments

* Extract hash map from hpack encoder

* Automated change: Fix sanity tests

* x

* x

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-13 13:08:24 -07:00
Craig Tiller 71b2042c56
Promise factories (#26990)
* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Library to talk about things that make promises

* build

* Changes to sync required for promise activities

* sanitized

* remove bad comment

* possible windows fix?

* fix

* ugh

* comment fix

* fix build

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-12 16:10:57 -07:00
Craig Tiller 2e56b42ada
Generic promise facilities (#26916)
* Poll type for promises library

* Library to talk about things that look like promises if you squint

* Promise helpers, and basic type erasure

* build

* Changes to sync required for promise activities

* sanitized

* Automated change: Fix sanity tests

* suppressions

* try to fix windows failure

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-11 16:17:50 -07:00
Craig Tiller bb4311baed
Add a utility to capture arguments by move even in C++11 (#26923)
* Add a utility to capture arguments by move even in C++11

* add test

* Automated change: Fix sanity tests

* missing file

* Automated change: Fix sanity tests

* better test

* Automated change: Fix sanity tests

* fmt

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-11 15:31:22 -07:00
Craig Tiller 58d3161aac
Split the filter popularity counting into a separate module (#26884)
* split hpack encoder filter into a separate class

* chores

* fix

* Automated change: Fix sanity tests

* include guards

* add suppressions

* Update popularity_count_test.cc

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-09 10:16:46 -07:00
Yash Tibrewal 3e197acaa1
Limit initial window size increases and per-stream window delta (#26342)
* Limit initial window size increases/decreases by flow control windows of active streams

* Limit stream flow control window updates to maximum allowable

* Reviewer comments

* Alternative way

* Clean-up

* Add tests

* Remove unnecessary cq_verifier

* Generate projects

* Initialize recv_message

* Get around compilation issue

* Test size large
2021-08-09 09:05:28 -07:00
Craig Tiller 3d26032736
Poll type for promises library (#26907)
* Poll type for promises library

* sanitized

* suppressions

* Add a comment
2021-08-06 18:14:30 -07:00
Craig Tiller a989e0bfb5
Table type (#26698)
* first pass table type

* indexed table with comments

* clang-tidy

* build stuff

* sanity fixes

* fixes for clang4

* add tests for size

* build fixes

* Add port_platform-only library

* remove port_platform exceptions

* merge new port_platform lib

* Add a bitset abstraction

* set(bool)

* bitset integration

* fixup test

* all or nothing

* comments, clangfmt

* add bitset tests

* add bitset tests

* merge stuff

* clang-tidy

* add c++ attribute detection

* use macro

* fmt

* typo

* exclude test from windows
2021-07-24 17:58:51 -07:00
Craig Tiller 0e6fe3f42c
Bitset (#26716)
A simple bitset type -- to replace `std::bitset` usage in #26698 and #26254 
`std::bitset` uses at least 64 bits even to store two bits, and the usages I'm looking at would benefit from having something smaller in those circumstances
2021-07-23 08:53:45 -07:00
Ming-Chuan 02c6d81eea
Create binder transport folder (#26602)
* Add folder for bindertransport and its smoke test

We will import the sources in the next few pull requests. Main purpose
of this commit is to create the folder and add dummy smoke test to make
sure nothing breaks

* regenerate projects.
2021-07-16 15:53:39 +08:00
Craig Tiller 0bd70a7e3e
Add Match/Overload abstractions (#26640)
* match/overload abstraction

* update projects

* match should really not accept mutable args

* typo

* tests

* usage comment

* mutable version

* build stuff

* clang-format

* add an escape hatch to avoid needing port_platform.h in files that do not need port_platform.h

* unused args

* Make it possible for a test to not depend on gpr

* add tests

* compile fix

* sepelling
2021-07-09 17:30:19 -07:00
AJ Heller 25d91e3091
New iomgr implementation backed by the EventEngine API (#26026)
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.

See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.

This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all

Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
2021-06-18 12:30:09 -07:00
Yash Tibrewal b53f60d353
Disable handshake_verify_peer_options_test (#26452) 2021-06-17 15:35:37 -07:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
shangwu-google 8b3f4fca25
Client context test peer (#25610)
* Create client_context_test_peer.h

mock-up class for ClientContext

* Add ClientContextTestPeer as a friend for test

* Update client_context_test_peer.h

* Update client_context_test_peer.h

* unit test for client_context_test_peer.h

* unit test for client_context_test_peer.h

* fix for tools/buildgen/generate_projects.sh

* Revert "fix for tools/buildgen/generate_projects.sh"

This reverts commit b007aa8c2b.

* re-fix for tools/buildgen/generate_projects.sh

* Remove an empty line

Co-authored-by: Vijay Pai <vpai@google.com>
2021-05-25 18:51:34 -07:00
Ashitha Santhosh 457fd3d41c
RBAC Engine implementation. (#25948) 2021-04-28 10:10:22 -07:00
Esun Kim 2d8936b097
Added status_helper (#25901)
Added status_util
2021-04-22 11:54:19 -07:00
Ashitha Santhosh 628bf7fe08
RBAC engine matchers implementation. (#25997) 2021-04-19 13:05:27 -07:00
Ashitha Santhosh 8489a6050b
Revert "Rbac Matcher implementation. (#25653)" (#25957)
This reverts commit 1fb4f715db.
2021-04-12 17:22:44 -07:00
Ashitha Santhosh 1fb4f715db
Rbac Matcher implementation. (#25653) 2021-04-08 22:33:06 -07:00
AJ Heller 4c59b17d40
Remove eventmanager_libuv code (#25811)
Reintroduces this code removal after a failed import. This needed special handling via cherry pick.
2021-04-08 13:32:53 -07:00
AJ Heller a63f188153
Add conversion method for absl::Status to grpc_error* (#25896) 2021-04-07 18:13:13 -07:00
Yash Tibrewal 53ba4a101e
Implement FilterChainMatch algorithm (#25757)
* Implement FilterChainMatch logic

* Add tests for transport protocol too

* Tests for duplicate NACKing

* Introduce ConnectionManager as an interface for config fetchers

* Do not parameterize IncrementIfNonZero

* Some formatting

* Reviewer comments

* Add filter chain match information for duplicate match error

* Reviewer comments

* Some cleanup

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Clang-tidy
2021-03-25 14:12:46 -07:00
Esun Kim 10b17f3739
Added mock_stream_test (#25103) 2021-03-25 14:04:39 -07:00
AJ Heller 1694984846
Revert "Remove unused eventmanager_libuv code (#25796)" (#25807)
This caused problems internally. The interface deletion needs a cherrypick, but I will do an overnight test first, before I reintroduce. CC @nicolasnoble
2021-03-24 17:17:42 -07:00
AJ Heller 077f627aef
Remove unused eventmanager_libuv code (#25796) 2021-03-24 11:21:05 -07:00
Lidi Zheng b457f43227
Implement C++ Admin Interface API (#25753)
* Implement C++ Admin Interface API

* Address reviewer's requests

* Remove static asserts for raw pointers

* Make sanity tests happy

* Windows: pacify conflict between ifndef and macros

* Disable admin services test on iOS

* Make iOS happy by:

* Letting grpcpp_admin conditionally depend on grpcpp_csds

* Fix an unexpected side-effect of dependency update
2021-03-23 09:53:12 -07:00
Ashitha Santhosh bd86187f19
SDK authorization policy translator. (#25361)
* SDK authorization policy translator.
2021-03-05 09:05:11 -08:00
Vijay Pai af76d0321a
Restore callback microbenchmarks but make them manual for now (#25491) 2021-02-19 13:36:11 -08:00
Esun Kim 0cf94e3fdd Add time-util 2021-02-01 17:31:46 -08:00
Zhouyihai Ding 6f6bdd03e6
Merge pull request #25175 from ZhouyihaiDing/callback_add_context
Support ServerContext for callback API
2021-01-20 11:52:02 -08:00
ZhouyihaiDing a584bc4f02 Support ServerContext for callback API 2021-01-19 22:00:10 -08:00
Ashitha Santhosh 4ca878799b Refactor [String/Header/Path]matchers in xds_api. 2021-01-15 12:32:54 -08:00