mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly
This commit is contained in:
parent
f20078df0b
commit
80af9bdabe
@ -691,13 +691,15 @@
|
||||
<varlistentry>
|
||||
<term><varname>RxBufferSize=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a integer. Specifies the NIC receive ring buffer size. When unset, the kernel's default will be used.</para>
|
||||
<para>Takes an integer. Specifies the maximum number of pending packets in the NIC receive buffer.
|
||||
When unset, the kernel's default will be used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>TxBufferSize=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a integer. Specifies the NIC transmit ring buffer size. When unset, the kernel's default will be used.</para>
|
||||
<para>Takes an integer. Specifies the maximum number of pending packets in the NIC transmit buffer.
|
||||
When unset, the kernel's default will be used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -431,18 +431,14 @@ int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, netdev_ring
|
||||
if (r < 0)
|
||||
return -errno;
|
||||
|
||||
if (ring->rx_pending_set) {
|
||||
if (ecmd.rx_pending != ring->rx_pending) {
|
||||
ecmd.rx_pending = ring->rx_pending;
|
||||
need_update = true;
|
||||
}
|
||||
if (ring->rx_pending_set && ecmd.rx_pending != ring->rx_pending) {
|
||||
ecmd.rx_pending = ring->rx_pending;
|
||||
need_update = true;
|
||||
}
|
||||
|
||||
if (ring->tx_pending_set) {
|
||||
if (ecmd.tx_pending != ring->tx_pending) {
|
||||
ecmd.tx_pending = ring->tx_pending;
|
||||
need_update = true;
|
||||
}
|
||||
if (ring->tx_pending_set && ecmd.tx_pending != ring->tx_pending) {
|
||||
ecmd.tx_pending = ring->tx_pending;
|
||||
need_update = true;
|
||||
}
|
||||
|
||||
if (need_update) {
|
||||
|
Loading…
Reference in New Issue
Block a user