> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man4/if_ntb.4.md).

# if\_ntb.4

`if_ntb` — 用于 Non-Transparent Bridges 的虚拟以太网接口

## 名称

`if_ntb`

## 概要

要将此驱动编译进内核，请将以下行放入你的内核配置文件中：

> device ntb device ntb\_transport device if\_ntb

或者，要在引导时以模块形式加载该驱动，请在 loader.conf(5) 中加入以下行：

```sh
if_ntb_load="YES"
```

`以下可调参数可在 loader(8) 中设置：`

`限制每个接口的最大队列数。默认为无限制。`

**hw\.if\_ntb.num\_queues**

## 描述

`if_ntb` 驱动附着在 [ntb\_transport(4)](/man/man4/ntb_transport.4.md) 驱动之上，利用其一个或多个数据包队列在系统之间创建虚拟以太网网络接口。该接口的典型 MTU 约为 64KB，以减少开销。接口的默认 MAC 地址为随机生成。

`if_ntb` 驱动未实现任何真正的硬件卸载，但由于 PCIe 链路由 CRC32 保护，在某些情况下，可通过在链路两端设置 `rxcsum` 和 `txcsum` 接口选项来启用伪校验和卸载，从而节省一些 CPU 周期。

## 参见

[ntb\_transport(4)](/man/man4/ntb_transport.4.md)

## 作者

`if_ntb` 驱动由 Intel 开发，最初由 Carl Delsey <carl@FreeBSD.org> 编写。后续改进由 Conrad E. Meyer <cem@FreeBSD.org> 和 Alexander Motin <mav@FreeBSD.org> 完成。

## 缺陷

Linux 每个接口仅支持一个队列，因此可能需要手动配置以保持兼容性。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man4/if_ntb.4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
