| 372 | } |
| 373 | |
| 374 | static int |
| 375 | ionic_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 | |
| 410 | int |
| 411 | ionic_dev_vlan_filter_set(struct rte_eth_dev *eth_dev, uint16_t vlan_id, |
no test coverage detected