rmnet: Control DL csum offload with RXCSUM

Similar to the UL direction, allow the hardware checksum offload support
to be toggled off with the NETIF_F_RXCSUM flag though ethtool.

Change-Id: I38e43cf9c13363eee340793878be7639f18254e3
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
This commit is contained in:
Sean Tranchetti
2020-02-21 12:35:17 -07:00
부모 0daa9b15d3
커밋 94d3f634df
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@@ -1036,7 +1036,9 @@ int rmnet_frag_process_next_hdr_packet(struct rmnet_frag_descriptor *frag_desc,
rmnet_recycle_frag_descriptor(frag_desc, port);
break;
case RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD:
if (rmnet_frag_get_csum_valid(frag_desc)) {
if (unlikely(!(frag_desc->dev->features & NETIF_F_RXCSUM))) {
priv->stats.csum_sw++;
} else if (rmnet_frag_get_csum_valid(frag_desc)) {
priv->stats.csum_ok++;
frag_desc->csum_valid = true;
} else {

파일 보기

@@ -1172,7 +1172,9 @@ int rmnet_map_process_next_hdr_packet(struct sk_buff *skb,
consume_skb(skb);
break;
case RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD:
if (rmnet_map_get_csum_valid(skb)) {
if (unlikely(!(skb->dev->features & NETIF_F_RXCSUM))) {
priv->stats.csum_sw++;
} else if (rmnet_map_get_csum_valid(skb)) {
priv->stats.csum_ok++;
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else {