Re: [PATCH net-next v13 04/15] quic: provide family ops for address and protocol
flat view
From: Xin Long <lucien.xin@gmail.com>
Date: 2026-06-12 19:41:38
Also in:
linux-cifs
[sashiko-claude]
quoted hunk ↗ jump to hunk
+static void quic_v4_lower_xmit(struct sock *sk, struct sk_buff *skb, + struct flowi *fl) +{ + struct quic_skb_cb *cb = QUIC_SKB_CB(skb); + u8 tos = (inet_sk(sk)->tos | cb->ecn), ttl; + struct flowi4 *fl4 = &fl->u.ip4; + struct dst_entry *dst; + __be16 df = 0; + + pr_debug("%s: skb: %p, len: %d, num: %llu, %pI4:%d -> %pI4:%d\n", + __func__, skb, skb->len, cb->number, &fl4->saddr, + ntohs(fl4->fl4_sport), &fl4->daddr, ntohs(fl4->fl4_dport));
Should cb->number use %lld here rather than %llu? Looking at struct
quic_skb_cb in net/quic/common.h:
s64 number; /* Parsed packet number, or the largest previously seen */
Since number is s64, a negative initial value (such as -1 for "largest
previously seen") would be printed as 18446744073709551615 with %llu, and
compilers with -Wformat-signedness flag the mismatch.
[ ... ]quoted hunk ↗ jump to hunk
+static void quic_v6_lower_xmit(struct sock *sk, struct sk_buff *skb, + struct flowi *fl) +{ + struct quic_skb_cb *cb = QUIC_SKB_CB(skb); + u8 tc = (inet6_sk(sk)->tclass | cb->ecn), ttl; + struct flowi6 *fl6 = &fl->u.ip6; + struct dst_entry *dst; + __be32 label; + + pr_debug("%s: skb: %p, len: %d, num: %llu, %pI6c:%d -> %pI6c:%d\n", + __func__, skb, skb->len, cb->number, &fl6->saddr, + ntohs(fl6->fl6_sport), &fl6->daddr, ntohs(fl6->fl6_dport));
Same question about cb->number being printed with %llu while the field is declared s64. A minor one but legit, will fix it. Thanks.