Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: vxlan: rename SKB_DROP_REASON_VXLAN_NO_REMOTE

The SKB_DROP_REASON_VXLAN_NO_REMOTE skb drop reason was introduced in
the specific context of vxlan. As it turns out, there are similar cases
when a packet needs to be dropped in other parts of the network stack,
such as the bridge module.

Rename SKB_DROP_REASON_VXLAN_NO_REMOTE and give it a more generic name,
so that it can be used in other parts of the network stack. This is not
a functional change, and the numeric value of the drop reason even
remains unchanged.

Signed-off-by: Radu Rendec <rrendec@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20241219163606.717758-2-rrendec@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Radu Rendec and committed by
Jakub Kicinski
46e0ccfb 6ad7f719

+6 -6
+2 -2
drivers/net/vxlan/vxlan_core.c
··· 2798 2798 dev_dstats_tx_dropped(dev); 2799 2799 vxlan_vnifilter_count(vxlan, vni, NULL, 2800 2800 VXLAN_VNI_STATS_TX_DROPS, 0); 2801 - kfree_skb_reason(skb, SKB_DROP_REASON_VXLAN_NO_REMOTE); 2801 + kfree_skb_reason(skb, SKB_DROP_REASON_NO_TX_TARGET); 2802 2802 return NETDEV_TX_OK; 2803 2803 } 2804 2804 } ··· 2821 2821 if (fdst) 2822 2822 vxlan_xmit_one(skb, dev, vni, fdst, did_rsc); 2823 2823 else 2824 - kfree_skb_reason(skb, SKB_DROP_REASON_VXLAN_NO_REMOTE); 2824 + kfree_skb_reason(skb, SKB_DROP_REASON_NO_TX_TARGET); 2825 2825 } 2826 2826 2827 2827 return NETDEV_TX_OK;
+1 -1
drivers/net/vxlan/vxlan_mdb.c
··· 1712 1712 vxlan_xmit_one(skb, vxlan->dev, src_vni, 1713 1713 rcu_dereference(fremote->rd), false); 1714 1714 else 1715 - kfree_skb_reason(skb, SKB_DROP_REASON_VXLAN_NO_REMOTE); 1715 + kfree_skb_reason(skb, SKB_DROP_REASON_NO_TX_TARGET); 1716 1716 1717 1717 return NETDEV_TX_OK; 1718 1718 }
+3 -3
include/net/dropreason-core.h
··· 106 106 FN(VXLAN_VNI_NOT_FOUND) \ 107 107 FN(MAC_INVALID_SOURCE) \ 108 108 FN(VXLAN_ENTRY_EXISTS) \ 109 - FN(VXLAN_NO_REMOTE) \ 109 + FN(NO_TX_TARGET) \ 110 110 FN(IP_TUNNEL_ECN) \ 111 111 FN(TUNNEL_TXINFO) \ 112 112 FN(LOCAL_MAC) \ ··· 497 497 * entry or an entry pointing to a nexthop. 498 498 */ 499 499 SKB_DROP_REASON_VXLAN_ENTRY_EXISTS, 500 - /** @SKB_DROP_REASON_VXLAN_NO_REMOTE: no remote found for xmit */ 501 - SKB_DROP_REASON_VXLAN_NO_REMOTE, 500 + /** @SKB_DROP_REASON_NO_TX_TARGET: no target found for xmit */ 501 + SKB_DROP_REASON_NO_TX_TARGET, 502 502 /** 503 503 * @SKB_DROP_REASON_IP_TUNNEL_ECN: skb is dropped according to 504 504 * RFC 6040 4.2, see __INET_ECN_decapsulate() for detail.