1aaf33641SBjoern A. Zeeb /*-
2aaf33641SBjoern A. Zeeb  * Copyright (c) 2020-2021 The FreeBSD Foundation
3aaf33641SBjoern A. Zeeb  *
4aaf33641SBjoern A. Zeeb  * Portions of this software were developed by Björn Zeeb
5aaf33641SBjoern A. Zeeb  * under sponsorship from the FreeBSD Foundation.
6aaf33641SBjoern A. Zeeb  *
7aaf33641SBjoern A. Zeeb  * Redistribution and use in source and binary forms, with or without
8aaf33641SBjoern A. Zeeb  * modification, are permitted provided that the following conditions
9aaf33641SBjoern A. Zeeb  * are met:
10aaf33641SBjoern A. Zeeb  * 1. Redistributions of source code must retain the above copyright
11aaf33641SBjoern A. Zeeb  *    notice unmodified, this list of conditions, and the following
12aaf33641SBjoern A. Zeeb  *    disclaimer.
13aaf33641SBjoern A. Zeeb  * 2. Redistributions in binary form must reproduce the above copyright
14aaf33641SBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer in the
15aaf33641SBjoern A. Zeeb  *    documentation and/or other materials provided with the distribution.
16aaf33641SBjoern A. Zeeb  *
17aaf33641SBjoern A. Zeeb  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18aaf33641SBjoern A. Zeeb  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19aaf33641SBjoern A. Zeeb  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20aaf33641SBjoern A. Zeeb  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21aaf33641SBjoern A. Zeeb  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22aaf33641SBjoern A. Zeeb  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23aaf33641SBjoern A. Zeeb  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24aaf33641SBjoern A. Zeeb  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25aaf33641SBjoern A. Zeeb  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26aaf33641SBjoern A. Zeeb  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27aaf33641SBjoern A. Zeeb  *
28aaf33641SBjoern A. Zeeb  * $FreeBSD$
29aaf33641SBjoern A. Zeeb  */
302d0694b9SVladimir Kondratyev #ifndef	_LINUXKPI_LINUX_NETDEV_FEATURES_H_
312d0694b9SVladimir Kondratyev #define	_LINUXKPI_LINUX_NETDEV_FEATURES_H_
32aaf33641SBjoern A. Zeeb 
33aaf33641SBjoern A. Zeeb #include <linux/types.h>
34aaf33641SBjoern A. Zeeb #include <linux/bitops.h>
35aaf33641SBjoern A. Zeeb 
36aaf33641SBjoern A. Zeeb typedef	uint32_t		netdev_features_t;
37aaf33641SBjoern A. Zeeb 
38aaf33641SBjoern A. Zeeb #define NETIF_F_HIGHDMA         BIT(0)
39aaf33641SBjoern A. Zeeb #define NETIF_F_SG              BIT(1)
40aaf33641SBjoern A. Zeeb #define NETIF_F_IP_CSUM         BIT(2)
41aaf33641SBjoern A. Zeeb #define NETIF_F_IPV6_CSUM       BIT(3)
42aaf33641SBjoern A. Zeeb #define NETIF_F_TSO             BIT(4)
43aaf33641SBjoern A. Zeeb #define NETIF_F_TSO6            BIT(5)
44aaf33641SBjoern A. Zeeb #define NETIF_F_RXCSUM          BIT(6)
45*f75b3614SBjoern A. Zeeb #define	NETIF_F_HW_CSUM		BIT(7)
46aaf33641SBjoern A. Zeeb 
47aaf33641SBjoern A. Zeeb #define NETIF_F_CSUM_MASK       (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)
48aaf33641SBjoern A. Zeeb 
492d0694b9SVladimir Kondratyev #endif	/* _LINUXKPI_LINUX_NETDEV_FEATURES_H_ */
50