Skip to content

Instantly share code, notes, and snippets.

View garyachy's full-sized avatar

Denys Haryachyy garyachy

View GitHub Profile
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
},
.rx_adv_conf = {
.rss_conf = {
.rss_hf = ETH_RSS_IP |
ETH_RSS_TCP |
ETH_RSS_UDP |
ETH_RSS_SCTP,
@garyachy
garyachy / dropper.c
Last active May 18, 2019 07:41
eBPF application example
#include <linux/bpf.h>
#ifndef __section
# define __section(NAME) \
__attribute__((section(NAME), used))
#endif
__section("prog")
int xdp_drop(struct xdp_md *ctx)
{
class G711ToPcmTranscoder
{
public:
G711ToPcmTranscoder(
int sample_rate,
int channels,
int output_sample_rate,
AVSampleFormat sample_fmt
):
sample_rate_( sample_rate ),
class AudioTranscriber
{
public:
AudioTranscriber(
std::string name,
const std::string &model_path,
uint32_t input_sample_rate,
uint32_t output_sample_rate,
uint32_t window_size_seconds,
G711ToPcmTranscoder &transcoder,