<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/core/pktgen.c, branch v7.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-21T03:44:19+00:00</updated>
<entry>
<title>kernel.h: drop hex.h and update all hex.h users</title>
<updated>2026-01-21T03:44:19+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2025-12-15T00:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24c776355f4097316a763005434ffff716aa21a8'/>
<id>urn:sha1:24c776355f4097316a763005434ffff716aa21a8</id>
<content type='text'>
Remove &lt;linux/hex.h&gt; from &lt;linux/kernel.h&gt; and update all users/callers of
hex.h interfaces to directly #include &lt;linux/hex.h&gt; as part of the process
of putting kernel.h on a diet.

Removing hex.h from kernel.h means that 36K C source files don't have to
pay the price of parsing hex.h for the roughly 120 C source files that
need it.

This change has been build-tested with allmodconfig on most ARCHes.  Also,
all users/callers of &lt;linux/hex.h&gt; in the entire source tree have been
updated if needed (if not already #included).

Link: https://lkml.kernel.org/r/20251215005206.2362276-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Yury Norov (NVIDIA) &lt;yury.norov@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>net: pktgen: Use min()/min_t() to improve pktgen_finalize_skb()</title>
<updated>2025-08-21T08:12:11+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-15T15:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=833e43171b00caef456a7128718e43453f77b2e7'/>
<id>urn:sha1:833e43171b00caef456a7128718e43453f77b2e7</id>
<content type='text'>
Use min() and min_t() to improve pktgen_finalize_skb() and avoid
calculating 'datalen / frags' twice.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20250815153334.295431-3-thorsten.blum@linux.dev
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy)</title>
<updated>2025-04-17T11:02:41+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-15T11:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=422cf22aa332f80657eac39f6853f1340eabab10'/>
<id>urn:sha1:422cf22aa332f80657eac39f6853f1340eabab10</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #1423: FILE: net/core/pktgen.c:1423:
  +                       strcpy(pkt_dev-&gt;dst_min, buf);

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #1444: FILE: net/core/pktgen.c:1444:
  +                       strcpy(pkt_dev-&gt;dst_max, buf);

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #1554: FILE: net/core/pktgen.c:1554:
  +                       strcpy(pkt_dev-&gt;src_min, buf);

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #1575: FILE: net/core/pktgen.c:1575:
  +                       strcpy(pkt_dev-&gt;src_max, buf);

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #3231: FILE: net/core/pktgen.c:3231:
  +                       strcpy(pkt_dev-&gt;result, "Starting");

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #3235: FILE: net/core/pktgen.c:3235:
  +                       strcpy(pkt_dev-&gt;result, "Error starting");

  WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
  #3849: FILE: net/core/pktgen.c:3849:
  +       strcpy(pkt_dev-&gt;odevname, ifname);

While at it squash memset/strcpy pattern into single strscpy_pad call.

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20250415112916.113455-4-ps.report@gmx.net
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: please, no space before tabs)</title>
<updated>2025-04-17T11:02:41+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-15T11:29:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=65f5b9cb543189906559d5486dfe2fdf97d433a5'/>
<id>urn:sha1:65f5b9cb543189906559d5486dfe2fdf97d433a5</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: please, no space before tabs
  #230: FILE: net/core/pktgen.c:230:
  +#define M_NETIF_RECEIVE ^I1^I/* Inject packets into stack */$

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20250415112916.113455-3-ps.report@gmx.net
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: pktgen: fix code style (ERROR: else should follow close brace '}')</title>
<updated>2025-04-17T11:02:41+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-15T11:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3bc1ca7e173c10dab03b17d5e8ce9df390721288'/>
<id>urn:sha1:3bc1ca7e173c10dab03b17d5e8ce9df390721288</id>
<content type='text'>
Fix checkpatch code style errors:

  ERROR: else should follow close brace '}'
  #1317: FILE: net/core/pktgen.c:1317:
  +               }
  +               else

And checkpatch follow up code style check:

  CHECK: Unbalanced braces around else statement
  #1316: FILE: net/core/pktgen.c:1316:
  +               } else

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20250415112916.113455-2-ps.report@gmx.net
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: quoted string split across lines)</title>
<updated>2025-04-14T21:51:32+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-10T07:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08fcb1f242b9e7c73d3a3372890768fe28ef16a1'/>
<id>urn:sha1:08fcb1f242b9e7c73d3a3372890768fe28ef16a1</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: quoted string split across lines
  #480: FILE: net/core/pktgen.c:480:
  +       "Packet Generator for packet performance testing. "
  +       "Version: " VERSION "\n";

  WARNING: quoted string split across lines
  #632: FILE: net/core/pktgen.c:632:
  +                  "     udp_src_min: %d  udp_src_max: %d"
  +                  "  udp_dst_min: %d  udp_dst_max: %d\n",

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: macros should not use a trailing semicolon)</title>
<updated>2025-04-14T21:51:32+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-10T07:17:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dceae3e82ff8222f91f49ec26d5f41027ce0562c'/>
<id>urn:sha1:dceae3e82ff8222f91f49ec26d5f41027ce0562c</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: macros should not use a trailing semicolon
  #180: FILE: net/core/pktgen.c:180:
  +#define func_enter() pr_debug("entering %s\n", __func__);

  WARNING: macros should not use a trailing semicolon
  #234: FILE: net/core/pktgen.c:234:
  +#define   if_lock(t)           mutex_lock(&amp;(t-&gt;if_lock));

  CHECK: Unnecessary parentheses around t-&gt;if_lock
  #235: FILE: net/core/pktgen.c:235:
  +#define   if_unlock(t)           mutex_unlock(&amp;(t-&gt;if_lock));

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: Missing a blank line after declarations)</title>
<updated>2025-04-14T21:51:32+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-10T07:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca8ee665211ac64d38caa553cc04527b22cb25d2'/>
<id>urn:sha1:ca8ee665211ac64d38caa553cc04527b22cb25d2</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: Missing a blank line after declarations
  #761: FILE: net/core/pktgen.c:761:
  +               char c;
  +               if (get_user(c, &amp;user_buffer[i]))

  WARNING: Missing a blank line after declarations
  #780: FILE: net/core/pktgen.c:780:
  +               char c;
  +               if (get_user(c, &amp;user_buffer[i]))

  WARNING: Missing a blank line after declarations
  #806: FILE: net/core/pktgen.c:806:
  +               char c;
  +               if (get_user(c, &amp;user_buffer[i]))

  WARNING: Missing a blank line after declarations
  #823: FILE: net/core/pktgen.c:823:
  +               char c;
  +               if (get_user(c, &amp;user_buffer[i]))

  WARNING: Missing a blank line after declarations
  #1968: FILE: net/core/pktgen.c:1968:
  +               char f[32];
  +               memset(f, 0, 32);

  WARNING: Missing a blank line after declarations
  #2410: FILE: net/core/pktgen.c:2410:
  +       struct pktgen_net *pn = net_generic(dev_net(pkt_dev-&gt;odev), pg_net_id);
  +       if (!x) {

  WARNING: Missing a blank line after declarations
  #2442: FILE: net/core/pktgen.c:2442:
  +               __u16 t;
  +               if (pkt_dev-&gt;flags &amp; F_QUEUE_MAP_RND) {

  WARNING: Missing a blank line after declarations
  #2523: FILE: net/core/pktgen.c:2523:
  +               unsigned int i;
  +               for (i = 0; i &lt; pkt_dev-&gt;nr_labels; i++)

  WARNING: Missing a blank line after declarations
  #2567: FILE: net/core/pktgen.c:2567:
  +                       __u32 t;
  +                       if (pkt_dev-&gt;flags &amp; F_IPSRC_RND)

  WARNING: Missing a blank line after declarations
  #2587: FILE: net/core/pktgen.c:2587:
  +                               __be32 s;
  +                               if (pkt_dev-&gt;flags &amp; F_IPDST_RND) {

  WARNING: Missing a blank line after declarations
  #2634: FILE: net/core/pktgen.c:2634:
  +               __u32 t;
  +               if (pkt_dev-&gt;flags &amp; F_TXSIZE_RND) {

  WARNING: Missing a blank line after declarations
  #2736: FILE: net/core/pktgen.c:2736:
  +               int i;
  +               for (i = 0; i &lt; pkt_dev-&gt;cflows; i++) {

  WARNING: Missing a blank line after declarations
  #2738: FILE: net/core/pktgen.c:2738:
  +                       struct xfrm_state *x = pkt_dev-&gt;flows[i].x;
  +                       if (x) {

  WARNING: Missing a blank line after declarations
  #2752: FILE: net/core/pktgen.c:2752:
  +               int nhead = 0;
  +               if (x) {

  WARNING: Missing a blank line after declarations
  #2795: FILE: net/core/pktgen.c:2795:
  +       unsigned int i;
  +       for (i = 0; i &lt; pkt_dev-&gt;nr_labels; i++)

  WARNING: Missing a blank line after declarations
  #3480: FILE: net/core/pktgen.c:3480:
  +       ktime_t idle_start = ktime_get();
  +       schedule();

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: Block comments)</title>
<updated>2025-04-14T21:51:31+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-10T07:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=870b856cb478bc02fffe4d89897e62c692efb09a'/>
<id>urn:sha1:870b856cb478bc02fffe4d89897e62c692efb09a</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: Block comments use a trailing */ on a separate line
  +                                * removal by worker thread */

  WARNING: Block comments use * on subsequent lines
  +       __u8 tos;            /* six MSB of (former) IPv4 TOS
  +                               are for dscp codepoint */

  WARNING: Block comments use a trailing */ on a separate line
  +                               are for dscp codepoint */

  WARNING: Block comments use * on subsequent lines
  +       __u8 traffic_class;  /* ditto for the (former) Traffic Class in IPv6
  +                               (see RFC 3260, sec. 4) */

  WARNING: Block comments use a trailing */ on a separate line
  +                               (see RFC 3260, sec. 4) */

  WARNING: Block comments use * on subsequent lines
  +       /* = {
  +          0x00, 0x80, 0xC8, 0x79, 0xB3, 0xCB,

  WARNING: Block comments use * on subsequent lines
  +       /* Field for thread to receive "posted" events terminate,
  +          stop ifs etc. */

  WARNING: Block comments use a trailing */ on a separate line
  +          stop ifs etc. */

  WARNING: Block comments should align the * on each line
  + * we go look for it ...
  +*/

  WARNING: Block comments use a trailing */ on a separate line
  +        * we resolve the dst issue */

  WARNING: Block comments use a trailing */ on a separate line
  +        * with proc_create_data() */

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: pktgen: fix code style (WARNING: suspect code indent for conditional statements)</title>
<updated>2025-04-14T21:51:31+00:00</updated>
<author>
<name>Peter Seiderer</name>
<email>ps.report@gmx.net</email>
</author>
<published>2025-04-10T07:17:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d8f07bf4aab018692b6288d6a93fe17383a2f47'/>
<id>urn:sha1:1d8f07bf4aab018692b6288d6a93fe17383a2f47</id>
<content type='text'>
Fix checkpatch code style warnings:

  WARNING: suspect code indent for conditional statements (8, 17)
  #2901: FILE: net/core/pktgen.c:2901:
  +       } else {
  +                skb = __netdev_alloc_skb(dev, size, GFP_NOWAIT);

Signed-off-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
