diff options
author | Yevhen Orlov <yevhen.orlov@plvision.eu> | 2022-02-16 03:05:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-17 20:45:01 +0000 |
commit | 4394fbcb78cfe190988d2c1beaaaccc97dcf8c5f (patch) | |
tree | dc638dace231bfe6f57b8c010dd45f1650043b37 /drivers/net/ethernet/marvell/prestera/prestera_main.c | |
parent | 16de3db1208ac6c2cca1a95ebdad389d778e5740 (diff) | |
download | linux-4394fbcb78cfe190988d2c1beaaaccc97dcf8c5f.tar.bz2 |
net: marvell: prestera: handle fib notifications
For now we support only TRAP or DROP, so we can offload only "local" or
"blackhole" routes.
Nexthop routes is TRAP for now. Will be implemented soon.
Co-developed-by: Taras Chornyi <tchornyi@marvell.com>
Signed-off-by: Taras Chornyi <tchornyi@marvell.com>
Co-developed-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Yevhen Orlov <yevhen.orlov@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/prestera/prestera_main.c')
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index cad93f747d0c..a180b6812e54 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -28,6 +28,12 @@ #define PRESTERA_MAC_ADDR_NUM_MAX 255 static struct workqueue_struct *prestera_wq; +static struct workqueue_struct *prestera_owq; + +void prestera_queue_work(struct work_struct *work) +{ + queue_work(prestera_owq, work); +} int prestera_port_pvid_set(struct prestera_port *port, u16 vid) { @@ -1024,12 +1030,17 @@ static int __init prestera_module_init(void) if (!prestera_wq) return -ENOMEM; + prestera_owq = alloc_ordered_workqueue("prestera_ordered", 0); + if (!prestera_owq) + return -ENOMEM; + return 0; } static void __exit prestera_module_exit(void) { destroy_workqueue(prestera_wq); + destroy_workqueue(prestera_owq); } module_init(prestera_module_init); |