Re: [RFC PATCH 3/3] net: macb: add support for padding and fcs computation

2018-07-19 Thread Claudiu Beznea
On 18.07.2018 20:54, David Miller wrote: > From: Claudiu Beznea > Date: Wed, 18 Jul 2018 15:58:09 +0300 > >> >> +static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev) >> +{ >> +struct sk_buff *nskb; >> +int padlen = ETH_ZLEN - (*skb)->len; >> +int headroom =

Re: [RFC PATCH 3/3] net: macb: add support for padding and fcs computation

2018-07-18 Thread David Miller
From: Claudiu Beznea Date: Wed, 18 Jul 2018 15:58:09 +0300 > > +static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev) > +{ > + struct sk_buff *nskb; > + int padlen = ETH_ZLEN - (*skb)->len; > + int headroom = skb_headroom(*skb); > + int tailroom = skb_tailro

[RFC PATCH 3/3] net: macb: add support for padding and fcs computation

2018-07-18 Thread Claudiu Beznea
For packets with computed IP/TCP/UDP checksum there is no need to tell hardware to recompute it. For such kind of packets hardware expects the packet to be at least 64 bytes and FCS to be computed. Signed-off-by: Claudiu Beznea --- drivers/net/ethernet/cadence/macb_main.c | 70 ++