net/ice/base: support GTP and PPPoE protocols
[dpdk.git] / drivers / net / af_xdp / rte_eth_af_xdp.c
index 5ce90a7..aa716f3 100644 (file)
@@ -56,7 +56,7 @@ static int af_xdp_logtype;
        rte_log(RTE_LOG_ ## level, af_xdp_logtype,      \
                "%s(): " fmt, __func__, ##args)
 
-#define ETH_AF_XDP_FRAME_SIZE          XSK_UMEM__DEFAULT_FRAME_SIZE
+#define ETH_AF_XDP_FRAME_SIZE          2048
 #define ETH_AF_XDP_NUM_BUFFERS         4096
 #define ETH_AF_XDP_DATA_HEADROOM       0
 #define ETH_AF_XDP_DFLT_NUM_DESCS      XSK_RING_CONS__DEFAULT_NUM_DESCS
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
        uint64_t tx_pkts;
-       uint64_t err_pkts;
        uint64_t tx_bytes;
 };
 
@@ -404,7 +403,7 @@ eth_dev_configure(struct rte_eth_dev *dev)
        return 0;
 }
 
-static void
+static int
 eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
        struct pmd_internals *internals = dev->data->dev_private;
@@ -422,6 +421,8 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->default_txportconf.nb_queues = 1;
        dev_info->default_rxportconf.ring_size = ETH_AF_XDP_DFLT_NUM_DESCS;
        dev_info->default_txportconf.ring_size = ETH_AF_XDP_DFLT_NUM_DESCS;
+
+       return 0;
 }
 
 static int
@@ -456,7 +457,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
                stats->imissed += xdp_stats.rx_dropped;
 
                stats->opackets += stats->q_opackets[i];
-               stats->oerrors += txq->stats.err_pkts;
                stats->obytes += stats->q_obytes[i];
        }
 
@@ -852,9 +852,13 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
        ifr.ifr_data = (void *)&channels;
        strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
        ret = ioctl(fd, SIOCETHTOOL, &ifr);
-       if (ret && errno != EOPNOTSUPP) {
-               ret = -errno;
-               goto out;
+       if (ret) {
+               if (errno == EOPNOTSUPP) {
+                       ret = 0;
+               } else {
+                       ret = -errno;
+                       goto out;
+               }
        }
 
        if (channels.max_combined == 0 || errno == EOPNOTSUPP) {