From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Howard Wang <howard_wang@realsil.com.cn>
Subject: |WARNING| pw148349 [PATCH v7 11/17] net/r8169: implement Rx path
Date: Tue, 12 Nov 2024 11:02:53 +0100 (CET) [thread overview]
Message-ID: <20241112100253.EAB0F123151@dpdk.org> (raw)
In-Reply-To: <20241112095804.42091-12-howard_wang@realsil.com.cn>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/148349
_coding style issues_
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'n' - possible side-effects?
#141: FILE: drivers/net/r8169/r8169_compat.h:575:
+#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n)) - 1))
CHECK:CAMELCASE: Avoid CamelCase: <_DescStatusBit>
#387: FILE: drivers/net/r8169/r8169_rxtx.c:58:
+enum _DescStatusBit {
CHECK:CAMELCASE: Avoid CamelCase: <DescOwn>
#388: FILE: drivers/net/r8169/r8169_rxtx.c:59:
+ DescOwn = (1 << 31), /* Descriptor is owned by NIC. */
CHECK:CAMELCASE: Avoid CamelCase: <RingEnd>
#389: FILE: drivers/net/r8169/r8169_rxtx.c:60:
+ RingEnd = (1 << 30), /* End of descriptor ring */
CHECK:CAMELCASE: Avoid CamelCase: <FirstFrag>
#390: FILE: drivers/net/r8169/r8169_rxtx.c:61:
+ FirstFrag = (1 << 29), /* First segment of a packet */
CHECK:CAMELCASE: Avoid CamelCase: <LastFrag>
#391: FILE: drivers/net/r8169/r8169_rxtx.c:62:
+ LastFrag = (1 << 28), /* Final segment of a packet */
CHECK:CAMELCASE: Avoid CamelCase: <DescOwn_V3>
#393: FILE: drivers/net/r8169/r8169_rxtx.c:64:
+ DescOwn_V3 = DescOwn, /* Descriptor is owned by NIC. */
CHECK:CAMELCASE: Avoid CamelCase: <RingEnd_V3>
#394: FILE: drivers/net/r8169/r8169_rxtx.c:65:
+ RingEnd_V3 = RingEnd, /* End of descriptor ring */
CHECK:CAMELCASE: Avoid CamelCase: <FirstFrag_V3>
#395: FILE: drivers/net/r8169/r8169_rxtx.c:66:
+ FirstFrag_V3 = (1 << 25), /* First segment of a packet */
CHECK:CAMELCASE: Avoid CamelCase: <LastFrag_V3>
#396: FILE: drivers/net/r8169/r8169_rxtx.c:67:
+ LastFrag_V3 = (1 << 24), /* Final segment of a packet */
CHECK:CAMELCASE: Avoid CamelCase: <LargeSend>
#400: FILE: drivers/net/r8169/r8169_rxtx.c:71:
+ LargeSend = (1 << 27), /* TCP Large Send Offload (TSO) */
CHECK:CAMELCASE: Avoid CamelCase: <GiantSendv4>
#401: FILE: drivers/net/r8169/r8169_rxtx.c:72:
+ GiantSendv4 = (1 << 26), /* TCP Giant Send Offload V4 (GSOv4) */
CHECK:CAMELCASE: Avoid CamelCase: <GiantSendv6>
#402: FILE: drivers/net/r8169/r8169_rxtx.c:73:
+ GiantSendv6 = (1 << 25), /* TCP Giant Send Offload V6 (GSOv6) */
CHECK:CAMELCASE: Avoid CamelCase: <LargeSend_DP>
#403: FILE: drivers/net/r8169/r8169_rxtx.c:74:
+ LargeSend_DP = (1 << 16), /* TCP Large Send Offload (TSO) */
CHECK:CAMELCASE: Avoid CamelCase: <MSSShift>
#404: FILE: drivers/net/r8169/r8169_rxtx.c:75:
+ MSSShift = 16, /* MSS value position */
CHECK:CAMELCASE: Avoid CamelCase: <MSSMask>
#405: FILE: drivers/net/r8169/r8169_rxtx.c:76:
+ MSSMask = 0x7FFU, /* MSS value 11 bits */
CHECK:CAMELCASE: Avoid CamelCase: <TxIPCS>
#406: FILE: drivers/net/r8169/r8169_rxtx.c:77:
+ TxIPCS = (1 << 18), /* Calculate IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxUDPCS>
#407: FILE: drivers/net/r8169/r8169_rxtx.c:78:
+ TxUDPCS = (1 << 17), /* Calculate UDP/IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxTCPCS>
#408: FILE: drivers/net/r8169/r8169_rxtx.c:79:
+ TxTCPCS = (1 << 16), /* Calculate TCP/IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxVlanTag>
#409: FILE: drivers/net/r8169/r8169_rxtx.c:80:
+ TxVlanTag = (1 << 17), /* Add VLAN tag */
CHECK:CAMELCASE: Avoid CamelCase: <TxUDPCS_C>
#412: FILE: drivers/net/r8169/r8169_rxtx.c:83:
+ TxUDPCS_C = (1 << 31), /* Calculate UDP/IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxTCPCS_C>
#413: FILE: drivers/net/r8169/r8169_rxtx.c:84:
+ TxTCPCS_C = (1 << 30), /* Calculate TCP/IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxIPCS_C>
#414: FILE: drivers/net/r8169/r8169_rxtx.c:85:
+ TxIPCS_C = (1 << 29), /* Calculate IP checksum */
CHECK:CAMELCASE: Avoid CamelCase: <TxIPV6F_C>
#415: FILE: drivers/net/r8169/r8169_rxtx.c:86:
+ TxIPV6F_C = (1 << 28), /* Indicate it is an IPv6 packet */
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoUDP>
#423: FILE: drivers/net/r8169/r8169_rxtx.c:94:
+#define RxProtoUDP PID1
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoTCP>
#424: FILE: drivers/net/r8169/r8169_rxtx.c:95:
+#define RxProtoTCP PID0
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoIP>
#425: FILE: drivers/net/r8169/r8169_rxtx.c:96:
+#define RxProtoIP (PID1 | PID0)
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoMask>
#426: FILE: drivers/net/r8169/r8169_rxtx.c:97:
+#define RxProtoMask RxProtoIP
CHECK:CAMELCASE: Avoid CamelCase: <RxIPF>
#428: FILE: drivers/net/r8169/r8169_rxtx.c:99:
+ RxIPF = (1 << 16), /* IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxUDPF>
#429: FILE: drivers/net/r8169/r8169_rxtx.c:100:
+ RxUDPF = (1 << 15), /* UDP/IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxTCPF>
#430: FILE: drivers/net/r8169/r8169_rxtx.c:101:
+ RxTCPF = (1 << 14), /* TCP/IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxVlanTag>
#431: FILE: drivers/net/r8169/r8169_rxtx.c:102:
+ RxVlanTag = (1 << 16), /* VLAN tag available */
CHECK:CAMELCASE: Avoid CamelCase: <RxUDPT>
#434: FILE: drivers/net/r8169/r8169_rxtx.c:105:
+ RxUDPT = (1 << 18),
CHECK:CAMELCASE: Avoid CamelCase: <RxTCPT>
#435: FILE: drivers/net/r8169/r8169_rxtx.c:106:
+ RxTCPT = (1 << 17),
CHECK:CAMELCASE: Avoid CamelCase: <RxV6F>
#439: FILE: drivers/net/r8169/r8169_rxtx.c:110:
+ RxV6F = (1 << 31),
CHECK:CAMELCASE: Avoid CamelCase: <RxV4F>
#440: FILE: drivers/net/r8169/r8169_rxtx.c:111:
+ RxV4F = (1 << 30),
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoUDP_v3>
#446: FILE: drivers/net/r8169/r8169_rxtx.c:117:
+#define RxProtoUDP_v3 PID1_v3
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoTCP_v3>
#447: FILE: drivers/net/r8169/r8169_rxtx.c:118:
+#define RxProtoTCP_v3 PID0_v3
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoIP_v3>
#448: FILE: drivers/net/r8169/r8169_rxtx.c:119:
+#define RxProtoIP_v3 (PID1_v3 | PID0_v3)
CHECK:CAMELCASE: Avoid CamelCase: <RxProtoMask_v3>
#449: FILE: drivers/net/r8169/r8169_rxtx.c:120:
+#define RxProtoMask_v3 RxProtoIP_v3
CHECK:CAMELCASE: Avoid CamelCase: <RxIPF_v3>
#451: FILE: drivers/net/r8169/r8169_rxtx.c:122:
+ RxIPF_v3 = (1 << 26), /* IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxUDPF_v3>
#452: FILE: drivers/net/r8169/r8169_rxtx.c:123:
+ RxUDPF_v3 = (1 << 25), /* UDP/IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxTCPF_v3>
#453: FILE: drivers/net/r8169/r8169_rxtx.c:124:
+ RxTCPF_v3 = (1 << 24), /* TCP/IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxSCTPF_v3>
#454: FILE: drivers/net/r8169/r8169_rxtx.c:125:
+ RxSCTPF_v3 = (1 << 23), /* TCP/IP checksum failed */
CHECK:CAMELCASE: Avoid CamelCase: <RxVlanTag_v3>
#455: FILE: drivers/net/r8169/r8169_rxtx.c:126:
+ RxVlanTag_v3 = (RxVlanTag), /* VLAN tag available */
CHECK:CAMELCASE: Avoid CamelCase: <RxUDPT_v3>
#458: FILE: drivers/net/r8169/r8169_rxtx.c:129:
+ RxUDPT_v3 = (1 << 29),
CHECK:CAMELCASE: Avoid CamelCase: <RxTCPT_v3>
#459: FILE: drivers/net/r8169/r8169_rxtx.c:130:
+ RxTCPT_v3 = (1 << 28),
CHECK:CAMELCASE: Avoid CamelCase: <RxSCTP_v3>
#460: FILE: drivers/net/r8169/r8169_rxtx.c:131:
+ RxSCTP_v3 = (1 << 27),
CHECK:CAMELCASE: Avoid CamelCase: <RxV6F_v3>
#464: FILE: drivers/net/r8169/r8169_rxtx.c:135:
+ RxV6F_v3 = RxV6F,
CHECK:CAMELCASE: Avoid CamelCase: <RxV4F_v3>
#465: FILE: drivers/net/r8169/r8169_rxtx.c:136:
+ RxV4F_v3 = RxV4F,
CHECK:CAMELCASE: Avoid CamelCase: <RxConfig>
#675: FILE: drivers/net/r8169/r8169_rxtx.c:342:
+ rx_config = RTL_R32(hw, RxConfig);
CHECK:CAMELCASE: Avoid CamelCase: <EnableInnerVlan>
#677: FILE: drivers/net/r8169/r8169_rxtx.c:344:
+ rx_config |= (EnableInnerVlan | EnableOuterVlan);
CHECK:CAMELCASE: Avoid CamelCase: <EnableOuterVlan>
#677: FILE: drivers/net/r8169/r8169_rxtx.c:344:
+ rx_config |= (EnableInnerVlan | EnableOuterVlan);
CHECK:CAMELCASE: Avoid CamelCase: <CPlusCmd>
#683: FILE: drivers/net/r8169/r8169_rxtx.c:350:
+ cp_cmd = RTL_R16(hw, CPlusCmd);
CHECK:CAMELCASE: Avoid CamelCase: <RxChkSum>
#686: FILE: drivers/net/r8169/r8169_rxtx.c:353:
+ cp_cmd |= RxChkSum;
CHECK:CAMELCASE: Avoid CamelCase: <AcceptBroadcast>
#702: FILE: drivers/net/r8169/r8169_rxtx.c:369:
+ rx_mode = AcceptBroadcast | AcceptMyPhys;
CHECK:CAMELCASE: Avoid CamelCase: <AcceptMyPhys>
#702: FILE: drivers/net/r8169/r8169_rxtx.c:369:
+ rx_mode = AcceptBroadcast | AcceptMyPhys;
CHECK:CAMELCASE: Avoid CamelCase: <RxDescAddrLow>
#722: FILE: drivers/net/r8169/r8169_rxtx.c:389:
+ RTL_W32(hw, RxDescAddrLow, ((u64)rxq->hw_ring_phys_addr & DMA_BIT_MASK(32)));
CHECK:CAMELCASE: Avoid CamelCase: <RxDescAddrHigh>
#723: FILE: drivers/net/r8169/r8169_rxtx.c:390:
+ RTL_W32(hw, RxDescAddrHigh, ((u64)rxq->hw_ring_phys_addr >> 32));
CHECK:CAMELCASE: Avoid CamelCase: <RxMaxSize>
#738: FILE: drivers/net/r8169/r8169_rxtx.c:405:
+ RTL_W16(hw, RxMaxSize, max_rx_pkt_size);
CHECK:CAMELCASE: Avoid CamelCase: <ChipCmd>
#758: FILE: drivers/net/r8169/r8169_rxtx.c:425:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) | CmdRxEnb);
CHECK:CAMELCASE: Avoid CamelCase: <CmdRxEnb>
#758: FILE: drivers/net/r8169/r8169_rxtx.c:425:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) | CmdRxEnb);
CHECK:CAMELCASE: Avoid CamelCase: <RxRES>
#836: FILE: drivers/net/r8169/r8169_rxtx.c:503:
+ if (unlikely(opts1 & RxRES)) {
CHECK:CAMELCASE: Avoid CamelCase: <RxOK>
#917: FILE: drivers/net/r8169/r8169_rxtx.c:584:
+ RTL_W32(hw, ISR0_8125, (RxOK | RxErr | RxDescUnavail));
CHECK:CAMELCASE: Avoid CamelCase: <RxErr>
#917: FILE: drivers/net/r8169/r8169_rxtx.c:584:
+ RTL_W32(hw, ISR0_8125, (RxOK | RxErr | RxDescUnavail));
CHECK:CAMELCASE: Avoid CamelCase: <RxDescUnavail>
#917: FILE: drivers/net/r8169/r8169_rxtx.c:584:
+ RTL_W32(hw, ISR0_8125, (RxOK | RxErr | RxDescUnavail));
total: 0 errors, 0 warnings, 66 checks, 1040 lines checked
parent reply other threads:[~2024-11-12 10:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20241112095804.42091-12-howard_wang@realsil.com.cn>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241112100253.EAB0F123151@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=howard_wang@realsil.com.cn \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).