If using dried porcini (1 oz/25 g), cover them with warm water for 20 minutes. Squeeze them dry and chop finely.
In a large bowl, beat the eggs (3) and one egg white with salt (1 tsp).
Work in the buckwheat flour (2 ⅔ cups/300 g) until the crumbs come together. Knead on a floured counter for about 5 minutes, by hand or with a mixer, until smooth.
Cover the dough and leave it to rest for 15 minutes.
Meanwhile, thinly slice the fresh porcini (9 oz/250 g) and onion (1 medium), and mince the garlic (2 cloves).
Warm the olive oil (2 tbsp/30 ml) in a large skillet over medium heat. Cook the onion, stirring often, until soft and golden.
Stir in the porcini and garlic, then season with salt (1 tsp), black pepper (1 tsp) and dried marjoram (1 tsp). Cook for about 7 minutes, until the liquid evaporates and the mushrooms shrink. If they stick, add a splash of water or white wine.
Spread the mushrooms in a bowl to cool, then fold in the Grana Padano (½ cup/50 g). The filling should hold its shape.
Divide the rested dough into 8 pieces. Flour each one well and flatten it with a rolling pin into a long strip.
Halve the strips and pass them through a pasta machine on the second-thickest setting, then once more on the next. Lay the sheets on a floured tray.
Spoon small mounds of filling along a sheet, leaving space between them. Fold the sheet over or top it with a second one, then press around each mound to seal.
Cut into squares or rounds and place on floured parchment. Repeat with the remaining dough and filling.
Bring a large pot of salted water to a boil. Cook the ravioli at a gentle boil for 3 to 4 minutes, then lift them out with a slotted spoon.