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/bnxt: support Thor WC TCAM
[dpdk.git]
/
drivers
/
net
/
txgbe
/
txgbe_ethdev_vf.c
diff --git
a/drivers/net/txgbe/txgbe_ethdev_vf.c
b/drivers/net/txgbe/txgbe_ethdev_vf.c
index
2e80b97
..
6f577f4
100644
(file)
--- a/
drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/
drivers/net/txgbe/txgbe_ethdev_vf.c
@@
-1,5
+1,6
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2015-2020
+ * Copyright(c) 2015-2020 Beijing WangXun Technology Co., Ltd.
+ * Copyright(c) 2010-2017 Intel Corporation
*/
#include <sys/queue.h>
*/
#include <sys/queue.h>
@@
-71,8
+72,8
@@
static void txgbevf_dev_interrupt_handler(void *param);
* The set of PCI devices this driver supports (for VF)
*/
static const struct rte_pci_id pci_id_txgbevf_map[] = {
* The set of PCI devices this driver supports (for VF)
*/
static const struct rte_pci_id pci_id_txgbevf_map[] = {
- { RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_
RAPTOR
_VF) },
- { RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_
RAPTOR_VF_HV
) },
+ { RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_
SP1000
_VF) },
+ { RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_
WX1820_VF
) },
{ .vendor_id = 0, /* sentinel */ },
};
{ .vendor_id = 0, /* sentinel */ },
};
@@
-1115,7
+1116,7
@@
txgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
{
struct txgbe_hw *hw;
uint32_t max_frame = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
{
struct txgbe_hw *hw;
uint32_t max_frame = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
- struct rte_eth_
rxmode *rx_conf = &dev->data->dev_conf.rxmode
;
+ struct rte_eth_
dev_data *dev_data = dev->data
;
hw = TXGBE_DEV_HW(dev);
hw = TXGBE_DEV_HW(dev);
@@
-1123,13
+1124,15
@@
txgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
max_frame > RTE_ETHER_MAX_JUMBO_FRAME_LEN)
return -EINVAL;
max_frame > RTE_ETHER_MAX_JUMBO_FRAME_LEN)
return -EINVAL;
- /*
refuse mtu that requires the support of scattered packets when this
- * feature has not been enabled before.
+ /*
If device is started, refuse mtu that requires the support of
+ *
scattered packets when this
feature has not been enabled before.
*/
*/
- if (
!(rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER)
&&
+ if (
dev_data->dev_started && !dev_data->scattered_rx
&&
(max_frame + 2 * TXGBE_VLAN_TAG_SIZE >
(max_frame + 2 * TXGBE_VLAN_TAG_SIZE >
- dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM))
+ dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)) {
+ PMD_INIT_LOG(ERR, "Stop port first.");
return -EINVAL;
return -EINVAL;
+ }
/*
* When supported by the underlying PF driver, use the TXGBE_VF_SET_MTU
/*
* When supported by the underlying PF driver, use the TXGBE_VF_SET_MTU
@@
-1355,10
+1358,15
@@
static const struct eth_dev_ops txgbevf_eth_dev_ops = {
.allmulticast_enable = txgbevf_dev_allmulticast_enable,
.allmulticast_disable = txgbevf_dev_allmulticast_disable,
.dev_infos_get = txgbevf_dev_info_get,
.allmulticast_enable = txgbevf_dev_allmulticast_enable,
.allmulticast_disable = txgbevf_dev_allmulticast_disable,
.dev_infos_get = txgbevf_dev_info_get,
+ .dev_supported_ptypes_get = txgbe_dev_supported_ptypes_get,
.mtu_set = txgbevf_dev_set_mtu,
.vlan_filter_set = txgbevf_vlan_filter_set,
.vlan_strip_queue_set = txgbevf_vlan_strip_queue_set,
.vlan_offload_set = txgbevf_vlan_offload_set,
.mtu_set = txgbevf_dev_set_mtu,
.vlan_filter_set = txgbevf_vlan_filter_set,
.vlan_strip_queue_set = txgbevf_vlan_strip_queue_set,
.vlan_offload_set = txgbevf_vlan_offload_set,
+ .rx_queue_setup = txgbe_dev_rx_queue_setup,
+ .rx_queue_release = txgbe_dev_rx_queue_release,
+ .tx_queue_setup = txgbe_dev_tx_queue_setup,
+ .tx_queue_release = txgbe_dev_tx_queue_release,
.rx_queue_intr_enable = txgbevf_dev_rx_queue_intr_enable,
.rx_queue_intr_disable = txgbevf_dev_rx_queue_intr_disable,
.mac_addr_add = txgbevf_add_mac_addr,
.rx_queue_intr_enable = txgbevf_dev_rx_queue_intr_enable,
.rx_queue_intr_disable = txgbevf_dev_rx_queue_intr_disable,
.mac_addr_add = txgbevf_add_mac_addr,
@@
-1372,6
+1380,7
@@
static const struct eth_dev_ops txgbevf_eth_dev_ops = {
.reta_query = txgbe_dev_rss_reta_query,
.rss_hash_update = txgbe_dev_rss_hash_update,
.rss_hash_conf_get = txgbe_dev_rss_hash_conf_get,
.reta_query = txgbe_dev_rss_reta_query,
.rss_hash_update = txgbe_dev_rss_hash_update,
.rss_hash_conf_get = txgbe_dev_rss_hash_conf_get,
+ .tx_done_cleanup = txgbe_dev_tx_done_cleanup,
};
RTE_PMD_REGISTER_PCI(net_txgbe_vf, rte_txgbevf_pmd);
};
RTE_PMD_REGISTER_PCI(net_txgbe_vf, rte_txgbevf_pmd);