flt_otel_cli_parse_logging
CLI handler for "otel logging [state]". Gets or sets the logging state
- (off/on/nolognorm).
+ (off/on/dontlog-normal).
flt_otel_cli_parse_rate
CLI handler for "otel rate [value]". Gets or sets the rate limit
*
* DESCRIPTION
* Handles the "otel logging [state]" CLI command. When a state argument is
- * provided in <args[2]>, it is matched against "off", "on", or "nolognorm"
+ * provided in <args[2]>, it is matched against "off", "on", or "dontlog-normal"
* and the logging field is atomically updated for all OTel filter instances.
* Setting a value requires admin access level. When no argument is given,
* reports the current logging state for all instances. Invalid values
OTELC_RETURN_PTR(retptr);
}
- /* The sample key is located at the idx location of the args[] field. */
+ /* The sample key is located at the (idx - 1) location of the args[] field. */
retptr = flt_otel_conf_sample_init(args[idx - 1], line, head, err);
if (retptr == NULL)
OTELC_RETURN_PTR(retptr);
* err - indirect pointer to error message string
*
* DESCRIPTION
- * Allocates and initializes a conf_span structure with empty lists for links,
+ * Allocates and initializes a conf_span structure with empty lists for
* attributes, events, baggages, and statuses. The <id> string is duplicated
* and stored as the span name. If <head> is non-NULL, the structure is
* appended to the list.
*
* DESCRIPTION
* Allocates and initializes a conf_scope structure with empty lists for ACLs,
- * contexts, spans, spans_to_finish, and instruments. The <id> string is
+ * contexts, spans, and spans_to_finish. The <id> string is
* duplicated and stored as the scope name. If <head> is non-NULL, the
* structure is appended to the list.
*
* fconf - the filter configuration
*
* DESCRIPTION
- * It cleans up what the init_per_thread callback have done. It is called
+ * It cleans up what the init_per_thread callback has done. It is called
* in the context of a thread, before exiting it.
*
* RETURN VALUE
/*
* Here, an HTTP header (which is actually part
- * of the span context is added to the text_map.
+ * of the span context) is added to the text_map.
*
* Before adding, the prefix is removed from the
* HTTP header name.
* DESCRIPTION
* Section parser for the otel-instrumentation configuration block. Handles
* keywords: instrumentation ID, log, config, groups, scopes, acl, rate-limit,
- * option (disabled/hard-errors/nolognorm), and debug-level.
+ * option (disabled/hard-errors/dontlog-normal), and debug-level.
*
* RETURN VALUE
* Returns ERR_NONE (== 0) in case of success,
ACME_NEWACCOUNT,
ACME_NEWORDER,
ACME_AUTH,
- ACME_INITIAL_RSLV_TRIGGER, /* opportunistic DNS check avoid cond_ready steps */
+ ACME_INITIAL_RSLV_TRIGGER, /* opportunistic DNS check to avoid cond_ready steps */
ACME_INITIAL_RSLV_READY,
ACME_CLI_WAIT, /* wait for the ACME_RDY_CLI */
ACME_INITIAL_DELAY,
int severity_output; /* used within the cli_io_handler to format severity output of informational feedback */
int level; /* the level of CLI which can be lowered dynamically */
- char *payload_pat; /* Pointer on the payload pattern. NULL if no payload */
+ char *payload_pat; /* Pointer to the payload pattern. NULL if no payload */
uint32_t max_payload_sz;/* Max size allowed for dynamic payload. 0 if not allowed */
uint32_t anon_key; /* the key to anonymise with the hash in cli */
int (*io_handler)(struct appctx *appctx); /* used within the cli_io_handler when st0 = CLI_ST_CALLBACK */
struct {
struct quic_fctl fc; /* stream flow control applied on sending */
uint64_t buf_in_flight; /* sum of currently allocated Tx buffer sizes */
- struct list frms; /* list of STREAM frames ready for sent */
+ struct list frms; /* list of STREAM frames ready for sending */
union {
struct {
/* quic */
#define QC_CF_ERRL_DONE 0x00000002 /* local error properly handled, connection can be released */
#define QC_CF_IS_BACK 0x00000004 /* backend side */
#define QC_CF_CONN_FULL 0x00000008 /* no stream buffers available on connection */
-#define QC_CF_CONN_SHUT 0x00000010 /* peer has initiate app layer shutdown - no new stream should be opened locally */
+#define QC_CF_CONN_SHUT 0x00000010 /* peer has initiated app layer shutdown - no new stream should be opened locally */
#define QC_CF_ERR_CONN 0x00000020 /* fatal error reported by transport layer */
#define QC_CF_WAIT_HS 0x00000040 /* MUX init before QUIC handshake completed (0-RTT) */
/* This bit is set for unidirectional streams */
#define QCS_ID_DIR_BIT 0x2
-/* Maximum bidirectional stream ID that a client can opened. */
+/* Maximum bidirectional stream ID that a client can open. */
#define QCS_ID_MAX_STRM_CL_BIDI (QUIC_VARINT_8_BYTE_MAX - 3)
static inline enum qcs_type qcs_id_type(uint64_t id)
* name is used
*/
struct list filter_configs; /* list of the filters that are declared on this proxy */
- struct { /* sequence in which declared filters on the proxy should be execute
+ struct { /* sequence in which declared filters on the proxy should be executed
* (list of filter_sequence_elt)
*/
struct list req; /* during request handling */
} acme;
struct {
struct {
- char *type; /* "RSA" or "ECSDA" */
+ char *type; /* "RSA" or "ECDSA" */
int bits; /* bits for RSA */
char *curves; /* NID of curves for ECDSA*/
} key;
static inline void _task_schedule(struct task *task, int when, const struct ha_caller *caller)
{
- /* TODO: mthread, check if there is no tisk with this test */
+ /* TODO: mthread, check if there is no task with this test */
if (task_in_rq(task))
return;
return NULL;
}
-/* Return an existing section section OR create one and return it */
+/* Return an existing section or create one and return it */
struct acme_cfg *new_acme_cfg(const char *name)
{
struct acme_cfg *ret = NULL;
}
/* Check if the next resolution would be triggered too
- * late according to the dns_timeout and abort is
+ * late according to the dns_timeout and abort if
* necessary. */
if (ctx->dnsstarttime && ns_to_sec(now_ns) + ctx->cfg->dns_delay > ctx->dnsstarttime + ctx->cfg->dns_timeout) {
memprintf(&errmsg, "dns-01: Couldn't resolve the TXT records in %ds.", ctx->cfg->dns_timeout);
goto nextreq;
}
- /* if the challenge is not ready, wait to be wakeup */
+ /* if the challenge is not ready, wait to be woken up */
if (ctx->next_auth->ready != ctx->cfg->cond_ready)
goto wait;
* To work around that, when a server is getting idle,
* it will set the ready_srv field of the proxy.
* Here, if ready_srv is non-NULL, we get that server,
- * and we attempt to switch its served from 0 to 1.
- * If it works, then we can just run, otherwise,
+ * and we attempt to increment its served counter up to
+ * maxconn. If it works, then we can just run, otherwise,
* it means another stream will be running, and will
* dequeue us eventually, so we can just do nothing.
*/
return 0;
}
-/* This function parses "tune.cli.max-payload-sze" statement in the "global"
+/* This function parses "tune.cli.max-payload-size" statement in the "global"
* section. It returns -1 if there is any error, otherwise zero. If it returns
* -1, it will write an error message into the <err> buffer which will be
* preallocated. The trailing '\n' must not be written. The function must be
if (strncmp(last_arg, PAYLOAD_PATTERN, strlen(PAYLOAD_PATTERN)) == 0) {
ssize_t pat_len = strlen(last_arg) - strlen(PAYLOAD_PATTERN);
- /* A customized pattern can't be more than 7 characters
+ /* A customized pattern can't be more than 64 characters
* if it's more, don't make it a payload
*/
if (pat_len <= MAX_PAYLOAD_PATTERN_SIZE) {
- /* Save the pointer on the payload pattern (skipping PAYLOAD_PATTERN) */
+ /* Save the pointer to the payload pattern (skipping PAYLOAD_PATTERN) */
appctx->cli_ctx.payload_pat = last_arg + strlen(PAYLOAD_PATTERN);
/* The last command finishes before the payload pattern.
size_t pat_len = strlen(args[argl-1] + strlen(PAYLOAD_PATTERN));
/*
- * A customized pattern can't be more than 7 characters
+ * A customized pattern can't be more than 64 characters
* if it's more, don't make it a payload
*/
if (pat_len < sizeof(pcli->payload_pat)) {
/* Installs the MUX layer for <conn> connection. The behavior is slightly
* different for frontend and backend sides.
*
- * For frontend connections, MUX is setup via session initialization
+ * For frontend connections, MUX is set up via session initialization
* completion. In case of failure, the session and the whole connection stack
- * is freed. Caller should set <closed_connection> to a non NULL value as it
+ * are freed. Caller should set <closed_connection> to a non NULL value as it
* will be set to 1 to report the connection release.
*
* For backend connections, MUX layer is immediately initialized by selecting
cur_arg = 1;
kw = flt_find_kw(args[cur_arg]);
if (kw) {
- /* default name is keyword name, unless overriden by parse func */
+ /* default name is keyword name, unless overridden by parse func */
fconf->name = kw->kw;
if (!kw->parse) {
memprintf(err, "parsing [%s:%d] : '%s' : "
INITCALL1(STG_REGISTER, sample_register_fetches, &smp_kws);
-/* Note: must not be declared <const> as its list will be overwritten */
+/* Note: must not be declared <const> as its list will be overwritten.
+ * Please take care of keeping this list alphabetically sorted.
+ */
static struct sample_conv_kw_list sample_conv_kws = {ILH, {
{ "fe_exists", sample_conv_fe_exists, 0, NULL, SMP_T_STR, SMP_T_BOOL },
{ /* END */ },
*/
if (h3c->flags & H3_CF_GOAWAY_SENT && qcs->id >= h3c->id_shut_l &&
quic_stream_is_bidi(qcs->id)) {
- /* Local stack should not attached stream on a closed connection. */
+ /* Local stack should not attach stream to a closed connection. */
BUG_ON(quic_stream_is_local(qcs->qcc, qcs->id));
TRACE_STATE("close stream outside of GOAWAY range", H3_EV_H3S_NEW, qcs->qcc->conn, qcs);
struct list list; /* next conf_errors */
};
-/* Returns the next unporocessed start line in the HTX message. It returns NULL
+/* Returns the next unprocessed start line in the HTX message. It returns NULL
* if the start-line is undefined (first == -1). Otherwise, it returns the
* pointer on the htx_sl structure.
*/
static int next_cb(int tok, const char *s, int off, int len, void *ud) {
struct nextdata *d = (struct nextdata *) ud;
- // int i;
switch (tok) {
case '{':
case '[':
}
/*
- * All headers was sent, now process EOH
+ * All headers were sent, now process EOH
*/
if (!(h1m->flags & H1_MF_RESP) && h1s->meth == HTTP_METH_CONNECT) {
if (!chunk_memcat(&outbuf, "\r\n", 2))
else if (htx_is_unique_blk(htx, blk) &&
((htx->flags & HTX_FL_EOM) || ((h1m->flags & H1_MF_CLEN) && !h1m->curr_len))) {
/* EOM flag is set and it is the last block or there is no
- * payload. If cannot be removed now. We must emit the end of
- * the message first to be sure the output buffer is not full
+ * payload. It cannot be removed now. We must emit the end of
+ * the message first to be sure the output buffer is not full.
*/
if ((h1m->flags & H1_MF_CHNK) && (!(h1m->flags & H1_MF_RESP) || !(h1s->flags & H1S_F_BODYLESS_RESP))) {
- /* Send null-chunk except for bodyless reasponses */
+ /* Send null-chunk except for bodyless responses */
if (!chunk_memcat(&outbuf, "\r\n0\r\n\r\n", 7))
goto full;
}
/* functions below are for dynamic buffer management */
/*****************************************************/
-/* indicates whether or not the we may call the h2_recv() function to attempt
+/* indicates whether or not we may call the h2_recv() function to attempt
* to receive data into the buffer and/or demux pending data. The condition is
* a bit complex due to some API limits for now. The rules are the following :
* - if an error or a shutdown was detected on the connection, we must not
}
/*
- * Bit 31 is the "exclusive" bit, it is not part of the stream id,
- * so ignore it when checking if the stream id is ours.
+ * Bit 31 is the "exclusive" bit, it is not part of the stream ID,
+ * so ignore it when checking if the stream ID is ours.
*/
if ((h2_get_n32(&h2c->dbuf, 0) & 0x7fffffff) == h2c->dsi) {
/* 7540#5.3 : can't depend on itself */
}
if (error < 0) {
- /* Failed to decode this frame (e.g. too large request)
+ /* Failed to decode this frame (e.g. too large trailers)
* but the HPACK decompressor is still synchronized.
*/
session_inc_http_err_ctr(h2c->conn->owner);
qcs->ctx = NULL;
/* App callback attach may register the stream for http-request wait.
- * These fields must be initialed before.
+ * These fields must be initialized before.
*/
LIST_INIT(&qcs->el_opening);
LIST_INIT(&qcs->el_recv);
/* Reallocate <qcs> stream buffer to convert a small buffer to a bigger one.
* Contrary to standard allocation, this function will never stop due to a full
- * buffer window. The smaller buffer is released first which guarantee that the
+ * buffer window. The smaller buffer is released first which guarantees that the
* buffer window has room left.
*
* Returns buffer pointer or NULL on allocation failure.
/* Conduct I/O operations to finalize <qcc> app layer initialization. Note that
* <qcc> app state may remain NULL even on success, if only a transient
- * blocking was encountered. Finalize operation can be retry later.
+ * blocking was encountered. Finalize operation can be retried later.
*
* Returns 0 on success else non-zero.
*/
/* Execute application layer shutdown. If this operation is not defined, a
* CONNECTION_CLOSE will be prepared as a fallback. This function is protected
- * against multiple invocation thanks to <qcc> application state context.
+ * against multiple invocations thanks to <qcc> application state context.
*/
static void qcc_app_shutdown(struct qcc *qcc)
{
qcc->task = NULL;
}
- /* liberate remaining qcs instances */
+ /* free remaining qcs instances */
node = eb64_first(&qcc->streams_by_id);
while (node) {
struct qcs *qcs = eb64_entry(node, struct qcs, by_id);
qcc->tx.qstrm_buf = BUF_NULL;
qcc->rx.qstrm_buf = BUF_NULL;
- /* Rx buffer is transfered from xprt layer - necessary if too many data where read */
+ /* Rx buffer is transferred from xprt layer - necessary if too many data were read */
qcc->rx.rlen = xprt_qstrm_xfer_rxbuf(conn->xprt_ctx, &qcc->rx.qstrm_buf);
/* Cannot have a non empty record with an empty buffer. */
BUG_ON(qcc->rx.rlen && !b_data(&qcc->rx.qstrm_buf));
}
/* Try read if record header not yet read and no data available
- * or hreader cannot be decoded, or either if current record
+ * or header cannot be decoded, or either if current record
* is incomplete.
*/
if ((!qcc->rx.rlen && (!b_data(buf) || !dec)) ||
/* Sends <frms> list of frames for <qcc> connection.
*
* Returns 0 if all data are emitted or a positive value if sending should be
- * retry later. A negative error code is used for a fatal failure.
+ * retried later. A negative error code is used for a fatal failure.
*/
int qcc_qstrm_send_frames(struct qcc *qcc, struct list *frms)
{
loop:
split_frm = next_frm = NULL;
b_reset(buf);
- /* Reserve bytes for the record header. */
+ /* Reserve space for the record header. */
old = pos = (unsigned char *)b_orig(buf) + lensz;
end = (unsigned char *)b_wrap(buf);
* if it is a new entry set_entry inserts at that position in the expire
* tree the touch_remote updates this date but the tree's re-order is not
* designed to set back in the past, and the entry will be trashed only
- * after a full table's expire delay regardless the setting.
+ * after a full table's expire delay regardless of the setting.
* But setting the expire on newts here allows to set directly new entries
- * at the right position and to trash the entry in time if it is a new
+ * at the right position and to trash the entry in time if it is a newly
* created one from resync process for instance.
*/
newts->expire = tick_add(now_ms, expire);
TRACE_ENTER(QUIC_EV_CONN_BFRM, qc);
if (pkt && !(builder->mask & (1U << pkt->type))) {
- /* XXX This it a bug to send an unauthorized frame with such a packet type XXX */
+ /* XXX This is a bug to send an unauthorized frame with such a packet type XXX */
TRACE_ERROR("unauthorized frame", QUIC_EV_CONN_BFRM, qc, frm);
BUG_ON(!(builder->mask & (1U << pkt->type)));
}
* depending on its list of parameters. In most cases, <frms> frame list is
* not empty. So, this function first tries to build this list of frames.
*
- * Return 1 if succeeded (enough room to buile this packet), O if not.
+ * Return 1 if succeeded (enough room to build this packet), 0 if not.
*/
static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
size_t dglen, struct quic_tx_packet *pkt,
if (qel->pktns->tx.pto_probe) {
/* If a probing packet was asked and could not be built,
* this is not because there was not enough room, but due to
- * its frames which were already acknowledeged.
+ * its frames which were already acknowledged.
* See qc_stream_frm_is_acked()) called by qc_build_frms().
* Note that qc_stream_frm_is_acked() logs a trace in this
* case mentioning some frames were already acknowledged.
list_for_each_entry_safe(res, resback, &resolvers->resolutions.wait, list) {
if (unlikely(stopping)) {
- /* If haproxy is stopping, check if the resolution to know if it must be run or not.
+ /* If haproxy is stopping, check if the resolution must be run or not.
* If at least a requester is a stream (because of a do-resolv action) or if there
* is a requester attached to a running proxy, the resolution is performed.
* Otherwise, it is skipped for now.
}
if (!must_run) {
- /* Skip the reolsution. reset it and wait for the next wakeup */
+ /* Skip the resolution. reset it and wait for the next wakeup */
resolv_reset_resolution(res);
continue;
}
!MT_LIST_ISEMPTY(&tt->shared_tasklet_list))
max[TL_URGENT] = default_weights[TL_URGENT];
- /* normal tasklets list gets a default weight of ~37% */
+ /* normal tasklets list gets a default weight of ~47% */
if ((tt->tl_class_mask & (1 << TL_NORMAL)) ||
!eb_is_empty(&th_ctx->rqueue) || !eb_is_empty(&th_ctx->rqueue_shared))
max[TL_NORMAL] = default_weights[TL_NORMAL];
- /* bulk tasklets list gets a default weight of ~13% */
+ /* bulk tasklets list gets a default weight of ~3% */
if ((tt->tl_class_mask & (1 << TL_BULK)))
max[TL_BULK] = default_weights[TL_BULK];
/* Global tree to share all tcp-checks */
struct eb_root shared_tcpchecks = EB_ROOT;
-/* Proxy used during parsing of healtcheck sections */
+/* Proxy used during parsing of healthcheck sections */
struct proxy *tcpchecks_proxy = NULL;
DECLARE_TYPED_POOL(pool_head_tcpcheck_rule, "tcpcheck_rule", struct tcpcheck_rule);
ctx->rparams = frm.qmux_transport_params.params;
b_del(buf, pos - old);
- /* <end> delimiter should guarantee than frame length does not go beyong the record end */
+ /* <end> delimiter should guarantee that frame length does not go beyond the record end */
BUG_ON(ctx->rxrlen < pos - old);
ctx->rxrlen -= (pos - old);
BUG_ON(ctx->wait_event.events);
/* MUX will access members from xprt_ctx on init, so create
- * operation should be called before any members are resetted.
+ * operation should be called before any members are reset.
*/
ret = conn_create_mux(conn, &free);
if (free) {
conn->xprt = ctx->ops_lower;
/* MUX layer is responsible to retrieve any remaining data in
- * the Rx buffer prior to reset it.
+ * the Rx buffer prior to resetting it.
*/
BUG_ON(b_data(&ctx->rxbuf));
b_free(&ctx->rxbuf);