From: Jesper Dangaard Brouer <bro...@redhat.com>
Date: Thu, 21 Jan 2016 12:27:30 +0100

> eth_type_trans() does two things:
> 
> 1) determine skb->protocol
> 2) setup skb->pkt_type = PACKET_{BROADCAST,MULTICAST,OTHERHOST}
> 
> Could the HW descriptor deliver the "proto", or perhaps just some bits
> on the most common proto's?
> 
> The skb->pkt_type don't need many bits.  And I bet the HW already have
> the information.  The BROADCAST and MULTICAST indication are easy.  The
> PACKET_OTHERHOST, can be turned around, by instead set a PACKET_HOST
> indication, if the eth->h_dest match the devices dev->dev_addr (else a
> SW compare is required).
> 
> Is that doable in hardware?

I feel like we've had this discussion before several years ago.

I think having just the protocol value would be enough.

skb->pkt_type we could deal with by using always an accessor and
evaluating it lazily.  Nothing needs it until we hit ip_rcv() or
similar.

Reply via email to