mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
igb: Implement Rx SCTP CSO
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
abc9a29d6b
commit
907209e311
8 changed files with 93 additions and 17 deletions
|
@ -1220,7 +1220,7 @@ igb_build_rx_metadata(IGBCore *core,
|
|||
uint16_t *vlan_tag)
|
||||
{
|
||||
struct virtio_net_hdr *vhdr;
|
||||
bool hasip4, hasip6;
|
||||
bool hasip4, hasip6, csum_valid;
|
||||
EthL4HdrProto l4hdr_proto;
|
||||
|
||||
*status_flags = E1000_RXD_STAT_DD;
|
||||
|
@ -1280,6 +1280,10 @@ igb_build_rx_metadata(IGBCore *core,
|
|||
*pkt_info |= E1000_ADVRXD_PKT_UDP;
|
||||
break;
|
||||
|
||||
case ETH_L4_HDR_PROTO_SCTP:
|
||||
*pkt_info |= E1000_ADVRXD_PKT_SCTP;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1312,6 +1316,15 @@ igb_build_rx_metadata(IGBCore *core,
|
|||
|
||||
if (igb_rx_l4_cso_enabled(core)) {
|
||||
switch (l4hdr_proto) {
|
||||
case ETH_L4_HDR_PROTO_SCTP:
|
||||
if (!net_rx_pkt_validate_l4_csum(pkt, &csum_valid)) {
|
||||
trace_e1000e_rx_metadata_l4_csum_validation_failed();
|
||||
goto func_exit;
|
||||
}
|
||||
if (!csum_valid) {
|
||||
*status_flags |= E1000_RXDEXT_STATERR_TCPE;
|
||||
}
|
||||
/* fall through */
|
||||
case ETH_L4_HDR_PROTO_TCP:
|
||||
*status_flags |= E1000_RXD_STAT_TCPCS;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue