]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/enic/enic.h
net/enic: heed the requested max Rx packet size
[dpdk.git] / drivers / net / enic / enic.h
index d29939c94453c61a15c1df4b2b64fe1221cba768..1b3813a585d513678c7bd0f66e2ba0628b8f2f55 100644 (file)
@@ -162,6 +162,13 @@ struct enic {
        union vnic_rss_cpu rss_cpu;
 };
 
+/* 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;
+}
+
 /* Get the CQ index from a Start of Packet(SOP) RQ index */
 static inline unsigned int enic_sop_rq_idx_to_cq_idx(unsigned int sop_idx)
 {