1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>alloc_netdev_mqs</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs"><link rel="up" href="netdev.html#idp1097739572" title="Driver Support"><link rel="prev" href="API-dev-get-stats.html" title="dev_get_stats"><link rel="next" href="API-free-netdev.html" title="free_netdev"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">alloc_netdev_mqs</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-dev-get-stats.html">Prev</a> </td><th width="60%" align="center">Driver Support</th><td width="20%" align="right"> <a accesskey="n" href="API-free-netdev.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-alloc-netdev-mqs"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>alloc_netdev_mqs — 2 allocate network device 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct net_device * <b class="fsfunc">alloc_netdev_mqs </b>(</code></td><td>int <var class="pdparam">sizeof_priv</var>, </td></tr><tr><td> </td><td>const char * <var class="pdparam">name</var>, </td></tr><tr><td> </td><td>unsigned char <var class="pdparam">name_assign_type</var>, </td></tr><tr><td> </td><td>void (*<var class="pdparam">setup</var>) 4 <code>(</code>struct net_device *<code>)</code>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">txqs</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">rxqs</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1098348476"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>sizeof_priv</code></em></span></dt><dd><p> 5 size of private data to allocate space for 6 </p></dd><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p> 7 device name format string 8 </p></dd><dt><span class="term"><em class="parameter"><code>name_assign_type</code></em></span></dt><dd><p> 9 origin of device name 10 </p></dd><dt><span class="term"><em class="parameter"><code>setup</code></em></span></dt><dd><p> 11 callback to initialize device 12 </p></dd><dt><span class="term"><em class="parameter"><code>txqs</code></em></span></dt><dd><p> 13 the number of TX subqueues to allocate 14 </p></dd><dt><span class="term"><em class="parameter"><code>rxqs</code></em></span></dt><dd><p> 15 the number of RX subqueues to allocate 16 </p></dd></dl></div></div><div class="refsect1"><a name="idp1098355292"></a><h2>Description</h2><p> 17 Allocates a struct net_device with private data area for driver use 18 and performs basic initialization. Also allocates subqueue structs 19 for each queue on the device. 20</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-dev-get-stats.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="netdev.html#idp1097739572">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-free-netdev.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">dev_get_stats</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">free_netdev</span></td></tr></table></div></body></html> 21