Hello, Thank you for your question.
The Ethernet frame size is defined by the upper layers payload + L2 headers & CRC. The L2 adds destination and source MAC addresses, type/length and CRC at the end. The total length is defined by MTU parameter which users can control via the ethtool. The minimal frame size is 64 bytes. In e1000_xmit_frame() - the driver pads the received SKB up to 17 bytes by calling skb_put_padto(skb, 17). This is to ensure the HW receives packets with minimum size of 17 bytes. The HW is responsible to pad the rest up to 64 bytes. Hope it answered your question, -- Regards, Raanan -----Original Message----- From: 张钊 [mailto:zhangzhao.w...@139.com] Sent: Saturday, March 12, 2016 09:41 To: e1000-devel <e1000-de...@lists.sf.net> Subject: [E1000-devel] How to set the length of ethernet frame in e1000e driver souce code Dear all, Recently I was debugging and learning drivers/net/e1000e source code in Linux kernel 2.6.32. I want to know how to make sure the size of ethernet frame must be greater than 64. Currently I only konw in the e1000_tx_queue() function in netdev.c, when call writel() function, the kernel send packets. However, I did find out how to set the length or size of ethernet frame. Could you help me to locate the piece of source code to set the length of ethernet? Thank you very much. Best wishes! Zhao ZHANG 2016-03-12 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired