[dpdk-dev] [PATCH v9 3/5] igb: add ops to support ethtool ops

Stephen Hemminger stephen at networkplumber.org
Sat Jun 27 03:35:54 CEST 2015


On Fri, 26 Jun 2015 21:19:06 -0400
Liang-Min Larry Wang <liang-min.wang at intel.com> wrote:

> +static struct reg_info igb_regs_general[] = {
> +	{E1000_CTRL, 1, 1, "E1000_CTRL"},
> +	{E1000_STATUS, 1, 1, "E1000_STATUS"},
> +	{E1000_CTRL_EXT, 1, 1, "E1000_CTRL_EXT"},
> +	{E1000_MDIC, 1, 1, "E1000_MDIC"},
> +	{E1000_SCTL, 1, 1, "E1000_SCTL"},
> +	{E1000_CONNSW, 1, 1, "E1000_CONNSW"},
> +	{E1000_VET, 1, 1, "E1000_VET"},
> +	{E1000_LEDCTL, 1, 1, "E1000_LEDCTL"},
> +	{E1000_PBA, 1, 1, "E1000_PBA"},
> +	{E1000_PBS, 1, 1, "E1000_PBS"},
> +	{E1000_FRTIMER, 1, 1, "E1000_FRTIMER"},
> +	{E1000_TCPTIMER, 1, 1, "E1000_TCPTIMER"},
> +	{0, 0, 0, ""}
> +};
> +

All pre-set reg_info should be const.

And this as well:

> +static struct reg_info *igb_regs[] = {
> +				igb_regs_general,
> +				igb_regs_nvm,
> +				igb_regs_interrupt,
> +				igb_regs_fctl,
> +				igb_regs_rxdma,
> +				igb_regs_rx,
> +				igb_regs_tx,
> +				igb_regs_wakeup,
> +				igb_regs_mac,
> +				NULL};
> +


More information about the dev mailing list