t4_ioctl.h (718cf2ccb9956613756ab15d7a0e28f2c8e91cab) t4_ioctl.h (1131c927c4c388c75c728d443cab7ff0482a1c50)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2011 Chelsio Communications, Inc.
5 * All rights reserved.
6 * Written by: Navdeep Parhar <np@FreeBSD.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 *
31 */
32
33#ifndef __T4_IOCTL_H__
34#define __T4_IOCTL_H__
35
36#include <sys/types.h>
37#include <net/ethernet.h>
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2011 Chelsio Communications, Inc.
5 * All rights reserved.
6 * Written by: Navdeep Parhar <np@FreeBSD.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 *
31 */
32
33#ifndef __T4_IOCTL_H__
34#define __T4_IOCTL_H__
35
36#include <sys/types.h>
37#include <net/ethernet.h>
38#include <net/bpf.h>
38
39/*
40 * Ioctl commands specific to this driver.
41 */
42enum {
43 T4_GETREG = 0x40, /* read register */
44 T4_SETREG, /* write register */
45 T4_REGDUMP, /* dump of all registers */

--- 293 unchanged lines hidden (view full) ---

339
340struct t4_cudbg_dump {
341 uint8_t wr_flash;
342 uint8_t bitmap[16];
343 uint32_t len;
344 uint8_t *data;
345};
346
39
40/*
41 * Ioctl commands specific to this driver.
42 */
43enum {
44 T4_GETREG = 0x40, /* read register */
45 T4_SETREG, /* write register */
46 T4_REGDUMP, /* dump of all registers */

--- 293 unchanged lines hidden (view full) ---

340
341struct t4_cudbg_dump {
342 uint8_t wr_flash;
343 uint8_t bitmap[16];
344 uint32_t len;
345 uint8_t *data;
346};
347
348enum {
349 OPEN_TYPE_LISTEN = 'L',
350 OPEN_TYPE_ACTIVE = 'A',
351 OPEN_TYPE_PASSIVE = 'P',
352 OPEN_TYPE_DONTCARE = 'D',
353};
354
355struct offload_settings {
356 int8_t offload;
357 int8_t rx_coalesce;
358 int8_t cong_algo;
359 int8_t sched_class;
360 int8_t tstamp;
361 int8_t sack;
362 int8_t nagle;
363 int8_t ecn;
364 int8_t ddp;
365 int8_t tls;
366 int16_t txq;
367 int16_t rxq;
368 int16_t mss;
369};
370
371struct offload_rule {
372 char open_type;
373 struct offload_settings settings;
374 struct bpf_program bpf_prog; /* compiled program/filter */
375};
376
377/*
378 * An offload policy consists of a set of rules matched in sequence. The
379 * settings of the first rule that matches are applied to that connection.
380 */
381struct t4_offload_policy {
382 uint32_t nrules;
383 struct offload_rule *rule;
384};
385
347#define CHELSIO_T4_GETREG _IOWR('f', T4_GETREG, struct t4_reg)
348#define CHELSIO_T4_SETREG _IOW('f', T4_SETREG, struct t4_reg)
349#define CHELSIO_T4_REGDUMP _IOWR('f', T4_REGDUMP, struct t4_regdump)
350#define CHELSIO_T4_GET_FILTER_MODE _IOWR('f', T4_GET_FILTER_MODE, uint32_t)
351#define CHELSIO_T4_SET_FILTER_MODE _IOW('f', T4_SET_FILTER_MODE, uint32_t)
352#define CHELSIO_T4_GET_FILTER _IOWR('f', T4_GET_FILTER, struct t4_filter)
353#define CHELSIO_T4_SET_FILTER _IOW('f', T4_SET_FILTER, struct t4_filter)
354#define CHELSIO_T4_DEL_FILTER _IOW('f', T4_DEL_FILTER, struct t4_filter)

--- 8 unchanged lines hidden (view full) ---

363#define CHELSIO_T4_SCHED_QUEUE _IOW('f', T4_SET_SCHED_QUEUE, \
364 struct t4_sched_queue)
365#define CHELSIO_T4_GET_TRACER _IOWR('f', T4_GET_TRACER, struct t4_tracer)
366#define CHELSIO_T4_SET_TRACER _IOW('f', T4_SET_TRACER, struct t4_tracer)
367#define CHELSIO_T4_LOAD_CFG _IOW('f', T4_LOAD_CFG, struct t4_data)
368#define CHELSIO_T4_LOAD_BOOT _IOW('f', T4_LOAD_BOOT, struct t4_bootrom)
369#define CHELSIO_T4_LOAD_BOOTCFG _IOW('f', T4_LOAD_BOOTCFG, struct t4_data)
370#define CHELSIO_T4_CUDBG_DUMP _IOWR('f', T4_CUDBG_DUMP, struct t4_cudbg_dump)
386#define CHELSIO_T4_GETREG _IOWR('f', T4_GETREG, struct t4_reg)
387#define CHELSIO_T4_SETREG _IOW('f', T4_SETREG, struct t4_reg)
388#define CHELSIO_T4_REGDUMP _IOWR('f', T4_REGDUMP, struct t4_regdump)
389#define CHELSIO_T4_GET_FILTER_MODE _IOWR('f', T4_GET_FILTER_MODE, uint32_t)
390#define CHELSIO_T4_SET_FILTER_MODE _IOW('f', T4_SET_FILTER_MODE, uint32_t)
391#define CHELSIO_T4_GET_FILTER _IOWR('f', T4_GET_FILTER, struct t4_filter)
392#define CHELSIO_T4_SET_FILTER _IOW('f', T4_SET_FILTER, struct t4_filter)
393#define CHELSIO_T4_DEL_FILTER _IOW('f', T4_DEL_FILTER, struct t4_filter)

--- 8 unchanged lines hidden (view full) ---

402#define CHELSIO_T4_SCHED_QUEUE _IOW('f', T4_SET_SCHED_QUEUE, \
403 struct t4_sched_queue)
404#define CHELSIO_T4_GET_TRACER _IOWR('f', T4_GET_TRACER, struct t4_tracer)
405#define CHELSIO_T4_SET_TRACER _IOW('f', T4_SET_TRACER, struct t4_tracer)
406#define CHELSIO_T4_LOAD_CFG _IOW('f', T4_LOAD_CFG, struct t4_data)
407#define CHELSIO_T4_LOAD_BOOT _IOW('f', T4_LOAD_BOOT, struct t4_bootrom)
408#define CHELSIO_T4_LOAD_BOOTCFG _IOW('f', T4_LOAD_BOOTCFG, struct t4_data)
409#define CHELSIO_T4_CUDBG_DUMP _IOWR('f', T4_CUDBG_DUMP, struct t4_cudbg_dump)
410#define CHELSIO_T4_SET_OFLD_POLICY _IOW('f', T4_SET_OFLD_POLICY, struct t4_offload_policy)
371#endif
411#endif