/*-
* BSD LICENSE
*
- * Copyright(c) 2014-2015 Chelsio Communications.
+ * Copyright(c) 2014-2016 Chelsio Communications.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
static inline bool is_x_1g_port(const struct link_config *lc)
{
- return ((lc->supported & FW_PORT_CAP_SPEED_1G) != 0);
+ return (lc->supported & FW_PORT_CAP_SPEED_1G) != 0;
}
static inline bool is_x_10g_port(const struct link_config *lc)
for_each_port(adap, i) {
struct port_info *pi = adap2pinfo(adap, i);
- pi->rss = rte_zmalloc(NULL, pi->rss_size, 0);
+ pi->rss = rte_zmalloc(NULL, pi->rss_size * sizeof(u16), 0);
if (!pi->rss)
return -ENOMEM;
}
{
struct adapter *adapter = pi->adapter;
int ret;
- unsigned int mtu = pi->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;
+ unsigned int mtu;
+
+ mtu = pi->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len -
+ (ETHER_HDR_LEN + ETHER_CRC_LEN);
/*
* We do not set address filters and promiscuity here, the stack does
pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops;
pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst;
pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst;
+
+ rte_eth_copy_pci_info(pi->eth_dev, pi->eth_dev->pci_dev);
+
TAILQ_INIT(&pi->eth_dev->link_intr_cbs);
pi->eth_dev->data->mac_addrs = rte_zmalloc(name,