title: descriptor concept in NIC
body: <p>I am trying to understand the concept of Rx and Tx descriptors used in Network driver code.</p>
  <ol>
  <li>Are Descriptors in software(RAM) or hardware (NIC card).</li>
  <li>How do they get filled.</li>
  </ol>
  <p>EDIT: So in a Realtek card driver code. I have a following struct defined.</p>
  <pre><code>struct Desc
  {
          uint32_t opts1;
          uint32_t opts2;
          uint64_t addr;
  };
  
  txd-&gt;addr = cpu_to_le64(mapping);
  txd-&gt;opts2 = cpu_to_le32(opts2);
  txd-&gt;opts1 = cpu_to_le32(opts1 &amp; ~DescOwn);
  </code></pre>
  <p>So are the <code>opts1 and opts2</code> and there bits like <code>DescOwn</code> card specific? Will they be defined by the manufacturer in the datasheet?</p>