in drivers/vector_kern.c [189:221]
static int get_transport_options(struct arglist *def)
{
char *transport = uml_vector_fetch_arg(def, "transport");
char *vector = uml_vector_fetch_arg(def, "vec");
int vec_rx = VECTOR_RX;
int vec_tx = VECTOR_TX;
long parsed;
int result = 0;
if (transport == NULL)
return -EINVAL;
if (vector != NULL) {
if (kstrtoul(vector, 10, &parsed) == 0) {
if (parsed == 0) {
vec_rx = 0;
vec_tx = 0;
}
}
}
if (get_bpf_flash(def))
result = VECTOR_BPF_FLASH;
if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0)
return result;
if (strncmp(transport, TRANS_HYBRID, TRANS_HYBRID_LEN) == 0)
return (result | vec_rx | VECTOR_BPF);
if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0)
return (result | vec_rx | vec_tx | VECTOR_QDISC_BYPASS);
return (result | vec_rx | vec_tx);
}