X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fnet.h;h=cec8c986182f911182970eb1a06089a74642e223;hb=49c8ef0e45a91ec894ef15e7d043dafe8f1c5efd;hp=778acf7da3f41bd6ea993ef27d6e5948d6e67d3f;hpb=47e9c70421d75336336097c1425028b40e4f0b54;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/net.h b/include/net.h index 778acf7..cec8c98 100644 --- a/include/net.h +++ b/include/net.h @@ -44,6 +44,9 @@ struct udevice; #define PKTALIGN ARCH_DMA_MINALIGN +/* Number of packets processed together */ +#define ETH_PACKETS_BATCH_RECV 32 + /* ARP hardware address length */ #define ARP_HLEN 6 /* @@ -112,7 +115,7 @@ enum eth_state_t { * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... * @max_speed: Maximum speed of Ethernet connection supported by MAC - * @priv_pdata: device specific platdata + * @priv_pdata: device specific plat */ struct eth_pdata { phys_addr_t iobase; @@ -155,6 +158,7 @@ enum eth_recv_flags { * ROM on the board. This is how the driver should expose it * to the network stack. This function should fill in the * eth_pdata::enetaddr field - optional + * set_promisc: Enable or Disable promiscuous mode */ struct eth_ops { int (*start)(struct udevice *dev); @@ -165,6 +169,7 @@ struct eth_ops { int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join); int (*write_hwaddr)(struct udevice *dev); int (*read_rom_hwaddr)(struct udevice *dev); + int (*set_promisc)(struct udevice *dev, bool enable); }; #define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops) @@ -496,7 +501,13 @@ struct icmp_hdr { * maximum packet size and multiple of 32 bytes = 1536 */ #define PKTSIZE 1522 +#ifndef CONFIG_DM_DSA #define PKTSIZE_ALIGN 1536 +#else +/* Maximum DSA tagging overhead (headroom and/or tailroom) */ +#define DSA_MAX_OVR 256 +#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) +#endif /* * Maximum receive ring size; that is, the number of packets