diff options
| author | Wei Fang <wei.fang@nxp.com> | 2026-02-05 16:57:37 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-02-10 10:58:20 +0100 |
| commit | 8492e4f1959c02c4ab7062699350c392cdfa543f (patch) | |
| tree | 33133cf5bd3b70b4d8798d08917e6a12748b0f95 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 2dcc93475559168a7d3ccffcc35d79f19416782b (diff) | |
net: fec: use switch statement to check the type of tx_buf
The tx_buf has three types: FEC_TXBUF_T_SKB, FEC_TXBUF_T_XDP_NDO and
FEC_TXBUF_T_XDP_TX. Currently, the driver uses 'if...else...' statements
to check the type and perform the corresponding processing. This is very
detrimental to future expansion. To support AF_XDP zero-copy mode, two
new types will be added in the future, continuing to use 'if...else...'
would be a very bad coding style. So the 'if...else...' statements in
the current driver are replaced with switch statements.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260205085742.2685134-11-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
