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
cfgfile: fix leak on creation error
[dpdk.git]
/
drivers
/
net
/
bonding
/
rte_eth_bond_pmd.c
diff --git
a/drivers/net/bonding/rte_eth_bond_pmd.c
b/drivers/net/bonding/rte_eth_bond_pmd.c
index
f0e7871
..
af33529
100644
(file)
--- a/
drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/
drivers/net/bonding/rte_eth_bond_pmd.c
@@
-129,7
+129,7
@@
is_lacp_packets(uint16_t ethertype, uint8_t subtype, struct rte_mbuf *mbuf)
{
const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
{
const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
- return !((mbuf->ol_flags & PKT_RX_VLAN
_PKT
) ? mbuf->vlan_tci : 0) &&
+ return !((mbuf->ol_flags & PKT_RX_VLAN) ? mbuf->vlan_tci : 0) &&
(ethertype == ether_type_slow_be &&
(subtype == SLOW_SUBTYPE_MARKER || subtype == SLOW_SUBTYPE_LACP));
}
(ethertype == ether_type_slow_be &&
(subtype == SLOW_SUBTYPE_MARKER || subtype == SLOW_SUBTYPE_LACP));
}
@@
-538,7
+538,7
@@
ipv4_addr_to_dot(uint32_t be_ipv4_addr, char *buf, uint8_t buf_size)
#define MAX_CLIENTS_NUMBER 128
uint8_t active_clients;
struct client_stats_t {
#define MAX_CLIENTS_NUMBER 128
uint8_t active_clients;
struct client_stats_t {
- uint
8
_t port;
+ uint
16
_t port;
uint32_t ipv4_addr;
uint32_t ipv4_rx_packets;
uint32_t ipv4_tx_packets;
uint32_t ipv4_addr;
uint32_t ipv4_rx_packets;
uint32_t ipv4_tx_packets;
@@
-546,7
+546,7
@@
struct client_stats_t {
struct client_stats_t client_stats[MAX_CLIENTS_NUMBER];
static void
struct client_stats_t client_stats[MAX_CLIENTS_NUMBER];
static void
-update_client_stats(uint32_t addr, uint
8
_t port, uint32_t *TXorRXindicator)
+update_client_stats(uint32_t addr, uint
16
_t port, uint32_t *TXorRXindicator)
{
int i = 0;
{
int i = 0;
@@
-604,7
+604,7
@@
update_client_stats(uint32_t addr, uint8_t port, uint32_t *TXorRXindicator)
static void
mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
static void
mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
- uint
8
_t port, uint32_t __attribute__((unused)) *burstnumber)
+ uint
16
_t port, uint32_t __attribute__((unused)) *burstnumber)
{
struct ipv4_hdr *ipv4_h;
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
{
struct ipv4_hdr *ipv4_h;
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
@@
-2059,7
+2059,7
@@
bond_ethdev_close(struct rte_eth_dev *dev)
RTE_LOG(INFO, EAL, "Closing bonded device %s\n", dev->device->name);
while (internals->slave_count != skipped) {
RTE_LOG(INFO, EAL, "Closing bonded device %s\n", dev->device->name);
while (internals->slave_count != skipped) {
- uint
8
_t port_id = internals->slaves[skipped].port_id;
+ uint
16
_t port_id = internals->slaves[skipped].port_id;
rte_eth_dev_stop(port_id);
rte_eth_dev_stop(port_id);
@@
-2371,7
+2371,7
@@
bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
}
}
-static
void
+static
int
bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
struct bond_dev_private *internals = dev->data->dev_private;
bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
struct bond_dev_private *internals = dev->data->dev_private;
@@
-2399,6
+2399,8
@@
bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
}
}
}
}
+
+ return 0;
}
static void
}
static void
@@
-2759,8
+2761,7
@@
bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
}
eth_dev->dev_ops = &default_dev_ops;
}
eth_dev->dev_ops = &default_dev_ops;
- eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC |
- RTE_ETH_DEV_DETACHABLE;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC;
rte_spinlock_init(&internals->lock);
rte_spinlock_init(&internals->lock);