* [PATCH net-next 0/5] cxgb4 updates @ 2010-07-11 22:01 Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 1/5] cxgb4: move the choice of interrupt type before net_device registration Dimitris Michailidis 2010-07-12 0:08 ` [PATCH net-next 0/5] cxgb4 updates David Miller 0 siblings, 2 replies; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev Following is a series of 5 cxgb4 patches, all for net-next. Mainly they implement the get_rxnfc, get_rxfh_indir, and set_rxfh_indir ethtool ops, plus a couple of fixes. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 1/5] cxgb4: move the choice of interrupt type before net_device registration 2010-07-11 22:01 [PATCH net-next 0/5] cxgb4 updates Dimitris Michailidis @ 2010-07-11 22:01 ` Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 2/5] cxgb4: avoid duplicating some resource freeing code Dimitris Michailidis 2010-07-12 0:08 ` [PATCH net-next 0/5] cxgb4 updates David Miller 1 sibling, 1 reply; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev; +Cc: Dimitris Michailidis We need to settle on the kind of interrupts we'll be using, a choice that also impacts the number of queues, before registering and making visible the net_devices. Move the relevant code up a bit. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> --- drivers/net/cxgb4/cxgb4_main.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 2619997..743dc6f 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -3507,6 +3507,12 @@ static int __devinit init_one(struct pci_dev *pdev, adapter->params.offload = 0; } + /* See what interrupts we'll be using */ + if (msi > 1 && enable_msix(adapter) == 0) + adapter->flags |= USING_MSIX; + else if (msi > 0 && pci_enable_msi(pdev) == 0) + adapter->flags |= USING_MSI; + /* * The card is now ready to go. If any errors occur during device * registration we do not fail the whole card but rather proceed only @@ -3542,12 +3548,6 @@ static int __devinit init_one(struct pci_dev *pdev, setup_debugfs(adapter); } - /* See what interrupts we'll be using */ - if (msi > 1 && enable_msix(adapter) == 0) - adapter->flags |= USING_MSIX; - else if (msi > 0 && pci_enable_msi(pdev) == 0) - adapter->flags |= USING_MSI; - if (is_offload(adapter)) attach_ulds(adapter); @@ -3571,6 +3571,7 @@ sriov: free_netdev(adapter->port[i]); if (adapter->flags & FW_OK) t4_fw_bye(adapter, 0); + disable_msi(adapter); out_unmap_bar: iounmap(adapter->regs); out_free_adapter: -- 1.5.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 2/5] cxgb4: avoid duplicating some resource freeing code 2010-07-11 22:01 ` [PATCH net-next 1/5] cxgb4: move the choice of interrupt type before net_device registration Dimitris Michailidis @ 2010-07-11 22:01 ` Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 3/5] cxgb4: add user manipulation of the RSS table Dimitris Michailidis 0 siblings, 1 reply; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev; +Cc: Dimitris Michailidis Currently there are two copies of some resource freeing code, turn it into a function and call it. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> --- drivers/net/cxgb4/cxgb4_main.c | 42 +++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 17 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 743dc6f..653bb54 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -3364,6 +3364,29 @@ static void __devinit print_port_info(struct adapter *adap) } } +/* + * Free the following resources: + * - memory used for tables + * - MSI/MSI-X + * - net devices + * - resources FW is holding for us + */ +static void free_some_resources(struct adapter *adapter) +{ + unsigned int i; + + t4_free_mem(adapter->l2t); + t4_free_mem(adapter->tids.tid_tab); + disable_msi(adapter); + + for_each_port(adapter, i) + if (adapter->port[i]) + free_netdev(adapter->port[i]); + + if (adapter->flags & FW_OK) + t4_fw_bye(adapter, 0); +} + #define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |\ NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA) @@ -3564,14 +3587,7 @@ sriov: return 0; out_free_dev: - t4_free_mem(adapter->tids.tid_tab); - t4_free_mem(adapter->l2t); - for_each_port(adapter, i) - if (adapter->port[i]) - free_netdev(adapter->port[i]); - if (adapter->flags & FW_OK) - t4_fw_bye(adapter, 0); - disable_msi(adapter); + free_some_resources(adapter); out_unmap_bar: iounmap(adapter->regs); out_free_adapter: @@ -3606,16 +3622,8 @@ static void __devexit remove_one(struct pci_dev *pdev) if (adapter->flags & FULL_INIT_DONE) cxgb_down(adapter); - t4_free_mem(adapter->l2t); - t4_free_mem(adapter->tids.tid_tab); - disable_msi(adapter); - - for_each_port(adapter, i) - if (adapter->port[i]) - free_netdev(adapter->port[i]); - if (adapter->flags & FW_OK) - t4_fw_bye(adapter, 0); + free_some_resources(adapter); iounmap(adapter->regs); kfree(adapter); pci_disable_pcie_error_reporting(pdev); -- 1.5.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 3/5] cxgb4: add user manipulation of the RSS table 2010-07-11 22:01 ` [PATCH net-next 2/5] cxgb4: avoid duplicating some resource freeing code Dimitris Michailidis @ 2010-07-11 22:01 ` Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 4/5] cxgb4: implement the ETHTOOL_GRXFH command Dimitris Michailidis 0 siblings, 1 reply; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev; +Cc: Dimitris Michailidis Implement the get_rxnfc, get_rxfh_indir, and set_rxfh_indir ethtool methods for user manipulation of the RSS table. Besides the methods themselves the rest of the changes here store, initialize, and write the table contents. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> --- drivers/net/cxgb4/cxgb4.h | 1 + drivers/net/cxgb4/cxgb4_main.c | 113 ++++++++++++++++++++++++++++++++++------ 2 files changed, 98 insertions(+), 16 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4.h b/drivers/net/cxgb4/cxgb4.h index 62804bb..a614eb5 100644 --- a/drivers/net/cxgb4/cxgb4.h +++ b/drivers/net/cxgb4/cxgb4.h @@ -295,6 +295,7 @@ struct port_info { u8 nqsets; /* # of qsets */ u8 first_qset; /* index of first qset */ struct link_config link_cfg; + u16 *rss; }; /* port_info.rx_offload flags */ diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 653bb54..61d4313 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -597,30 +597,47 @@ static void free_msix_queue_irqs(struct adapter *adap) } /** + * write_rss - write the RSS table for a given port + * @pi: the port + * @queues: array of queue indices for RSS + * + * Sets up the portion of the HW RSS table for the port's VI to distribute + * packets to the Rx queues in @queues. + */ +static int write_rss(const struct port_info *pi, const u16 *queues) +{ + u16 *rss; + int i, err; + const struct sge_eth_rxq *q = &pi->adapter->sge.ethrxq[pi->first_qset]; + + rss = kmalloc(pi->rss_size * sizeof(u16), GFP_KERNEL); + if (!rss) + return -ENOMEM; + + /* map the queue indices to queue ids */ + for (i = 0; i < pi->rss_size; i++, queues++) + rss[i] = q[*queues].rspq.abs_id; + + err = t4_config_rss_range(pi->adapter, 0, pi->viid, 0, pi->rss_size, + rss, pi->rss_size); + kfree(rss); + return err; +} + +/** * setup_rss - configure RSS * @adap: the adapter * - * Sets up RSS to distribute packets to multiple receive queues. We - * configure the RSS CPU lookup table to distribute to the number of HW - * receive queues, and the response queue lookup table to narrow that - * down to the response queues actually configured for each port. - * We always configure the RSS mapping for all ports since the mapping - * table has plenty of entries. + * Sets up RSS for each port. */ static int setup_rss(struct adapter *adap) { - int i, j, err; - u16 rss[MAX_ETH_QSETS]; + int i, err; for_each_port(adap, i) { const struct port_info *pi = adap2pinfo(adap, i); - const struct sge_eth_rxq *q = &adap->sge.ethrxq[pi->first_qset]; - - for (j = 0; j < pi->nqsets; j++) - rss[j] = q[j].rspq.abs_id; - err = t4_config_rss_range(adap, 0, pi->viid, 0, pi->rss_size, - rss, pi->nqsets); + err = write_rss(pi, pi->rss); if (err) return err; } @@ -1802,6 +1819,46 @@ static int set_flags(struct net_device *dev, u32 flags) return ethtool_op_set_flags(dev, flags, ETH_FLAG_RXHASH); } +static int get_rss_table(struct net_device *dev, struct ethtool_rxfh_indir *p) +{ + const struct port_info *pi = netdev_priv(dev); + unsigned int n = min_t(unsigned int, p->size, pi->rss_size); + + p->size = pi->rss_size; + while (n--) + p->ring_index[n] = pi->rss[n]; + return 0; +} + +static int set_rss_table(struct net_device *dev, + const struct ethtool_rxfh_indir *p) +{ + unsigned int i; + struct port_info *pi = netdev_priv(dev); + + if (p->size != pi->rss_size) + return -EINVAL; + for (i = 0; i < p->size; i++) + if (p->ring_index[i] >= pi->nqsets) + return -EINVAL; + for (i = 0; i < p->size; i++) + pi->rss[i] = p->ring_index[i]; + if (pi->adapter->flags & FULL_INIT_DONE) + return write_rss(pi, pi->rss); + return 0; +} + +static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, + void *rules) +{ + switch (info->cmd) { + case ETHTOOL_GRXRINGS: + info->data = netdev2pinfo(dev)->nqsets; + return 0; + } + return -EOPNOTSUPP; +} + static struct ethtool_ops cxgb_ethtool_ops = { .get_settings = get_settings, .set_settings = set_settings, @@ -1833,6 +1890,9 @@ static struct ethtool_ops cxgb_ethtool_ops = { .set_wol = set_wol, .set_tso = set_tso, .set_flags = set_flags, + .get_rxnfc = get_rxnfc, + .get_rxfh_indir = get_rss_table, + .set_rxfh_indir = set_rss_table, .flash_device = set_flash, }; @@ -3318,6 +3378,22 @@ static int __devinit enable_msix(struct adapter *adap) #undef EXTRA_VECS +static int __devinit init_rss(struct adapter *adap) +{ + unsigned int i, j; + + for_each_port(adap, i) { + struct port_info *pi = adap2pinfo(adap, i); + + pi->rss = kcalloc(pi->rss_size, sizeof(u16), GFP_KERNEL); + if (!pi->rss) + return -ENOMEM; + for (j = 0; j < pi->rss_size; j++) + pi->rss[j] = j % pi->nqsets; + } + return 0; +} + static void __devinit print_port_info(struct adapter *adap) { static const char *base[] = { @@ -3380,9 +3456,10 @@ static void free_some_resources(struct adapter *adapter) disable_msi(adapter); for_each_port(adapter, i) - if (adapter->port[i]) + if (adapter->port[i]) { + kfree(adap2pinfo(adapter, i)->rss); free_netdev(adapter->port[i]); - + } if (adapter->flags & FW_OK) t4_fw_bye(adapter, 0); } @@ -3536,6 +3613,10 @@ static int __devinit init_one(struct pci_dev *pdev, else if (msi > 0 && pci_enable_msi(pdev) == 0) adapter->flags |= USING_MSI; + err = init_rss(adapter); + if (err) + goto out_free_dev; + /* * The card is now ready to go. If any errors occur during device * registration we do not fail the whole card but rather proceed only -- 1.5.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 4/5] cxgb4: implement the ETHTOOL_GRXFH command 2010-07-11 22:01 ` [PATCH net-next 3/5] cxgb4: add user manipulation of the RSS table Dimitris Michailidis @ 2010-07-11 22:01 ` Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps Dimitris Michailidis 0 siblings, 1 reply; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev; +Cc: Dimitris Michailidis Signed-off-by: Dimitris Michailidis <dm@chelsio.com> --- drivers/net/cxgb4/cxgb4.h | 1 + drivers/net/cxgb4/cxgb4_main.c | 54 +++++++++++++++++++++++++++++++++++++++- drivers/net/cxgb4/t4_hw.c | 11 ++++++++ 3 files changed, 65 insertions(+), 1 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4.h b/drivers/net/cxgb4/cxgb4.h index a614eb5..4769c1c 100644 --- a/drivers/net/cxgb4/cxgb4.h +++ b/drivers/net/cxgb4/cxgb4.h @@ -294,6 +294,7 @@ struct port_info { u8 rx_offload; /* CSO, etc */ u8 nqsets; /* # of qsets */ u8 first_qset; /* index of first qset */ + u8 rss_mode; struct link_config link_cfg; u16 *rss; }; diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 61d4313..110843c 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -1851,9 +1851,61 @@ static int set_rss_table(struct net_device *dev, static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, void *rules) { + const struct port_info *pi = netdev_priv(dev); + switch (info->cmd) { + case ETHTOOL_GRXFH: { + unsigned int v = pi->rss_mode; + + info->data = 0; + switch (info->flow_type) { + case TCP_V4_FLOW: + if (v & FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST | + RXH_L4_B_0_1 | RXH_L4_B_2_3; + else if (v & FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + case UDP_V4_FLOW: + if ((v & FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) && + (v & FW_RSS_VI_CONFIG_CMD_UDPEN)) + info->data = RXH_IP_SRC | RXH_IP_DST | + RXH_L4_B_0_1 | RXH_L4_B_2_3; + else if (v & FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + case SCTP_V4_FLOW: + case AH_ESP_V4_FLOW: + case IPV4_FLOW: + if (v & FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + case TCP_V6_FLOW: + if (v & FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST | + RXH_L4_B_0_1 | RXH_L4_B_2_3; + else if (v & FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + case UDP_V6_FLOW: + if ((v & FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) && + (v & FW_RSS_VI_CONFIG_CMD_UDPEN)) + info->data = RXH_IP_SRC | RXH_IP_DST | + RXH_L4_B_0_1 | RXH_L4_B_2_3; + else if (v & FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + case SCTP_V6_FLOW: + case AH_ESP_V6_FLOW: + case IPV6_FLOW: + if (v & FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) + info->data = RXH_IP_SRC | RXH_IP_DST; + break; + } + return 0; + } case ETHTOOL_GRXRINGS: - info->data = netdev2pinfo(dev)->nqsets; + info->data = pi->nqsets; return 0; } return -EOPNOTSUPP; diff --git a/drivers/net/cxgb4/t4_hw.c b/drivers/net/cxgb4/t4_hw.c index 3e63d14..ab46797 100644 --- a/drivers/net/cxgb4/t4_hw.c +++ b/drivers/net/cxgb4/t4_hw.c @@ -3133,8 +3133,10 @@ int __devinit t4_port_init(struct adapter *adap, int mbox, int pf, int vf) u8 addr[6]; int ret, i, j = 0; struct fw_port_cmd c; + struct fw_rss_vi_config_cmd rvc; memset(&c, 0, sizeof(c)); + memset(&rvc, 0, sizeof(rvc)); for_each_port(adap, i) { unsigned int rss_size; @@ -3171,6 +3173,15 @@ int __devinit t4_port_init(struct adapter *adap, int mbox, int pf, int vf) p->port_type = FW_PORT_CMD_PTYPE_GET(ret); p->mod_type = FW_PORT_MOD_TYPE_NA; + rvc.op_to_viid = htonl(FW_CMD_OP(FW_RSS_VI_CONFIG_CMD) | + FW_CMD_REQUEST | FW_CMD_READ | + FW_RSS_VI_CONFIG_CMD_VIID(p->viid)); + rvc.retval_len16 = htonl(FW_LEN16(rvc)); + ret = t4_wr_mbox(adap, mbox, &rvc, sizeof(rvc), &rvc); + if (ret) + return ret; + p->rss_mode = ntohl(rvc.u.basicvirtual.defaultq_to_udpen); + init_link_config(&p->link_cfg, ntohs(c.u.info.pcap)); j++; } -- 1.5.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps 2010-07-11 22:01 ` [PATCH net-next 4/5] cxgb4: implement the ETHTOOL_GRXFH command Dimitris Michailidis @ 2010-07-11 22:01 ` Dimitris Michailidis 2010-07-11 22:17 ` Ben Hutchings 0 siblings, 1 reply; 9+ messages in thread From: Dimitris Michailidis @ 2010-07-11 22:01 UTC (permalink / raw) To: netdev; +Cc: Dimitris Michailidis A few registers have side effects on reads, eg FIFO pointers that auto advance or mailboxes which change ownership when read. They are unsafe to read so exclude them from ethtool register dumps. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> --- drivers/net/cxgb4/cxgb4_main.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 110843c..d3a486b 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -1128,7 +1128,9 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, 0xdfc0, 0xdfe0, 0xe000, 0xea7c, 0xf000, 0x11190, - 0x19040, 0x19124, + 0x19040, 0x1906c, + 0x19078, 0x19080, + 0x1908c, 0x19124, 0x19150, 0x191b0, 0x191d0, 0x191e8, 0x19238, 0x1924c, @@ -1141,49 +1143,49 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, 0x1a190, 0x1a1c4, 0x1a1fc, 0x1a1fc, 0x1e040, 0x1e04c, - 0x1e240, 0x1e28c, + 0x1e284, 0x1e28c, 0x1e2c0, 0x1e2c0, 0x1e2e0, 0x1e2e0, 0x1e300, 0x1e384, 0x1e3c0, 0x1e3c8, 0x1e440, 0x1e44c, - 0x1e640, 0x1e68c, + 0x1e684, 0x1e68c, 0x1e6c0, 0x1e6c0, 0x1e6e0, 0x1e6e0, 0x1e700, 0x1e784, 0x1e7c0, 0x1e7c8, 0x1e840, 0x1e84c, - 0x1ea40, 0x1ea8c, + 0x1ea84, 0x1ea8c, 0x1eac0, 0x1eac0, 0x1eae0, 0x1eae0, 0x1eb00, 0x1eb84, 0x1ebc0, 0x1ebc8, 0x1ec40, 0x1ec4c, - 0x1ee40, 0x1ee8c, + 0x1ee84, 0x1ee8c, 0x1eec0, 0x1eec0, 0x1eee0, 0x1eee0, 0x1ef00, 0x1ef84, 0x1efc0, 0x1efc8, 0x1f040, 0x1f04c, - 0x1f240, 0x1f28c, + 0x1f284, 0x1f28c, 0x1f2c0, 0x1f2c0, 0x1f2e0, 0x1f2e0, 0x1f300, 0x1f384, 0x1f3c0, 0x1f3c8, 0x1f440, 0x1f44c, - 0x1f640, 0x1f68c, + 0x1f684, 0x1f68c, 0x1f6c0, 0x1f6c0, 0x1f6e0, 0x1f6e0, 0x1f700, 0x1f784, 0x1f7c0, 0x1f7c8, 0x1f840, 0x1f84c, - 0x1fa40, 0x1fa8c, + 0x1fa84, 0x1fa8c, 0x1fac0, 0x1fac0, 0x1fae0, 0x1fae0, 0x1fb00, 0x1fb84, 0x1fbc0, 0x1fbc8, 0x1fc40, 0x1fc4c, - 0x1fe40, 0x1fe8c, + 0x1fe84, 0x1fe8c, 0x1fec0, 0x1fec0, 0x1fee0, 0x1fee0, 0x1ff00, 0x1ff84, -- 1.5.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps 2010-07-11 22:01 ` [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps Dimitris Michailidis @ 2010-07-11 22:17 ` Ben Hutchings 2010-07-12 0:03 ` David Miller 0 siblings, 1 reply; 9+ messages in thread From: Ben Hutchings @ 2010-07-11 22:17 UTC (permalink / raw) To: Dimitris Michailidis; +Cc: netdev On Sun, 2010-07-11 at 15:01 -0700, Dimitris Michailidis wrote: > A few registers have side effects on reads, eg FIFO pointers that > auto advance or mailboxes which change ownership when read. They are > unsafe to read so exclude them from ethtool register dumps. [...] If you change the set of registers in the dump, you need to increment the version number. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps 2010-07-11 22:17 ` Ben Hutchings @ 2010-07-12 0:03 ` David Miller 0 siblings, 0 replies; 9+ messages in thread From: David Miller @ 2010-07-12 0:03 UTC (permalink / raw) To: bhutchings; +Cc: dm, netdev From: Ben Hutchings <bhutchings@solarflare.com> Date: Sun, 11 Jul 2010 23:17:06 +0100 > On Sun, 2010-07-11 at 15:01 -0700, Dimitris Michailidis wrote: >> A few registers have side effects on reads, eg FIFO pointers that >> auto advance or mailboxes which change ownership when read. They are >> unsafe to read so exclude them from ethtool register dumps. > [...] > > If you change the set of registers in the dump, you need to increment > the version number. Agreed. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 0/5] cxgb4 updates 2010-07-11 22:01 [PATCH net-next 0/5] cxgb4 updates Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 1/5] cxgb4: move the choice of interrupt type before net_device registration Dimitris Michailidis @ 2010-07-12 0:08 ` David Miller 1 sibling, 0 replies; 9+ messages in thread From: David Miller @ 2010-07-12 0:08 UTC (permalink / raw) To: dm; +Cc: netdev From: Dimitris Michailidis <dm@chelsio.com> Date: Sun, 11 Jul 2010 15:01:14 -0700 > > Following is a series of 5 cxgb4 patches, all for net-next. Mainly they > implement the get_rxnfc, get_rxfh_indir, and set_rxfh_indir ethtool ops, > plus a couple of fixes. Applied patches 1-4, please fixup patch 5 to bump the register dump version number. Thanks. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-07-12 0:08 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-11 22:01 [PATCH net-next 0/5] cxgb4 updates Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 1/5] cxgb4: move the choice of interrupt type before net_device registration Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 2/5] cxgb4: avoid duplicating some resource freeing code Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 3/5] cxgb4: add user manipulation of the RSS table Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 4/5] cxgb4: implement the ETHTOOL_GRXFH command Dimitris Michailidis 2010-07-11 22:01 ` [PATCH net-next 5/5] cxgb4: exclude registers with read side effects from register dumps Dimitris Michailidis 2010-07-11 22:17 ` Ben Hutchings 2010-07-12 0:03 ` David Miller 2010-07-12 0:08 ` [PATCH net-next 0/5] cxgb4 updates David Miller
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).