Skip to content

Commit

Permalink
devlink: Add overlay source MAC is multicast trap
Browse files Browse the repository at this point in the history
Add packet trap that can report NVE packets that the device decided to
drop because their overlay source MAC is multicast.

Signed-off-by: Amit Cohen <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
amitcohen1 authored and davem330 committed Jan 19, 2020
1 parent 27942c7 commit c3cae49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/networking/devlink/devlink-trap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ be added to the following table:
- Traps NVE and IPinIP packets that the device decided to drop because of
failure during decapsulation (e.g., packet being too short, reserved
bits set in VXLAN header)
* - ``overlay_smac_is_mc``
- ``drop``
- Traps NVE packets that the device decided to drop because their overlay
source MAC is multicast

Driver-specific Packet Traps
============================
Expand Down
3 changes: 3 additions & 0 deletions include/net/devlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ enum devlink_trap_generic_id {
DEVLINK_TRAP_GENERIC_ID_IPV6_LPM_UNICAST_MISS,
DEVLINK_TRAP_GENERIC_ID_NON_ROUTABLE,
DEVLINK_TRAP_GENERIC_ID_DECAP_ERROR,
DEVLINK_TRAP_GENERIC_ID_OVERLAY_SMAC_MC,

/* Add new generic trap IDs above */
__DEVLINK_TRAP_GENERIC_ID_MAX,
Expand Down Expand Up @@ -666,6 +667,8 @@ enum devlink_trap_group_generic_id {
"non_routable_packet"
#define DEVLINK_TRAP_GENERIC_NAME_DECAP_ERROR \
"decap_error"
#define DEVLINK_TRAP_GENERIC_NAME_OVERLAY_SMAC_MC \
"overlay_smac_is_mc"

#define DEVLINK_TRAP_GROUP_GENERIC_NAME_L2_DROPS \
"l2_drops"
Expand Down
1 change: 1 addition & 0 deletions net/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -7708,6 +7708,7 @@ static const struct devlink_trap devlink_trap_generic[] = {
DEVLINK_TRAP(IPV6_LPM_UNICAST_MISS, EXCEPTION),
DEVLINK_TRAP(NON_ROUTABLE, DROP),
DEVLINK_TRAP(DECAP_ERROR, EXCEPTION),
DEVLINK_TRAP(OVERLAY_SMAC_MC, DROP),
};

#define DEVLINK_TRAP_GROUP(_id) \
Expand Down

0 comments on commit c3cae49

Please sign in to comment.