git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: add hook to send AdminQ command
[dpdk.git]
/
drivers
/
net
/
szedata2
/
rte_eth_szedata2.c
diff --git
a/drivers/net/szedata2/rte_eth_szedata2.c
b/drivers/net/szedata2/rte_eth_szedata2.c
index
99de9f4
..
821bb34
100644
(file)
--- a/
drivers/net/szedata2/rte_eth_szedata2.c
+++ b/
drivers/net/szedata2/rte_eth_szedata2.c
@@
-1044,7
+1044,7
@@
eth_dev_configure(struct rte_eth_dev *dev)
return 0;
}
return 0;
}
-static
void
+static
int
eth_dev_info(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info)
{
eth_dev_info(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info)
{
@@
-1061,6
+1061,8
@@
eth_dev_info(struct rte_eth_dev *dev,
dev_info->rx_queue_offload_capa = 0;
dev_info->tx_queue_offload_capa = 0;
dev_info->speed_capa = ETH_LINK_SPEED_100G;
dev_info->rx_queue_offload_capa = 0;
dev_info->tx_queue_offload_capa = 0;
dev_info->speed_capa = ETH_LINK_SPEED_100G;
+
+ return 0;
}
static int
}
static int
@@
-1093,7
+1095,6
@@
eth_stats_get(struct rte_eth_dev *dev,
if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
stats->q_opackets[i] = txq->tx_pkts;
stats->q_obytes[i] = txq->tx_bytes;
if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
stats->q_opackets[i] = txq->tx_pkts;
stats->q_obytes[i] = txq->tx_bytes;
- stats->q_errors[i] = txq->err_pkts;
}
tx_total += txq->tx_pkts;
tx_total_bytes += txq->tx_bytes;
}
tx_total += txq->tx_pkts;
tx_total_bytes += txq->tx_bytes;
@@
-1110,7
+1111,7
@@
eth_stats_get(struct rte_eth_dev *dev,
return 0;
}
return 0;
}
-static
void
+static
int
eth_stats_reset(struct rte_eth_dev *dev)
{
uint16_t i;
eth_stats_reset(struct rte_eth_dev *dev)
{
uint16_t i;
@@
-1129,6
+1130,8
@@
eth_stats_reset(struct rte_eth_dev *dev)
txq->tx_bytes = 0;
txq->err_pkts = 0;
}
txq->tx_bytes = 0;
txq->err_pkts = 0;
}
+
+ return 0;
}
static void
}
static void
@@
-1158,12
+1161,15
@@
eth_tx_queue_release(void *q)
static void
eth_dev_close(struct rte_eth_dev *dev)
{
static void
eth_dev_close(struct rte_eth_dev *dev)
{
+ struct pmd_internals *internals = dev->data->dev_private;
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
eth_dev_stop(dev);
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
eth_dev_stop(dev);
+ free(internals->sze_dev_path);
+
for (i = 0; i < nb_rx; i++) {
eth_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
for (i = 0; i < nb_rx; i++) {
eth_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
@@
-1174,6
+1180,9
@@
eth_dev_close(struct rte_eth_dev *dev)
dev->data->tx_queues[i] = NULL;
}
dev->data->nb_tx_queues = 0;
dev->data->tx_queues[i] = NULL;
}
dev->data->nb_tx_queues = 0;
+
+ rte_free(dev->data->mac_addrs);
+ dev->data->mac_addrs = NULL;
}
static int
}
static int
@@
-1337,30
+1346,34
@@
eth_mac_addr_set(struct rte_eth_dev *dev __rte_unused,
return 0;
}
return 0;
}
-static
void
+static
int
eth_promiscuous_enable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Enabling promiscuous mode is not supported. "
"The card is always in promiscuous mode.");
eth_promiscuous_enable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Enabling promiscuous mode is not supported. "
"The card is always in promiscuous mode.");
+ return 0;
}
}
-static
void
+static
int
eth_promiscuous_disable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Disabling promiscuous mode is not supported. "
"The card is always in promiscuous mode.");
eth_promiscuous_disable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Disabling promiscuous mode is not supported. "
"The card is always in promiscuous mode.");
+ return -ENOTSUP;
}
}
-static
void
+static
int
eth_allmulticast_enable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Enabling allmulticast mode is not supported.");
eth_allmulticast_enable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Enabling allmulticast mode is not supported.");
+ return -ENOTSUP;
}
}
-static
void
+static
int
eth_allmulticast_disable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Disabling allmulticast mode is not supported.");
eth_allmulticast_disable(struct rte_eth_dev *dev __rte_unused)
{
PMD_DRV_LOG(WARNING, "Disabling allmulticast mode is not supported.");
+ return -ENOTSUP;
}
static const struct eth_dev_ops ops = {
}
static const struct eth_dev_ops ops = {
@@
-1476,6
+1489,9
@@
rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
PMD_INIT_LOG(INFO, "Initializing eth_dev %s (driver %s)", data->name,
RTE_STR(RTE_SZEDATA2_DRIVER_NAME));
PMD_INIT_LOG(INFO, "Initializing eth_dev %s (driver %s)", data->name,
RTE_STR(RTE_SZEDATA2_DRIVER_NAME));
+ /* Let rte_eth_dev_close() release the port resources */
+ dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
/* Fill internal private structure. */
internals->dev = dev;
/* Get index of szedata2 device file and create path to device file */
/* Fill internal private structure. */
internals->dev = dev;
/* Get index of szedata2 device file and create path to device file */
@@
-1538,12
+1554,9
@@
rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
static int
rte_szedata2_eth_dev_uninit(struct rte_eth_dev *dev)
{
static int
rte_szedata2_eth_dev_uninit(struct rte_eth_dev *dev)
{
- struct pmd_internals *internals = (struct pmd_internals *)
- dev->data->dev_private;
-
PMD_INIT_FUNC_TRACE();
PMD_INIT_FUNC_TRACE();
-
free(internals->sze_dev_path
);
+
eth_dev_close(dev
);
PMD_DRV_LOG(INFO, "%s device %s successfully uninitialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), dev->data->name);
PMD_DRV_LOG(INFO, "%s device %s successfully uninitialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), dev->data->name);
@@
-1568,6
+1581,14
@@
static const struct rte_pci_id rte_szedata2_pci_id_table[] = {
RTE_PCI_DEVICE(PCI_VENDOR_ID_NETCOPE,
PCI_DEVICE_ID_NETCOPE_NFB200G2QL)
},
RTE_PCI_DEVICE(PCI_VENDOR_ID_NETCOPE,
PCI_DEVICE_ID_NETCOPE_NFB200G2QL)
},
+ {
+ RTE_PCI_DEVICE(PCI_VENDOR_ID_SILICOM,
+ PCI_DEVICE_ID_FB2CGG3)
+ },
+ {
+ RTE_PCI_DEVICE(PCI_VENDOR_ID_SILICOM,
+ PCI_DEVICE_ID_FB2CGG3D)
+ },
{
.vendor_id = 0,
}
{
.vendor_id = 0,
}