)]}'
{
  "commit": "658b107d4d34ab43b166a8f6e815d9e7bde62dd1",
  "tree": "f28d5159e5d1e98d02eb92775a9f7a2717e0ff93",
  "parents": [
    "8ae70bcbdf996369502e5613510c17687ce3d7ad"
  ],
  "author": {
    "name": "Magnus Karlsson",
    "email": "magnus.karlsson@intel.com",
    "time": "Wed Jul 19 15:24:15 2023 +0200"
  },
  "committer": {
    "name": "Andrii Nakryiko",
    "email": "andrii.nakryiko@gmail.com",
    "time": "Mon Aug 21 13:27:45 2023 -0700"
  },
  "message": "selftests/xsk: transmit and receive multi-buffer packets\n\nAdd the ability to send and receive packets that are larger than the\nsize of a umem frame, using the AF_XDP /XDP multi-buffer\nsupport. There are three pieces of code that need to be changed to\nachieve this: the Rx path, the Tx path, and the validation logic.\n\nBoth the Rx path and Tx could only deal with a single fragment per\npacket. The Tx path is extended with a new function called\npkt_nb_frags() that can be used to retrieve the number of fragments a\npacket will consume. We then create these many fragments in a loop and\nfill the N-1 first ones to the max size limit to use the buffer space\nefficiently, and the Nth one with whatever data that is left. This\ngoes on until we have filled in at the most BATCH_SIZE worth of\ndescriptors and fragments. If we detect that the next packet would\nlead to BATCH_SIZE number of fragments sent being exceeded, we do not\nsend this packet and finish the batch. This packet is instead sent in\nthe next iteration of BATCH_SIZE fragments.\n\nFor Rx, we loop over all fragments we receive as usual, but for every\ndescriptor that we receive we call a new validation function called\nis_frag_valid() to validate the consistency of this fragment. The code\nthen checks if the packet continues in the next frame. If so, it loops\nover the next packet and performs the same validation. once we have\nreceived the last fragment of the packet we also call the function\nis_pkt_valid() to validate the packet as a whole. If we get to the end\nof the batch and we are not at the end of the current packet, we back\nout the partial packet and end the loop. Once we get into the receive\nloop next time, we start over from the beginning of that packet. This\nso the code becomes simpler at the cost of some performance.\n\nThe validation function is_frag_valid() checks that the sequence and\npacket numbers are correct at the start and end of each fragment.\n\nSigned-off-by: Magnus Karlsson \u003cmagnus.karlsson@intel.com\u003e\nLink: https://lore.kernel.org/r/20230719132421.584801-19-maciej.fijalkowski@intel.com\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a78a8096f4ce67927eb84841b989e911cdf2816e",
      "old_mode": 33188,
      "old_path": "include/uapi/linux/if_xdp.h",
      "new_id": "80245f5b4dd78dba66038f2fa1bb1257390ce7ef",
      "new_mode": 33188,
      "new_path": "include/uapi/linux/if_xdp.h"
    }
  ]
}
