1
1
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:
nabijaczleweli 2020-04-29 18:38:56 +02:00
parent f20078df0b
commit 80af9bdabe
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
2 changed files with 10 additions and 12 deletions

View File

@ -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>

View File

@ -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) {