* Returns true if it's possible this packet could be LROed. * if it returns false, it is guaranteed that tcp_lro_rx() * would not return zero. */
| 2831 | * would not return zero. |
| 2832 | */ |
| 2833 | static bool |
| 2834 | iflib_check_lro_possible(struct mbuf *m, bool v4_forwarding, bool v6_forwarding) |
| 2835 | { |
| 2836 | struct ether_header *eh; |
| 2837 | |
| 2838 | eh = mtod(m, struct ether_header *); |
| 2839 | switch (eh->ether_type) { |
| 2840 | #if defined(INET6) |
| 2841 | case htons(ETHERTYPE_IPV6): |
| 2842 | return (!v6_forwarding); |
| 2843 | #endif |
| 2844 | #if defined (INET) |
| 2845 | case htons(ETHERTYPE_IP): |
| 2846 | return (!v4_forwarding); |
| 2847 | #endif |
| 2848 | } |
| 2849 | |
| 2850 | return false; |
| 2851 | } |
| 2852 | #else |
| 2853 | static void |
| 2854 | iflib_get_ip_forwarding(struct lro_ctrl *lc __unused, bool *v4 __unused, bool *v6 __unused) |