Project

General

Profile

Actions

Feature #3131

closed

EthernetTransport: re-enable TPACKET_V3 for capture if kernel and libpcap are recent enough

Added by Davide Pesavento over 8 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Low
Assignee:
-
Category:
Faces
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

We disabled TPACKET_V3 in #1511 as a workaround for a Linux kernel bug. The bug was finally fixed in Linux v3.19, released earlier this year. Recently libpcap also received some patches to improve its behavior with TPACKET_V3 and recent kernels.

We should detect if the system has a recent enough combination of kernel and libpcap, and stop disabling TPACKET_V3 in that case. This should improve the performance of the EthernetTransport receive path, and might help with #2441.


Related issues 1 (0 open1 closed)

Related to NFD - Bug #1511: EthernetFace cannot receive on Ubuntu 14.04ClosedDavide Pesavento04/20/2014

Actions
Actions #1

Updated by Davide Pesavento over 8 years ago

  • Related to Bug #1511: EthernetFace cannot receive on Ubuntu 14.04 added
Actions #2

Updated by Davide Pesavento over 8 years ago

  • Description updated (diff)
Actions #3

Updated by Junxiao Shi over 8 years ago

  • Subject changed from EthernetFace: re-enable TPACKET_V3 for capture if kernel and libpcap are recent enough to EthernetTransport: re-enable TPACKET_V3 for capture if kernel and libpcap are recent enough
  • Target version set to v0.5

Ubuntu would have recent enough libpcap since 15.10.

Actions #4

Updated by Davide Pesavento almost 8 years ago

  • Tracker changed from Task to Feature
Actions #5

Updated by Davide Pesavento over 7 years ago

  • Target version deleted (v0.5)
Actions #6

Updated by Davide Pesavento almost 7 years ago

Junxiao Shi wrote:

Ubuntu would have recent enough libpcap since 15.10.

libpcap version 1.5.3 should be sufficient. And that version is available in Ubuntu 14.04.

Actions #7

Updated by Davide Pesavento over 5 years ago

  • Description updated (diff)
Actions #8

Updated by Davide Pesavento over 5 years ago

  • Status changed from New to Rejected
  • Assignee deleted (Davide Pesavento)

Actually, libpcap recommends enabling immediate mode (thereby limiting the highest TPACKET version to V2) if the application wishes to be notified of new packets as soon as they are received, see https://github.com/the-tcpdump-group/libpcap/issues/472#issuecomment-169791537

The alternative (i.e. allowing TPACKET_V3 by not enabling immediate mode) means setting the "packet buffer timeout" to 1ms (the lowest possible value), which means that each incoming packet may be delayed by up to 1ms, which is probably unacceptable for a packet forwarder. So I'm rejecting this issue.

Actions

Also available in: Atom PDF