1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/marvell/prestera/prestera_dsa.h
Oleksandr Mazur 0a9003f45e net: marvell: prestera: devlink: add traps/groups implementation
Add devlink traps registration (with corresponding groups) for
all the traffic types that driver traps to the CPU;
prestera_rxtx: report each packet trapped to the CPU (RX) to the
prestera_devlink;

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-14 13:04:25 -07:00

36 lines
742 B
C

/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
/* Copyright (c) 2020 Marvell International Ltd. All rights reserved. */
#ifndef __PRESTERA_DSA_H_
#define __PRESTERA_DSA_H_
#include <linux/types.h>
#define PRESTERA_DSA_HLEN 16
enum prestera_dsa_cmd {
/* DSA command is "To CPU" */
PRESTERA_DSA_CMD_TO_CPU = 0,
/* DSA command is "From CPU" */
PRESTERA_DSA_CMD_FROM_CPU,
};
struct prestera_dsa_vlan {
u16 vid;
u8 vpt;
u8 cfi_bit;
bool is_tagged;
};
struct prestera_dsa {
struct prestera_dsa_vlan vlan;
u32 hw_dev_num;
u32 port_num;
u8 cpu_code;
};
int prestera_dsa_parse(struct prestera_dsa *dsa, const u8 *dsa_buf);
int prestera_dsa_build(const struct prestera_dsa *dsa, u8 *dsa_buf);
#endif /* _PRESTERA_DSA_H_ */