×

Methods and apparatus for dynamically switching between polling and interrupt mode for a ring buffer of a network interface card

  • US 7,937,499 B1
  • Filed: 07/09/2004
  • Issued: 05/03/2011
  • Est. Priority Date: 07/09/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method of configuring a network interface card, comprising:

  • mapping each one of a plurality of ring buffers associated with a network interface card (NIC) to one of a plurality of processors, wherein a first queue is associated with a first processor of the plurality of processors and a second queue is associated with a second processor of the plurality of processors, and, wherein the NIC comprises a driver to facilitate communication between the NIC and the plurality of processors;

    wherein the NIC is dynamically instructed, by an operating system, to individually operate each of the plurality of ring buffers in one of a polling mode and an interrupt mode, wherein the operating system is configured to communicate with the NIC using at least one of a plurality of ring buffer identifiers and an application programming interface of the driver, wherein each of the plurality of ring buffers is associated with one of the plurality of ring buffer identifiers;

    operating a first of the plurality of ring buffers associated with the NIC in the interrupt mode by;

    obtaining, from the mapping, a first ring buffer identifier of the plurality of ring buffer identifiers associated with the first processor of the plurality of processors, andsending an instruction comprising the first ring buffer identifier to the NIC,wherein the first ring buffer is operated in the interrupt mode when the memory mapped to the one of the plurality of ring buffers has less than a predefined number of packets or packets are received from the one of the plurality of ring buffers at less than a predefined rate;

    operating a second of the plurality of ring buffers associated with the NIC in a polling mode by;

    obtaining, from the mapping, a second ring buffer identifier of the plurality of ring buffer identifiers associated with the second processor of the plurality of processors, andsending an instruction comprising the second ring buffer identifier to the NIC,wherein the second ring buffer is operated in the polling mode when the memory mapped to the one of the plurality of ring buffers has greater than a predefined number of packets or packets are received from one of the plurality of ring buffers at greater than a predefined rate;

    transferring, by the operating system, packets from the first ring buffer to the first queue of the first processor; and

    transferring, by the operating system, packets from the second ring buffer to the second queue of the second processor.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×