@@ -2094,7 +2094,7 @@ conn_key_extract(struct conntrack *ct, struct dp_packet *pkt, ovs_be16 dl_type,
ok = false;
COVERAGE_INC(conntrack_l3csum_err);
} else {
- bool hwol_good_l3_csum = dp_packet_ip_csum_valid(pkt)
+ bool hwol_good_l3_csum = dp_packet_ip_csum_good(pkt)
|| dp_packet_hwol_is_ipv4(pkt);
/* Validate the checksum only when hwol is not supported. */
ok = extract_l3_ipv4(&ctx->key, l3, dp_packet_l3_size(pkt), NULL,
@@ -2109,7 +2109,7 @@ conn_key_extract(struct conntrack *ct, struct dp_packet *pkt, ovs_be16 dl_type,
if (ok) {
bool hwol_bad_l4_csum = dp_packet_l4_csum_bad(pkt);
if (!hwol_bad_l4_csum) {
- bool hwol_good_l4_csum = dp_packet_l4_csum_valid(pkt)
+ bool hwol_good_l4_csum = dp_packet_l4_csum_good(pkt)
|| dp_packet_hwol_tx_l4_csum(pkt);
/* Validate the checksum only when hwol is not supported. */
if (extract_l4(&ctx->key, l4, dp_packet_l4_size(pkt),
@@ -1056,7 +1056,7 @@ dp_packet_hwol_set_tcp_seg(struct dp_packet *b)
}
static inline bool
-dp_packet_ip_csum_valid(const struct dp_packet *p)
+dp_packet_ip_csum_good(const struct dp_packet *p)
{
return (*dp_packet_ol_flags_ptr(p) & DP_PACKET_OL_RX_IP_CSUM_MASK) ==
DP_PACKET_OL_RX_IP_CSUM_GOOD;
@@ -1070,7 +1070,7 @@ dp_packet_ip_csum_bad(const struct dp_packet *p)
}
static inline bool
-dp_packet_l4_csum_valid(const struct dp_packet *p)
+dp_packet_l4_csum_good(const struct dp_packet *p)
{
return (*dp_packet_ol_flags_ptr(p) & DP_PACKET_OL_RX_L4_CSUM_MASK) ==
DP_PACKET_OL_RX_L4_CSUM_GOOD;
@@ -608,7 +608,7 @@ ipf_is_valid_v4_frag(struct ipf *ipf, struct dp_packet *pkt)
goto invalid_pkt;
}
- if (OVS_UNLIKELY(!dp_packet_ip_csum_valid(pkt)
+ if (OVS_UNLIKELY(!dp_packet_ip_csum_good(pkt)
&& !dp_packet_hwol_is_ipv4(pkt)
&& csum(l3, ip_hdr_len) != 0)) {
COVERAGE_INC(ipf_l3csum_err);
@@ -88,7 +88,7 @@ netdev_tnl_ip_extract_tnl_md(struct dp_packet *packet, struct flow_tnl *tnl,
ovs_be32 ip_src, ip_dst;
- if (OVS_UNLIKELY(!dp_packet_ip_csum_valid(packet))) {
+ if (OVS_UNLIKELY(!dp_packet_ip_csum_good(packet))) {
if (csum(ip, IP_IHL(ip->ip_ihl_ver) * 4)) {
VLOG_WARN_RL(&err_rl, "ip packet has invalid checksum");
return NULL;
@@ -190,7 +190,7 @@ udp_extract_tnl_md(struct dp_packet *packet, struct flow_tnl *tnl,
}
if (udp->udp_csum) {
- if (OVS_UNLIKELY(!dp_packet_l4_csum_valid(packet))) {
+ if (OVS_UNLIKELY(!dp_packet_l4_csum_good(packet))) {
uint32_t csum;
if (netdev_tnl_is_header_ipv6(dp_packet_data(packet))) {
csum = packet_csum_pseudoheader6(dp_packet_l3(packet));
This represents better the state and use the same convention as the flags. Signed-off-by: Flavio Leitner <fbl@sysclose.org> --- lib/conntrack.c | 4 ++-- lib/dp-packet.h | 4 ++-- lib/ipf.c | 2 +- lib/netdev-native-tnl.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)