rt_kernel/RHEL7 で rx_dropped ifconfig カウンターが増えている

Solution Verified - Updated -

Environment

  • Red Hat enterprise MRG realtime 2.3
    • kernel-rt-3.8.13-rt14.25.el6rt
  • Red Hat Enterprise Linux 7

Issue

  • "FC Solarflare 10G ネットワークカード" でボンディングインターフェイスと、MRG 2.3 にインストールされているドライバーを使用しています。
    突然、ボンディングインターフェイス eth4 のスレーブの 1 つでパケットがドロップしました。
  • RT カーネル/RHEL7 をインストールすると、ifconfig に対して rx_dropped カウンターが増えているのを確認しました。

Resolution

  • 意図したとおりに動作しています。TCP が再送信またはスループットが低くならない場合、このエラーは安全に無視できます。計測に iperf などのプログラムを使用して、スループットが許容範囲であることを確認します。
  • "netstat -s" を使用して、再送信速度が許容範囲内であることを確認します。
Tcp:
    10007784 active connections openings
    7067290 passive connection openings
    2976883 failed connection attempts
    26797 connection resets received
    291 connections established
    530001538 segments received
    522569216 segments send out
    31901 segments retransmited <----
    0 bad segments received.
    8720 resets sent

Root Cause

RT および RHEL7 カーネルには、下記に記載するようなエラーだけではなく、エラーではない状況に対しても rx_dropped カウンターを更新するコードが含まれます。

  • softnet バックログが満たされている
  • VLAN タグに問題がある
  • 受け取ったパケットに未知または未登録のプロトコルがある
  • サーバーに ipv4 だけを設定した場合の IPv6 フレーム

rt_kernel コア/dev.c で以下の変更を確認します。

static int __netif_receive_skb(struct sk_buff *skb)

.
.
.
        if (sk_memalloc_socks() && skb_pfmemalloc(skb)
                                && !skb_pfmemalloc_protocol(skb))
                goto drop;

.
.
.

       if (pt_prev) {
                if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
                        goto drop;
                else
                        ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
        } else {
drop:
                atomic_long_inc(&skb->dev->rx_dropped); <---- カウンターがインクリメントされている
                kfree_skb(skb);

ただし、RHEL6 カーネルにはこの変更がありません。

       if (pt_prev) {
                ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
        } else {
                kfree_skb(skb);
                /* Jamal, now you will not able to escape explaining
                 * me how you were going to use this.:-)
                 */
                ret = NET_RX_DROP; <---- 黙然とドロップされる
        }

Diagnostic Steps

以下の ifconfig 出力に示されるように、rx_dropped エラーカウンターが増加しています。

 bond0     Link encap:Ethernet  HWaddr 00:0F:xx:xx:xx:xx 
          inet addr:10.1.xx.xx  Bcast:10.1.xx.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:53ff:yyyy:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:237375681 errors:0 dropped:295847 overruns:0 frame:0
          TX packets:201849259 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:28084942473 (26.1 GiB)  TX bytes:30785252323 (28.6 GiB)
  • ethtool -S を使用して、インターフェイスで実際のエラーが発生していないことを確認します。

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.