MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ionic_vlan_rx_add_vid

Function ionic_vlan_rx_add_vid

dpdk/drivers/net/ionic/ionic_lif.c:351–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static int
352ionic_vlan_rx_add_vid(struct ionic_lif *lif, uint16_t vid)
353{
354 struct ionic_admin_ctx ctx = {
355 .pending_work = true,
356 .cmd.rx_filter_add = {
357 .opcode = IONIC_CMD_RX_FILTER_ADD,
358 .match = rte_cpu_to_le_16(IONIC_RX_FILTER_MATCH_VLAN),
359 .vlan.vlan = rte_cpu_to_le_16(vid),
360 },
361 };
362 int err;
363
364 err = ionic_adminq_post_wait(lif, &ctx);
365 if (err)
366 return err;
367
368 IONIC_PRINT(INFO, "rx_filter add VLAN %d (id %d)", vid,
369 rte_le_to_cpu_32(ctx.comp.rx_filter_add.filter_id));
370
371 return ionic_rx_filter_save(lif, 0, IONIC_RXQ_INDEX_ANY, &ctx);
372}
373
374static int
375ionic_vlan_rx_kill_vid(struct ionic_lif *lif, uint16_t vid)

Callers 1

Calls 2

ionic_adminq_post_waitFunction · 0.85
ionic_rx_filter_saveFunction · 0.85

Tested by

no test coverage detected