xref: /freebsd/sys/dev/mlx5/mlx5_core/fs_tcp.h (revision 2c0ade80)
12c0ade80SHans Petter Selasky /*-
22c0ade80SHans Petter Selasky  * Copyright (c) 2020-2021, Mellanox Technologies, Ltd.
32c0ade80SHans Petter Selasky  *
42c0ade80SHans Petter Selasky  * Redistribution and use in source and binary forms, with or without
52c0ade80SHans Petter Selasky  * modification, are permitted provided that the following conditions
62c0ade80SHans Petter Selasky  * are met:
72c0ade80SHans Petter Selasky  * 1. Redistributions of source code must retain the above copyright
82c0ade80SHans Petter Selasky  *    notice, this list of conditions and the following disclaimer.
92c0ade80SHans Petter Selasky  * 2. Redistributions in binary form must reproduce the above copyright
102c0ade80SHans Petter Selasky  *    notice, this list of conditions and the following disclaimer in the
112c0ade80SHans Petter Selasky  *    documentation and/or other materials provided with the distribution.
122c0ade80SHans Petter Selasky  *
132c0ade80SHans Petter Selasky  * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND
142c0ade80SHans Petter Selasky  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
152c0ade80SHans Petter Selasky  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
162c0ade80SHans Petter Selasky  * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
172c0ade80SHans Petter Selasky  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
182c0ade80SHans Petter Selasky  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
192c0ade80SHans Petter Selasky  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
202c0ade80SHans Petter Selasky  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
212c0ade80SHans Petter Selasky  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
222c0ade80SHans Petter Selasky  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
232c0ade80SHans Petter Selasky  * SUCH DAMAGE.
242c0ade80SHans Petter Selasky  */
252c0ade80SHans Petter Selasky 
262c0ade80SHans Petter Selasky #ifndef __MLX5E_ACCEL_FS_TCP_H__
272c0ade80SHans Petter Selasky #define	__MLX5E_ACCEL_FS_TCP_H__
282c0ade80SHans Petter Selasky 
292c0ade80SHans Petter Selasky struct inpcb;
302c0ade80SHans Petter Selasky struct mlx5_flow_rule;
312c0ade80SHans Petter Selasky struct mlx5e_priv;
322c0ade80SHans Petter Selasky 
332c0ade80SHans Petter Selasky int	mlx5e_accel_fs_tcp_create(struct mlx5e_priv *);
342c0ade80SHans Petter Selasky void	mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *);
352c0ade80SHans Petter Selasky struct mlx5_flow_rule *
362c0ade80SHans Petter Selasky mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *,
372c0ade80SHans Petter Selasky     struct inpcb *, uint32_t tirn, uint32_t flow_tag, uint16_t vlan_id);
382c0ade80SHans Petter Selasky #define	MLX5E_ACCEL_FS_ADD_INPCB_NO_VLAN 0xFFFF
392c0ade80SHans Petter Selasky void	mlx5e_accel_fs_del_inpcb(struct mlx5_flow_rule *);
402c0ade80SHans Petter Selasky 
412c0ade80SHans Petter Selasky #endif					/* __MLX5E_ACCEL_FS_TCP_H__ */
42