net: Support network packet checksum calc offloading
Create infrastructure that allows ethernet device driver to tell if it supports network packet checksum offloading. This applies only to IPv4, UDP or TCP checksums. The driver can enable/disable checksum offloading separately for Tx and Rx network packets. If the device (ethernet in this case) can calculate the network packet checksum for IPv4, UDP or TCP, then do not calculate the corresponding checksum by the stack itself. Fixes #2987 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
74d1835505
commit
85a2459edb
14 changed files with 143 additions and 35 deletions
|
@ -705,9 +705,9 @@ static void eth_enc28j60_iface_init_0(struct net_if *iface)
|
|||
context->iface = iface;
|
||||
}
|
||||
|
||||
static struct net_if_api api_funcs_0 = {
|
||||
.init = eth_enc28j60_iface_init_0,
|
||||
.send = eth_net_tx,
|
||||
static const struct ethernet_api api_funcs_0 = {
|
||||
.iface_api.init = eth_enc28j60_iface_init_0,
|
||||
.iface_api.send = eth_net_tx,
|
||||
};
|
||||
|
||||
static struct eth_enc28j60_runtime eth_enc28j60_0_runtime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue