prestera_devlink.h (1072B)
1/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2/* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. */ 3 4#ifndef _PRESTERA_DEVLINK_H_ 5#define _PRESTERA_DEVLINK_H_ 6 7#include "prestera.h" 8 9struct prestera_switch *prestera_devlink_alloc(struct prestera_device *dev); 10void prestera_devlink_free(struct prestera_switch *sw); 11 12void prestera_devlink_register(struct prestera_switch *sw); 13void prestera_devlink_unregister(struct prestera_switch *sw); 14 15int prestera_devlink_port_register(struct prestera_port *port); 16void prestera_devlink_port_unregister(struct prestera_port *port); 17 18void prestera_devlink_port_set(struct prestera_port *port); 19void prestera_devlink_port_clear(struct prestera_port *port); 20 21struct devlink_port *prestera_devlink_get_port(struct net_device *dev); 22 23void prestera_devlink_trap_report(struct prestera_port *port, 24 struct sk_buff *skb, u8 cpu_code); 25int prestera_devlink_traps_register(struct prestera_switch *sw); 26void prestera_devlink_traps_unregister(struct prestera_switch *sw); 27 28#endif /* _PRESTERA_DEVLINK_H_ */