Message ID | e55d5c8ac072a2baefe68505a923c6c71b44a0ac.1716979680.git.echaudro@redhat.com |
---|---|
State | Accepted |
Commit | f2e4195b0c87e4c80d7e4031516beea7133d1338 |
Headers | show |
Series | Coverity fixes. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/intel-ovs-compilation | success | test: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
On 5/29/24 12:53, Eelco Chaudron wrote: > This patch fixes an uninitialized gso_type case in > netdev_linux_prepend_vnet_hdr() by returning an error. > > Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.") > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- Recheck-request: github-robot
On 29 May 2024, at 12:53, Eelco Chaudron wrote: > This patch fixes an uninitialized gso_type case in > netdev_linux_prepend_vnet_hdr() by returning an error. > > Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.") > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- > lib/netdev-linux.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > index eb0c5c624..dc67e1268 100644 > --- a/lib/netdev-linux.c > +++ b/lib/netdev-linux.c > @@ -7167,6 +7167,10 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu) > vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; > } else if (dp_packet_hwol_tx_ipv6(b)) { > vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; > + } else { > + VLOG_ERR_RL(&rl, "Unknown gso_type for TSO packet. Flags: %"PRIx64, > + (uint64_t) *dp_packet_ol_flags_ptr(b)); > + return EINVAL; > } > } else { > vnet->hdr_len = 0; > -- > 2.44.0 Recheck-request: github-robot
On 5/29/24 12:53, Eelco Chaudron wrote: > This patch fixes an uninitialized gso_type case in > netdev_linux_prepend_vnet_hdr() by returning an error. > > Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.") > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- > lib/netdev-linux.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > index eb0c5c624..dc67e1268 100644 > --- a/lib/netdev-linux.c > +++ b/lib/netdev-linux.c > @@ -7167,6 +7167,10 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu) > vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; > } else if (dp_packet_hwol_tx_ipv6(b)) { > vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; > + } else { > + VLOG_ERR_RL(&rl, "Unknown gso_type for TSO packet. Flags: %"PRIx64, I'd suggest adding the # qualifier to the format string, i.e. %#"PRIx64. Can be fixed on commit, I suppose. Acked-by: Ilya Maximets <i.maximets@ovn.org>
On 31 May 2024, at 13:37, Ilya Maximets wrote: > On 5/29/24 12:53, Eelco Chaudron wrote: >> This patch fixes an uninitialized gso_type case in >> netdev_linux_prepend_vnet_hdr() by returning an error. >> >> Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.") >> Signed-off-by: Eelco Chaudron <echaudro@redhat.com> >> --- >> lib/netdev-linux.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c >> index eb0c5c624..dc67e1268 100644 >> --- a/lib/netdev-linux.c >> +++ b/lib/netdev-linux.c >> @@ -7167,6 +7167,10 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu) >> vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; >> } else if (dp_packet_hwol_tx_ipv6(b)) { >> vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; >> + } else { >> + VLOG_ERR_RL(&rl, "Unknown gso_type for TSO packet. Flags: %"PRIx64, > > I'd suggest adding the # qualifier to the format string, i.e. %#"PRIx64. > Can be fixed on commit, I suppose. Thanks for the review! I’ll fix on commit, as I totally missed the # sign :(. > Acked-by: Ilya Maximets <i.maximets@ovn.org>
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index eb0c5c624..dc67e1268 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -7167,6 +7167,10 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu) vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; } else if (dp_packet_hwol_tx_ipv6(b)) { vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; + } else { + VLOG_ERR_RL(&rl, "Unknown gso_type for TSO packet. Flags: %"PRIx64, + (uint64_t) *dp_packet_ol_flags_ptr(b)); + return EINVAL; } } else { vnet->hdr_len = 0;
This patch fixes an uninitialized gso_type case in netdev_linux_prepend_vnet_hdr() by returning an error. Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.") Signed-off-by: Eelco Chaudron <echaudro@redhat.com> --- lib/netdev-linux.c | 4 ++++ 1 file changed, 4 insertions(+)