Look into g_multi gadget, which supports multiple functions in one configuration:
a CDC Ethernet (ECM) link
a CDC ACM (serial port) link
a USB Mass Storage device
If you want to connect your Pi to Windows, read the docs describing how to get the right drivers installed for each function.