descriptor concept in NIC
07:47 14 Apr 2016

I am trying to understand the concept of Rx and Tx descriptors used in Network driver code.

  1. Are Descriptors in software(RAM) or hardware (NIC card).
  2. How do they get filled.

EDIT: So in a Realtek card driver code. I have a following struct defined.

struct Desc
{
        uint32_t opts1;
        uint32_t opts2;
        uint64_t addr;
};

txd->addr = cpu_to_le64(mapping);
txd->opts2 = cpu_to_le32(opts2);
txd->opts1 = cpu_to_le32(opts1 & ~DescOwn);

So are the opts1 and opts2 and there bits like DescOwn card specific? Will they be defined by the manufacturer in the datasheet?

driver cpu-architecture nic