Skip to content

Commit

Permalink
fix: misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
pengjianzhang authored Feb 18, 2022
2 parents 62cbb33 + ea08a2a commit ddd79d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/design-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ dperf曾经使用了通用的时间轮定时器,一个时间轮定时器消耗

### 零拷贝,无接收/发送缓存,零校验和
- 零拷贝。除了启动阶段,dperf不拷贝任何数据, 包括以太网头部/IP头部/传输层头部/payload,因为这些内容几乎是固定不变的;
- 无接收缓存。dperf不关心payload内容,这些内容只不过是报文的填充物而已, dper只关心收到了多少字节
- 无接收缓存。dperf不关心payload内容,这些内容只不过是报文的填充物而已, dperf只关心收到了多少字节
- 无发送缓存。普通协议栈需要发送缓存,只有收到对方的确认,才能释放这些缓存,否则重传;另外还需要考虑到对方的确认的序列号可能是在缓冲区的任意位置,不一定是确认一个报文的结尾;发送缓存的管理是一个比较复杂的工作。发送的数据都是一样的,所以dperf不需要socket级别的发送缓存,有一个全局的报文池就可以了;
- 零校验和。通常我们会利用网卡功,卸载报文的校验和,但是我们要计算伪头部; 对同一个连接来说,报文类型是固定,dperf已经算好了尾部头校验和,整个过程没有校验和计算。
- 零校验和。通常我们会利用网卡卸载报文的校验和,但是我们要计算伪头部; 对同一个连接来说,报文类型是固定,dperf已经算好了尾部头校验和,整个过程没有校验和计算。

### HTTP协议实现
dperf服务器非常傻,它收到任何一个数据包(第一个字符是G, GET的开始),就认为是完整的请求,就把固定的响应发送出去。
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dperf once used the time wheel timer. One time wheel timer consumes 32 bytes, an

### Zero Copy, Zero Sockbuf, Zero Checksum
- Zero copy. Except for the startup phase, dperf does not copy any data, including Ethernet header/IP header/transport layer header/payload, because these contents are almost fixed.
- Zero receive buffer. dperf does not care about the content of the payload. These contents are nothing more than the filler of the message. dper only cares about how many bytes are received.
- Zero receive buffer. dperf does not care about the content of the payload. These contents are nothing more than the filler of the message. dperf only cares about how many bytes are received.
- Zero sending buffer. The ordinary protocol stack needs to send buffers, and only after receiving the confirmation from the other party, can these buffers be released, otherwise it is retransmitted; in addition, it needs to be considered that the sequence number of the other party's confirmation may be anywhere in the buffer, not necessarily confirming a message At the end of; the management of the sending buffer is a more complicated task. The data sent is the same, so dperf does not need a socket-level sending buffer, just a global message pool.
- Zero checksum. Usually we will use the network card function to offload the checksum of the message, but we have to calculate the pseudo header; for the same connection, the message type is fixed, dperf has already calculated the tail and head checksum, the whole process does not Checksum calculation.

Expand Down

0 comments on commit ddd79d4

Please sign in to comment.