net: add rte prefix to ether structures
[dpdk.git] / drivers / net / enic / enic.h
index e5f4d3b..20080af 100644 (file)
@@ -25,8 +25,6 @@
 #define DRV_DESCRIPTION                "Cisco VIC Ethernet NIC Poll-mode Driver"
 #define DRV_COPYRIGHT          "Copyright 2008-2015 Cisco Systems, Inc"
 
-#define ENIC_MAX_MAC_ADDR      64
-
 #define VLAN_ETH_HLEN           18
 
 #define ENICPMD_SETTING(enic, f) ((enic->config.flags & VENETF_##f) ? 1 : 0)
@@ -38,7 +36,9 @@
 #define ENIC_PAGE_SIZE          4096
 #define PAGE_ROUND_UP(x) \
        ((((unsigned long)(x)) + ENIC_PAGE_SIZE-1) & (~(ENIC_PAGE_SIZE-1)))
-#define VNIC_FLOW_COUNTER_UPDATE_MSECS 100
+
+/* must be >= VNIC_COUNTER_DMA_MIN_PERIOD */
+#define VNIC_FLOW_COUNTER_UPDATE_MSECS 500
 
 #define ENICPMD_VFIO_PATH          "/dev/vfio/vfio"
 /*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/
@@ -76,8 +76,8 @@ struct enic_fdir {
        u32 modes;
        u32 types_mask;
        void (*copy_fltr_fn)(struct filter_v2 *filt,
-                            struct rte_eth_fdir_input *input,
-                            struct rte_eth_fdir_masks *masks);
+                            const struct rte_eth_fdir_input *input,
+                            const struct rte_eth_fdir_masks *masks);
 };
 
 struct enic_soft_stats {
@@ -194,13 +194,17 @@ struct enic {
        uint64_t tx_offload_capa; /* DEV_TX_OFFLOAD flags */
        uint64_t tx_queue_offload_capa; /* DEV_TX_OFFLOAD flags */
        uint64_t tx_offload_mask; /* PKT_TX flags accepted */
+
+       /* Multicast MAC addresses added to the NIC */
+       uint32_t mc_count;
+       struct rte_ether_addr mc_addrs[ENIC_MULTICAST_PERFECT_FILTERS];
 };
 
 /* Compute ethdev's max packet size from MTU */
 static inline uint32_t enic_mtu_to_max_rx_pktlen(uint32_t mtu)
 {
-       /* ethdev max size includes eth and crc whereas NIC MTU does not */
-       return mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+       /* ethdev max size includes eth whereas NIC MTU does not */
+       return mtu + ETHER_HDR_LEN;
 }
 
 /* Get the CQ index from a Start of Packet(SOP) RQ index */
@@ -338,9 +342,5 @@ int enic_link_update(struct enic *enic);
 bool enic_use_vector_rx_handler(struct enic *enic);
 void enic_fdir_info(struct enic *enic);
 void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *stats);
-void copy_fltr_v1(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
-                 struct rte_eth_fdir_masks *masks);
-void copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
-                 struct rte_eth_fdir_masks *masks);
 extern const struct rte_flow_ops enic_flow_ops;
 #endif /* _ENIC_H_ */