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

Function ionic_vlan_rx_kill_vid

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

Source from the content-addressed store, hash-verified

372}
373
374static int
375ionic_vlan_rx_kill_vid(struct ionic_lif *lif, uint16_t vid)
376{
377 struct ionic_admin_ctx ctx = {
378 .pending_work = true,
379 .cmd.rx_filter_del = {
380 .opcode = IONIC_CMD_RX_FILTER_DEL,
381 },
382 };
383 struct ionic_rx_filter *f;
384 int err;
385
386 IONIC_PRINT_CALL();
387
388 rte_spinlock_lock(&lif->rx_filters.lock);
389
390 f = ionic_rx_filter_by_vlan(lif, vid);
391 if (!f) {
392 rte_spinlock_unlock(&lif->rx_filters.lock);
393 return -ENOENT;
394 }
395
396 ctx.cmd.rx_filter_del.filter_id = rte_cpu_to_le_32(f->filter_id);
397 ionic_rx_filter_free(f);
398 rte_spinlock_unlock(&lif->rx_filters.lock);
399
400 err = ionic_adminq_post_wait(lif, &ctx);
401 if (err)
402 return err;
403
404 IONIC_PRINT(INFO, "rx_filter del VLAN %d (id %d)", vid,
405 rte_le_to_cpu_32(ctx.cmd.rx_filter_del.filter_id));
406
407 return 0;
408}
409
410int
411ionic_dev_vlan_filter_set(struct rte_eth_dev *eth_dev, uint16_t vlan_id,

Callers 1

Calls 5

ionic_rx_filter_by_vlanFunction · 0.85
ionic_rx_filter_freeFunction · 0.85
ionic_adminq_post_waitFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected