Packing a triangular piece of glass?

A glass prism is to be shipped in a cylindrical tube that has an inside diameter of d inches. Given that the cross section of the prism is an equilateral triangle with side of length p and the prism fits snugly into the tube, write p as a function of d.