/* SPDX-License-Identifier: GPL-2.0 */ /****************************************************************************** * * Copyright (c) 2021 MaxLinear, Inc. * *****************************************************************************/ #ifndef _DP_OAM_ #define _DP_OAM_ /** Extraction points */ enum dp_oam_ext_pts { DP_OAM_EXT_NO_VLAN = 0, DP_OAM_EXT_VLAN = 1, DP_OAM_EXT_Q_NO_VLAN = 2, DP_OAM_EXT_Q_VLAN = 3 }; /** Action arguments */ struct dp_oam_args { /** Use specified netdevice, * if not used configure globally on all ports. */ bool dev_en; /** Netdevice ifindex */ int ifindex; /** Configuration per netdevice port */ bool global; /** Extraction point */ enum dp_oam_ext_pts ext_pt; /** Configure drop instead of extraction */ bool drop; /** Use OAM level */ bool level_en; /** OAM Level * - represents target level for extraction * - represents maximum level range for drop */ u8 level; /** Use OAM operational code */ bool opcode_en; /** OAM operational code */ u8 opcode; /** Use VLAN information */ bool vlan_en; /** VLAN id */ u16 vlan_id; /** OAM rule priority (optional, default: 0) */ u32 prio; /** OAM rule index - returned after success */ u32 index; }; int dp_oam_act_add(struct dp_oam_args *args); int dp_oam_act_del(struct dp_oam_args *args); #endif