Filtering happens when source and destination are on the same port. The switch drops the frame. Why forward something to where it already is? This occurs when multiple devices share a port through another switch or hub. The local traffic stays local. The main switch doesn't waste bandwidth forwarding it. Flood, forward, and filter are the three switching decisions.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/network-design/physical-and-data-link-fundamentals/switch-filtering
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████████████████████████████████████████████████████████████████████████████████████████████