diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-02-23 19:50:49 +0900 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2023-03-10 15:35:38 +0800 |
commit | 65f474bbae9a33b08707084efb95701e187f79e3 (patch) | |
tree | 2f52c41e376d2c32cfdcb6cccd0618229e3b043d /hw/net/net_rx_pkt.h | |
parent | 5fb7d149953f469381a11e486d66dc56af2c0f21 (diff) |
net/eth: Introduce EthL4HdrProto
igb, a new network device emulation, will need SCTP checksum offloading.
Currently eth_get_protocols() has a bool parameter for each protocol
currently it supports, but there will be a bit too many parameters if
we add yet another protocol.
Introduce an enum type, EthL4HdrProto to represent all L4 protocols
eth_get_protocols() support with one parameter.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/net_rx_pkt.h')
-rw-r--r-- | hw/net/net_rx_pkt.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h index cf9bb790f2..d00b484900 100644 --- a/hw/net/net_rx_pkt.h +++ b/hw/net/net_rx_pkt.h @@ -68,13 +68,12 @@ void net_rx_pkt_set_protocols(struct NetRxPkt *pkt, const void *data, * @pkt: packet * @hasip4: whether the packet has an IPv4 header * @hasip6: whether the packet has an IPv6 header - * @hasudp: whether the packet has a UDP header - * @hastcp: whether the packet has a TCP header + * @l4hdr_proto: protocol of L4 header * */ void net_rx_pkt_get_protocols(struct NetRxPkt *pkt, bool *hasip4, bool *hasip6, - bool *hasudp, bool *hastcp); + EthL4HdrProto *l4hdr_proto); /** * fetches L3 header offset |