4

While I know that lot of packet processing(CRC calculations, packet segmentation handling, etc) can be offloaded to NIC, then does each packet still cause an interrupt to CPU? Is there a difference if NIC is in promiscuous mode?

  • 1
    According to wikipedia, promiscuous mode is implemented in the NIC, i.e., the NIC can and normally does do a lot of filtering. – goldilocks Nov 12 '14 at 14:29
  • @goldilocks What do you mean by filtering? – Martin Nov 12 '14 at 16:01
  • 1
    If turning on promiscuous mode exposes the system to frames it wouldn't otherwise see, then when it's not on, the NIC itself is filtering those frames out. – goldilocks Nov 12 '14 at 16:17
  • 1
    The first thing you need to specify in your question is whether you are interested in INCOMING packets or OUTGOING packets. Then, the answer to your question is probably quite driver- and hardware-dependent, depending on the capabilities of the hardware and the size of the hardware queue, etc... My guess is that typically incoming packets would interrupt but only if the queue was empty before the packet arrived. – Celada Nov 12 '14 at 16:54
4

Normally, the NIC will only interrupt the CPU if it needs to send the received packet to the system. In non-promiscuous mode, this would only be for packets addressed to its MAC address, the broadcast address ff:ff:ff:ff:ff:ff, or a multicast address to which it has been subscribed. It also does validation before sending the packet to the CPU: the normal Ethernet CRC check, and IP/TCP/UDP checksums if the NIC has that capability and the driver has enabled this offloading.

Some NICs have a limited number of multicast subscription addresses; if this is exceeded, it will send all multicast packets to the CPU, and the OS has to discard the ones it doesn't care about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.