RE: [PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-31 Thread Levy, Amir (Jer)
On Sun, Jul 31 2016, 09:45 PM, David Miller wrote: > From: "Levy, Amir (Jer)" > Date: Sun, 31 Jul 2016 10:15:52 + > > > The network stack thinks it is Ethernet, it might not accept Runt > > frames, so the driver pads the frame in receive. > > The network stack

Re: [PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-31 Thread David Miller
From: "Levy, Amir (Jer)" Date: Sun, 31 Jul 2016 10:15:52 + > The network stack thinks it is Ethernet, it might not accept Runt > frames, so the driver pads the frame in receive. The network stack doesn't care about this at all. It's wasted effort on your part. --

RE: [PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-31 Thread Levy, Amir (Jer)
On Sat, Jul 30 2016, 12:07 AM, Stephen Hemminger wrote: > On Thu, 28 Jul 2016 11:15:19 +0300 > Amir Levy wrote: > > > + /* pad short packets */ > > + if (unlikely(skb->len < ETH_ZLEN)) { > > + int pad_len = ETH_ZLEN - skb->len; > > +

Re: [PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-29 Thread Stephen Hemminger
On Thu, 28 Jul 2016 11:15:19 +0300 Amir Levy wrote: > + /* pad short packets */ > + if (unlikely(skb->len < ETH_ZLEN)) { > + int pad_len = ETH_ZLEN - skb->len; > + > + /* The skb is freed on error */ > +

[PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-28 Thread Amir Levy
Handling the transmission to second peer and receiving from it. This includes communication with upper layer, the network stack and configuration of Thunderbolt(TM) HW. Signed-off-by: Amir Levy --- drivers/thunderbolt/icm/icm_nhi.c | 15 +