DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Xiao W" <xiao.w.wang@intel.com>
To: Xiaojun Liu <xiaojun.liu@silicom.co.il>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Kwan, Ngai-mint" <ngai-mint.kwan@intel.com>,
	"Keller, Jacob E" <jacob.e.keller@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1 3/5] net/fm10k: add ffu and statistics and config file functions
Date: Mon, 16 Mar 2020 07:04:30 +0000	[thread overview]
Message-ID: <BN6PR11MB1473130FEEA6AB02795EDBF9B8F90@BN6PR11MB1473.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1582879102-17977-4-git-send-email-xiaojun.liu@silicom.co.il>

Hi,

Comments inline.

Best Regards,
Xiao

> -----Original Message-----
> From: Xiaojun Liu <xiaojun.liu@silicom.co.il>
> Sent: Friday, February 28, 2020 4:38 PM
> To: Wang, Xiao W <xiao.w.wang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Kwan, Ngai-mint <ngai-mint.kwan@intel.com>; Keller,
> Jacob E <jacob.e.keller@intel.com>
> Cc: dev@dpdk.org; Xiaojun Liu <xiaojun.liu@silicom.co.il>
> Subject: [PATCH v1 3/5] net/fm10k: add ffu and statistics and config file
> functions
> 
> Add ffu to support offload flow into HW.
> It supports forward, mirror, push VLAN, pop VLAN.
> It also supports flowset for a group flow definition.
> The config file can configure debug log, port speed,
> epl port mapping dpdk port, flowset. All these configuration
> will be used by switch management.
> Statistics includes epl port, ffu rule, dpdk port, and error.
> All these statistics data are read from HW.
> Modify switch header file to support getting logical port
> and glort and device info.
> 

If new features are added, please doc them in doc/guides/nics/features/fm10k.ini

> To enable the switch management, you need add
> CONFIG_RTE_FM10K_MANAGEMENT=y in
> config/common_linux when building.

[...]

> +
> +	/* GLORT_DEST_TABLE
> +	 * Field Name		Bit(s)	Type	Default
> +	 * DestMask			47:0	RW		0x0
> +	 * IP_MulticastIndex59:48	RW		0x0
> +	 * Reserved			63:60	RSV		0x0
> +	 */

Please fix the alignment issue around here.

> +	temp64 = sw->mcast_dest_table_idx;
> +	temp64 = temp64 << 48 | 1 << lport1 | 1 << lport2;
> +	fm10k_write_switch_reg64(sw,
> +			FM10K_SW_GLORT_DEST_TABLE
> +			(sw->glort_dest_table_idx), temp64);
> +	sw->glort_dest_table_idx++;
> +
> +	/* MCAST_DEST_TABLE
> +	 * Field Name		Bit(s)	Type	Default
> +	 * PortMask			47:0	RW		0x0
> +	 * LenTableIdx		61:48	RW		0x0
> +	 * Reserved			63:62	RSV		00b
> +	 */
> +	temp64 = sw->mcast_len_table_idx;
> +	temp64 = 1 << lport1 | 1 << lport2 | temp64 << 48;
> +	fm10k_write_switch_reg64(sw,
> +			FM10K_SW_SCHED_MCAST_DEST_TABLE
> +			(sw->mcast_dest_table_idx++), temp64);
> +
> +	/* MCAST_LEN_TABLE
> +	 * Field Name		Bit(s)	Type	Default
> +	 * L3_McastIdx		14:0	RW		0x0
> +	 * L3_Repcnt		26:15	RW		0x0
> +	 * Reserved			31:27	RSV		0x0
> +	 */
> +	temp64 =
> +		sw->mcast_vlan_table_idx | 1 << 15;
> +	fm10k_write_switch_reg64(sw,
> +			FM10K_SW_SCHED_MCAST_LEN_TABLE
> +			(sw->mcast_len_table_idx++), temp64);
> +
> +	/* MCAST_VLAN_TABLE
> +	 * Field Name		Bit(s)	Type	Default
> +	 * VID				11:0	RW		0x0
> +	 * DGLORT			27:12	RW		0x0
> +	 * ReplaceVID		28		RW		0b
> +	 * ReplaceDGLORT	29		RW		0b
> +	 * Reserved			31:30	RSV		00b
> +	 */
> +	temp64 = vlan1 |
> +			fm10k_switch_pf_glort_get
> +			(lport1) << 12 | 1 << 28 | 1 << 29;
> +	fm10k_write_switch_reg64(sw,
> +			FM10K_SW_MOD_MCAST_VLAN_TABLE
> +			(sw->mcast_vlan_table_idx++), temp64);
> +	temp64 = vlan2 |
> +			fm10k_switch_pf_glort_get
> +			(lport2) << 12 | 1 << 28 | 1 << 29;
> +	fm10k_write_switch_reg64(sw,
> +			FM10K_SW_MOD_MCAST_VLAN_TABLE
> +			(sw->mcast_vlan_table_idx++), temp64);
> +
> +	return dglort;

[...]

> +	for (i = 0;
> +			i < sizeof(rx_port_cnt_map_table) /
> +				sizeof(rx_port_cnt_map_table[0]);
> +			i++) {

The style looks strange. No need to switch to a new line as " for (i = 0;" is so short.
[...]

  reply	other threads:[~2020-03-16  7:04 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11  9:51 [dpdk-dev] [PATCH v2 0/7] support switch management Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 1/7] net/fm10k: add i2c sbus registers definition Xiaojun Liu
2019-12-11 15:48   ` Jerin Jacob
2019-12-12  9:35     ` Xiaojun Liu
2019-12-12 17:12       ` Jerin Jacob
2019-12-13  2:44         ` Xiaojun Liu
2019-12-16  4:54           ` Jerin Jacob
2020-02-20 13:59   ` [dpdk-dev] [PATCH v2 0/5] support switch management Xiaojun Liu
2020-02-20 13:59     ` [dpdk-dev] [PATCH v2 1/5] net/fm10k: add basic functions for " Xiaojun Liu
2020-02-28  8:38       ` [dpdk-dev] [PATCH v1 0/5] support fm10k " Xiaojun Liu
2020-02-28  8:38         ` [dpdk-dev] [PATCH v1 1/5] net/fm10k: add basic functions for " Xiaojun Liu
2020-03-16  6:37           ` Wang, Xiao W
2020-02-28  8:38         ` [dpdk-dev] [PATCH v1 2/5] net/fm10k: add epl serdes and port control functions Xiaojun Liu
2020-03-16  6:48           ` Wang, Xiao W
2020-02-28  8:38         ` [dpdk-dev] [PATCH v1 3/5] net/fm10k: add ffu and statistics and config file functions Xiaojun Liu
2020-03-16  7:04           ` Wang, Xiao W [this message]
2020-02-28  8:38         ` [dpdk-dev] [PATCH v1 4/5] net/fm10k: add flow interface and switch management Xiaojun Liu
2020-02-28  8:38         ` [dpdk-dev] [PATCH v1 5/5] net/fm10k: add switch management support Xiaojun Liu
2020-03-16  7:34           ` Wang, Xiao W
2020-03-20  6:58           ` [dpdk-dev] [PATCH v3 0/5] support fm10k switch management Xiaojun Liu
2020-03-20  6:58             ` [dpdk-dev] [PATCH v3 1/5] net/fm10k: add basic functions for " Xiaojun Liu
2020-04-02  8:41               ` Wang, Xiao W
2020-04-08  3:25                 ` Xiaojun Liu
2020-03-20  6:58             ` [dpdk-dev] [PATCH v3 2/5] net/fm10k: add epl serdes and port control functions Xiaojun Liu
2020-03-20  6:58             ` [dpdk-dev] [PATCH v3 3/5] net/fm10k: add ffu and statistics and config file functions Xiaojun Liu
2020-03-20  6:58             ` [dpdk-dev] [PATCH v3 4/5] net/fm10k: add flow interface and switch management Xiaojun Liu
2020-04-02  8:55               ` Wang, Xiao W
2020-04-09  6:24                 ` Xiaojun Liu
2020-03-20  6:58             ` [dpdk-dev] [PATCH v3 5/5] net/fm10k: add switch management support Xiaojun Liu
2020-04-02  9:12               ` Wang, Xiao W
2020-04-09  6:32                 ` Xiaojun Liu
2020-02-20 13:59     ` [dpdk-dev] [PATCH v2 2/5] net/fm10k: add epl serdes and port control functions Xiaojun Liu
2020-02-20 13:59     ` [dpdk-dev] [PATCH v2 3/5] net/fm10k: add ffu and statistics and config file functions Xiaojun Liu
2020-02-20 13:59     ` [dpdk-dev] [PATCH v2 4/5] net/fm10k: add flow interface and switch management Xiaojun Liu
2020-02-20 13:59     ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: add switch management support Xiaojun Liu
2020-02-25 11:28       ` Wang, Xiao W
2020-02-25 12:56         ` Xiaojun Liu
2020-03-05  1:23         ` Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 2/7] net/fm10k: add some modules of port Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 3/7] net/fm10k: add config ffu statistics support Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 4/7] net/fm10k: add flow and switch management Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 5/7] net/fm10k: add switch initialization Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 6/7] net/fm10k: add mirror and filter ctrl Xiaojun Liu
2019-12-11  9:52 ` [dpdk-dev] [PATCH v2 7/7] net/fm10k: add dpdk port mapping Xiaojun Liu
2020-01-21  2:53 ` [dpdk-dev] [PATCH v2 0/7] support switch management Wang, Xiao W
2020-01-21  6:15   ` Xiaojun Liu
2020-02-11 10:31     ` Wang, Xiao W
2020-02-14  2:46       ` Xiaojun Liu
     [not found]       ` <ORIGINAL-RELEASE-1581835643311863404-DB7PR04MB5196A5418792DFB1F96DB8B7BD150@DB7PR04MB5196.eurprd04.prod.outlook.com>
2020-02-19  5:58         ` Xiaojun Liu
2020-02-19 10:56           ` Wang, Xiao W

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=BN6PR11MB1473130FEEA6AB02795EDBF9B8F90@BN6PR11MB1473.namprd11.prod.outlook.com \
    --to=xiao.w.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jacob.e.keller@intel.com \
    --cc=ngai-mint.kwan@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=xiaojun.liu@silicom.co.il \
    /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).