Skip to content

Commit 9c74e88

Browse files
Stuart Clarkmeta-codesync[bot]
authored andcommitted
Back out "AF_XDP/XSK UDP client transport (under facebook/)"
Summary: Original commit changeset: 605ad4d6d3f4 Original Phabricator Diff: D109703046 Reviewed By: fb-bjorn Differential Revision: D110310180 fbshipit-source-id: 77009bf3aeebdb723656724730b9d562decebf4f
1 parent bfee674 commit 9c74e88

7 files changed

Lines changed: 0 additions & 49 deletions

File tree

mcrouter/ProxyDestination-inl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ void ProxyDestination<Transport>::initializeTransport() {
303303
options.qosPath = qosPath();
304304
}
305305
options.useJemallocNodumpAllocator = opts.jemalloc_nodump_buffers;
306-
options.xdpTxTruncateBytes = opts.xdp_tx_truncate_bytes;
307306
if (accessPoint()->compressed()) {
308307
if (auto codecManager = proxy().router().getCodecManager()) {
309308
options.compressionCodecMap =

mcrouter/lib/mc/protocol.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ typedef enum mc_protocol_e {
1919
mc_binary_protocol = 2,
2020
mc_caret_protocol = 4,
2121
mc_thrift_protocol = 5,
22-
mc_xdp_protocol = 6,
2322
mc_nprotocols, // placeholder
2423
} mc_protocol_t;
2524

@@ -32,8 +31,6 @@ static inline mc_protocol_t mc_string_to_protocol(const char* str) {
3231
return mc_caret_protocol;
3332
} else if (!strcmp(str, "thrift")) {
3433
return mc_thrift_protocol;
35-
} else if (!strcmp(str, "xdp")) {
36-
return mc_xdp_protocol;
3734
} else {
3835
return mc_unknown_protocol;
3936
}
@@ -49,8 +46,6 @@ static inline const char* mc_protocol_to_string(const mc_protocol_t value) {
4946
return "caret";
5047
case mc_thrift_protocol:
5148
return "thrift";
52-
case mc_xdp_protocol:
53-
return "xdp";
5449
case mc_unknown_protocol:
5550
case mc_nprotocols:
5651
default:

mcrouter/lib/network/AccessPoint.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ mc_protocol_t parseProtocol(folly::StringPiece str) {
5959
return mc_caret_protocol;
6060
} else if (str == "thrift") {
6161
return mc_thrift_protocol;
62-
} else if (str == "xdp") {
63-
return mc_xdp_protocol;
6462
}
6563
throw std::runtime_error("Invalid protocol");
6664
}

mcrouter/lib/network/ConnectionOptions.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ struct ConnectionOptions {
146146
* iff thriftCompression is enabled.
147147
*/
148148
size_t thriftCompressionThreshold{0};
149-
150-
/**
151-
* AF_XDP/XSK client: max request datagram payload in bytes before the
152-
* request is rejected with LOCAL_ERROR. 0 means no cap (clamp to the jumbo
153-
* buffer size). Plumbed from the xdp_tx_truncate_bytes mcrouter option.
154-
*/
155-
size_t xdpTxTruncateBytes{0};
156149
};
157150
} // namespace memcache
158151
} // namespace facebook

mcrouter/mcrouter_options_list.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -888,16 +888,6 @@ MCROUTER_OPTION_INTEGER(
888888
"Payloads >= thriftCompressionTreshold will be compressed "
889889
"iff thriftCompression is enabled.")
890890

891-
MCROUTER_OPTION_INTEGER(
892-
size_t,
893-
xdp_tx_truncate_bytes,
894-
3072,
895-
"xdp-tx-truncate-bytes",
896-
no_short,
897-
"AF_XDP/XSK client: max request datagram payload in bytes before the "
898-
"request is rejected with LOCAL_ERROR. 0 means no cap (clamp to the jumbo "
899-
"buffer size). Default 3072 (3K).")
900-
901891
MCROUTER_OPTION_TOGGLE(
902892
enable_axonlog,
903893
false,

mcrouter/routes/McRouteHandleProvider-inl.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include "mcrouter/lib/network/FailureDomains.h"
2929
#include "mcrouter/lib/network/SecurityOptions.h"
3030
#include "mcrouter/lib/network/ThriftTransport.h"
31-
#if defined(__linux__) && !defined(ANDROID) && !defined(MCROUTER_OSS_BUILD)
32-
#include "mcrouter/lib/network/facebook/XdpTransport.h"
33-
#endif
3431
#include "mcrouter/lib/network/gen/MemcacheRouterInfo.h"
3532
#include "mcrouter/routes/AllFastestRouteFactory.h"
3633
#include "mcrouter/routes/AsynclogRoute.h"
@@ -408,25 +405,6 @@ McRouteHandleProvider<RouterInfo>::makePool(
408405
idx);
409406
accessPointsSet.insert(destResult.second);
410407
addDestination(std::move(destResult.first));
411-
#if defined(__linux__) && !defined(ANDROID) && !defined(MCROUTER_OSS_BUILD)
412-
} else if (ap->getProtocol() == mc_xdp_protocol) {
413-
using Transport = XdpTransport;
414-
auto destResult = createDestinationRoute<Transport>(
415-
std::move(ap),
416-
timeout,
417-
connectTimeout,
418-
qosClass,
419-
qosPath,
420-
nameSp,
421-
i,
422-
poolStatIndex,
423-
disableRequestDeadlineCheck,
424-
poolTkoTracker,
425-
keepRoutingPrefix,
426-
idx);
427-
accessPointsSet.insert(destResult.second);
428-
addDestination(std::move(destResult.first));
429-
#endif
430408
} else {
431409
using Transport = AsyncMcClient;
432410
auto destResult = createDestinationRoute<Transport>(

mcrouter/routes/McRouteHandleProvider.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ std::shared_ptr<CommonAccessPointAttributes> getCommonAccessPointAttributes(
7979
protocol = mc_caret_protocol;
8080
} else if (equalStr("thrift", str, folly::AsciiCaseInsensitive())) {
8181
protocol = mc_thrift_protocol;
82-
} else if (equalStr("xdp", str, folly::AsciiCaseInsensitive())) {
83-
protocol = mc_xdp_protocol;
8482
} else {
8583
throwLogic("Unknown protocol '{}'", str);
8684
}

0 commit comments

Comments
 (0)