From: Stephen Hemminger <stephen@networkplumber.org>
To: "Dey, Souvik" <sodey@rbbn.com>
Cc: rmody@marvell.com, shshaikh@marvell.com, jerinj@marvell.com,
ferruh.yigit@intel.com, thomas@monjalon.net, dev@dpdk.org,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/bnx2x: add multicast MAC address filtering
Date: Sun, 5 Apr 2020 14:54:29 -0700 [thread overview]
Message-ID: <20200405145429.0fa51dea@hermes.lan> (raw)
In-Reply-To: <20200228200451.2128-1-sodey@rbbn.com>
On Fri, 28 Feb 2020 15:04:51 -0500
"Dey, Souvik" <sodey@rbbn.com> wrote:
> + /* Configure the previously stored Multicast address list */
> + if (IS_VF(sc)) {
> + bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);
> + }
Did you run checkpatch on this, the indentation does not match DPDK style.
### [PATCH] net/bnx2x: add multicast MAC address filtering
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#31: FILE: drivers/net/bnx2x/bnx2x.h:1381:
+ uint16_t mc_addrs_num; /* Multicast mac addresses number */$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#44: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:243:
+ if (IS_VF(sc)) {
+ bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);
WARNING:BRACES: braces {} are not necessary for single statement blocks
#44: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:243:
+ if (IS_VF(sc)) {
+ bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);
+ }
ERROR:CODE_INDENT: code indent should use tabs where possible
#45: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:244:
+ bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#45: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:244:
+ bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#46: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:245:
+ }$
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#56: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:275:
+ * Number is set to 0 denoting DEL_CMD */
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#57: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:276:
+ if (IS_VF(sc)) {
+ bnx2x_vfpf_set_mcast(sc, NULL, 0);
WARNING:BRACES: braces {} are not necessary for single statement blocks
#57: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:276:
+ if (IS_VF(sc)) {
+ bnx2x_vfpf_set_mcast(sc, NULL, 0);
+ }
ERROR:CODE_INDENT: code indent should use tabs where possible
#58: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:277:
+ bnx2x_vfpf_set_mcast(sc, NULL, 0);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#58: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:277:
+ bnx2x_vfpf_set_mcast(sc, NULL, 0);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#59: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:278:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#72: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:366:
+ struct bnx2x_softc *sc = dev->data->dev_private;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#73: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:367:
+ int err;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#74: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:368:
+ PMD_INIT_FUNC_TRACE(sc);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#76: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:370:
+ err = bnx2x_vfpf_set_mcast(sc, NULL, 0);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#77: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:371:
+ if (err)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#78: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:372:
+ return err;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#78: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:372:
+ return err;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#79: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:373:
+ sc->mc_addrs_num = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#82: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:376:
+ err = bnx2x_vfpf_set_mcast(sc, mc_addrs, mc_addrs_num );$
ERROR:SPACING: space prohibited before that close parenthesis ')'
#82: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:376:
+ err = bnx2x_vfpf_set_mcast(sc, mc_addrs, mc_addrs_num );
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#83: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:377:
+ if (err)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#84: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:378:
+ return err;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#84: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:378:
+ return err;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#86: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:380:
+ sc->mc_addrs_num = mc_addrs_num;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#87: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:381:
+ memcpy(sc->mc_addrs, mc_addrs, mc_addrs_num * sizeof(*mc_addrs));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#89: FILE: drivers/net/bnx2x/bnx2x_ethdev.c:383:
+ return 0;$
WARNING:LONG_LINE: line over 80 characters
#114: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:709:
+ struct rte_ether_addr *mc_addrs, uint32_t mc_addrs_num)
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#116: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:711:
+ struct vf_set_q_filters_tlv *query;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#117: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:712:
+ struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#118: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:713:
+ int rc = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#119: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:714:
+ uint32_t i = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#120: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:715:
+ query = &sc->vf2pf_mbox->query[0].set_q_filters;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#121: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:716:
+ bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_SET_Q_FILTERS,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#122: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:717:
+ sizeof(*query));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#122: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:717:
+ sizeof(*query));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#124: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:719:
+ if (mc_addrs_num > VF_MAX_MULTICAST_PER_VF) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#125: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:720:
+ PMD_DRV_LOG(ERR, sc,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#125: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:720:
+ PMD_DRV_LOG(ERR, sc,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#129: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:724:
+ rc = -EINVAL;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#129: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:724:
+ rc = -EINVAL;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#130: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:725:
+ goto out;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#130: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:725:
+ goto out;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#131: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:726:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#133: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:728:
+ for (i = 0; i < mc_addrs_num; i++) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#134: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:729:
+ PMD_DRV_LOG(DEBUG, sc, "Adding mcast MAC:%x:%x:%x:%x:%x:%x",$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#134: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:729:
+ PMD_DRV_LOG(DEBUG, sc, "Adding mcast MAC:%x:%x:%x:%x:%x:%x",$
ERROR:CODE_INDENT: code indent should use tabs where possible
#135: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:730:
+ mc_addrs[i].addr_bytes[0],$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#135: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:730:
+ mc_addrs[i].addr_bytes[0],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#136: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:731:
+ mc_addrs[i].addr_bytes[1],$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#136: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:731:
+ mc_addrs[i].addr_bytes[1],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#137: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:732:
+ mc_addrs[i].addr_bytes[2],$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#137: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:732:
+ mc_addrs[i].addr_bytes[2],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#138: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:733:
+ mc_addrs[i].addr_bytes[3],$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#138: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:733:
+ mc_addrs[i].addr_bytes[3],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#139: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:734:
+ mc_addrs[i].addr_bytes[4],$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#139: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:734:
+ mc_addrs[i].addr_bytes[4],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#140: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:735:
+ mc_addrs[i].addr_bytes[5]);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#140: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:735:
+ mc_addrs[i].addr_bytes[5]);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#141: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:736:
+ memcpy(query->multicast[i], mc_addrs[i].addr_bytes, ETH_ALEN);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#141: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:736:
+ memcpy(query->multicast[i], mc_addrs[i].addr_bytes, ETH_ALEN);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#142: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:737:
+ i++;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#142: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:737:
+ i++;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#143: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:738:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#145: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:740:
+ query->vf_qid = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#146: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:741:
+ query->flags = BNX2X_VF_MULTICAST_CHANGED;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#147: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:742:
+ query->multicast_cnt = i;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#150: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:745:
+ bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#151: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:746:
+ BNX2X_VF_TLV_LIST_END,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#151: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:746:
+ BNX2X_VF_TLV_LIST_END,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#152: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:747:
+ sizeof(struct channel_list_end_tlv));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#152: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:747:
+ sizeof(struct channel_list_end_tlv));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#154: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:749:
+ rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#155: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:750:
+ if (rc)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#156: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:751:
+ goto out;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#156: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:751:
+ goto out;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#158: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:753:
+ if (reply->status != BNX2X_VF_STATUS_SUCCESS) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#159: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:754:
+ PMD_DRV_LOG(ERR, sc, "Set Rx mode/multicast failed: %d",$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#159: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:754:
+ PMD_DRV_LOG(ERR, sc, "Set Rx mode/multicast failed: %d",$
ERROR:CODE_INDENT: code indent should use tabs where possible
#160: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:755:
+ reply->status);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#160: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:755:
+ reply->status);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#161: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:756:
+ rc = -EINVAL;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#161: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:756:
+ rc = -EINVAL;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#162: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:757:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#165: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:760:
+ bnx2x_vf_finalize(sc, &query->first_tlv);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#167: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:762:
+ return rc;$
CHECK:BRACES: Blank lines aren't necessary before a close brace '}'
#169: FILE: drivers/net/bnx2x/bnx2x_vfpf.c:764:
+
+}
total: 24 errors, 63 warnings, 1 checks, 139 lines checked
0/1 valid patch
next prev parent reply other threads:[~2020-04-05 21:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 20:04 Dey, Souvik
2020-03-03 23:28 ` [dpdk-dev] [EXT] " Rasesh Mody
2020-04-05 13:09 ` Jerin Jacob
2020-04-06 16:21 ` Dey, Souvik
2020-04-05 21:54 ` Stephen Hemminger [this message]
2020-04-13 23:09 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
2020-04-14 13:23 ` Jerin Jacob
2020-03-03 4:18 [dpdk-dev] [PATCH] " sodey
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=20200405145429.0fa51dea@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=rmody@marvell.com \
--cc=shshaikh@marvell.com \
--cc=sodey@rbbn.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).