)]}'
{
  "commit": "2c3e4e2de699cd4d9f6c71f30a22d8f125cd6164",
  "tree": "77ebe62649939e2c59336515fc00b6bbdbc3a444",
  "parents": [
    "6832aa80a193d04aaf8e89a64e1825a158290057"
  ],
  "author": {
    "name": "Alexey Dobriyan",
    "email": "adobriyan@yandex-team.ru",
    "time": "Tue Apr 30 13:53:33 2024 +0300"
  },
  "committer": {
    "name": "Jason Wang",
    "email": "jasowang@redhat.com",
    "time": "Tue Jun 04 15:14:26 2024 +0800"
  },
  "message": "virtio-net: drop too short packets early\n\nReproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451\ncreates small packet (1 segment, len \u003d 10 \u003d\u003d n-\u003eguest_hdr_len),\nthen destroys queue.\n\n\"if (n-\u003ehost_hdr_len !\u003d n-\u003eguest_hdr_len)\" is triggered, if body creates\nzero length/zero segment packet as there is nothing after guest header.\n\nqemu_sendv_packet_async() tries to send it.\n\nslirp discards it because it is smaller than Ethernet header,\nbut returns 0 because tx hooks are supposed to return total length of data.\n\n0 is propagated upwards and is interpreted as \"packet has been sent\"\nwhich is terrible because queue is being destroyed, nobody is waiting for TX\nto complete and assert it triggered.\n\nFix is discard such empty packets instead of sending them.\n\nLength 1 packets will go via different codepath:\n\n\tvirtqueue_push(q-\u003etx_vq, elem, 0);\n\tvirtio_notify(vdev, q-\u003etx_vq);\n\tg_free(elem);\n\nand aren\u0027t problematic.\n\nSigned-off-by: Alexey Dobriyan \u003cadobriyan@yandex-team.ru\u003e\nSigned-off-by: Jason Wang \u003cjasowang@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "666a4e2a030ab1a64999d2b15e90a6e0ab03f555",
      "old_mode": 33188,
      "old_path": "hw/net/virtio-net.c",
      "new_id": "9c7e85caea11a8f24ebb4d7aa0743098b9db35d1",
      "new_mode": 33188,
      "new_path": "hw/net/virtio-net.c"
    }
  ]
}
